[RFC PATCH hwc] drm_hwcomposer: set CRTC background color when available
Stefan Schake
stschake at gmail.com
Fri Jun 29 10:27:41 UTC 2018
Hey Maarten,
On Fri, Jun 29, 2018 at 12:05 PM, Maarten Lankhorst
<maarten.lankhorst at linux.intel.com> wrote:
> Op 22-02-18 om 04:54 schreef Stefan Schake:
>> 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.
>>
>> On some platforms (e.g. VC4) a background color fill has a cycle cost for
>> the hardware composer and is not enabled by default. Instead, userland can
>> request a background color through a CRTC property. Use this property to
>> specify the implicit black background Android expects.
>>
>> Signed-off-by: Stefan Schake <stschake at gmail.com>
>> ---
>> Kernel changes for this (background_color) are available here:
>>
>> https://github.com/stschake/linux/commits/background-upstream
>>
>> Sending as RFC because I'm not entirely clear on whose responsibility
>> this should be, on most DRM drivers it seems to be implicit. I think
>> a case could also be made that VC4 should not accept alpha formats on
>> the lowest layer or enable background color fill when given one anyway.
>> On the other hand, userland control over background color seems desirable
>> regardless and is a feature of multiple hardware composers (i915, vc4, omap).
> Ping? Would be nice if we were moving forward. :)
I was unclear if DRM specified a black background when writing this.
Someone pointed me towards the excerpt in the docs that explicitly
mandates black background fill and so I ended up writing a VC4 patch
that automatically sets it when required instead of the optional property
used here.
Adding a background_color property would still be desirable, but I'm
unclear on what the userspace would be at the moment. drm_hwc doesn't
need any background color other than black and since that is the DRM
default, it wouldn't need to use a property.
Thanks,
Stefan
More information about the dri-devel
mailing list