[RFC PATCH hwc] drm_hwcomposer: set CRTC background color when available

Stefan Schake stschake at gmail.com
Thu Feb 22 12:23:38 UTC 2018


Hey Robert,

On Thu, Feb 22, 2018 at 11:04 AM, Robert Foss <robert.foss at collabora.com> wrote:
> Hey Stefan,
>
> On 02/22/2018 04:54 AM, Stefan Schake wrote:
>>
>> Android assumes an implicit black background layer is always present
>> behind all layers it specifies for composition. drm_hwcomposer currently
>> punts responsibility for this to the kernel/DRM platform and puts layers
>> with per-pixel alpha content on the primary plane when requested.
>
>
> I wasn't aware of this assumption, but given that it is the case,
> the patch looks like a good fix for the problem.
>
> Unfortunately I don't have a hardware platform up and running to test the
> patch with at the moment.
>

HWC1 has this ominous comment:

* IMPORTANT NOTE: There is an implicit layer containing opaque black
* pixels behind all the layers in the list. It is the responsibility of
* the hwcomposer module to make sure black pixels are output (or blended
* from).

It's not repeated in the HWC2 docs, but I think the assumption carried over
given that Android prefers all things RGBA. Admittedly it's rare that you
don't have a full-size opaque layer in the composition like a background
picture, so the cases where this causes corrupted rendering on VC4 are limited
to some time during boot after the animation finishes but the launcher isn't
up yet.

Thanks,
Stefan


More information about the dri-devel mailing list