[android] renogotiation of pixel formats is not supported, leading to potential stride/pixelformat issues

Bug #1495974 reported by Kevin DuBois
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Mir
Won't Fix
High
Kevin DuBois
mir-android-platform
New
Undecided
Unassigned
mir (Ubuntu)
Won't Fix
Undecided
Unassigned

Bug Description

Some drivers will call android's perform hook with: NATIVE_WINDOW_SET_BUFFERS_FORMAT. In the case that the pixel formats are the same depth, we accommodate this by just setting the format to the newly-requested format. (ie, mir_pixel_format_rgbx_8888 to mir_pixel_format_rgba_8888 is accommodated, as no reallocation is needed).

However, we've encountered a device that will try to set the format to HAL_PIXEL_FORMAT_RGB_888 when mir has selected HAL_PIXEL_FORMAT_RGBX_8888. Since we're going from a 32 bit format to a 24 bit format, the stride information becomes incorrect.

Tags: android maruko
Kevin DuBois (kdub)
Changed in mir:
importance: Undecided → High
status: New → Confirmed
assignee: nobody → Kevin DuBois (kdub)
milestone: none → 0.16.0
Changed in mir:
milestone: 0.16.0 → 0.17.0
tags: added: maruko
tags: added: android
Changed in mir:
milestone: 0.17.0 → 0.18.0
Kevin DuBois (kdub)
Changed in mir:
milestone: 0.18.0 → 0.19.0
Changed in mir:
milestone: 0.19.0 → 0.20.0
milestone: 0.20.0 → none
Revision history for this message
Kevin DuBois (kdub) wrote :

Can be managed more easily with NBS, might be worth working on post 0.23

Revision history for this message
Kevin DuBois (kdub) wrote :

Don't actually know of a currently supported device that does this. I suppose this is in progress with the NBS transition.

Changed in mir:
status: Confirmed → In Progress
Changed in mir:
milestone: none → 0.22.0
Changed in mir:
milestone: 0.22.0 → 0.23.0
Kevin DuBois (kdub)
Changed in mir:
status: In Progress → Triaged
milestone: 0.23.0 → 0.24.0
Kevin DuBois (kdub)
Changed in mir:
milestone: 0.24.0 → 0.25.0
Changed in mir:
milestone: 0.25.0 → none
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in mir (Ubuntu):
status: New → Confirmed
Revision history for this message
Ratchanan Srirattanamet (peat-new) wrote :

Dear everyone in this bug,

This seems to also happen in Fairphone 2 in the client context. Could anyone explain more about this bug if this bug is talking about the client or the server?

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

It's certainly a bug in Mir and not the client apps. Whether it's a bug in libmirclient or libmirserver and friends I think is not relevant.

But good news: We're looking at solving Mir's woes with EGL vs pixel format soon. In the new APIs we're releasing this year, Mir will use EGL more natively and not require that you know or specify the pixel format for that. So with some luck, the bug might go away without any additional effort.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

The Android platform was deleted from lp:mir at revision 4155.

Changed in mir:
status: Triaged → Won't Fix
Changed in mir (Ubuntu):
status: Confirmed → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.