Skip to content

Conversation

6by9
Copy link
Contributor

@6by9 6by9 commented Sep 2, 2025

Upstream proposed series https://lore.kernel.org/dri-devel/20250902-rk3588-bgcolor-v1-0-fd97df91d89f@collabora.com/ plus 2 commits implementing it for vc4.

I have deliberately ignored the upstream macros for extracting the colour components as they look suspect and have been queried upstream.

Tested and working on Pi4 and Pi5 C1.
Pi5 D0 has a slightly different code path, and I'll try and dig out the relevant hardware. The code follows the docs though.

@cillian64 @jc-kynesim

@jc-kynesim
Copy link
Contributor

I like it :-)

6by9 and others added 5 commits September 2, 2025 18:14
5 minutes seems to be failing on a regular basis, so
increase to 10.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
Some display controllers can be hardware programmed to show non-black
colors for pixels that are either not covered by any plane or are
exposed through transparent regions of higher planes.  This feature can
help reduce memory bandwidth usage, e.g. in compositors managing a UI
with a solid background color while using smaller planes to render the
remaining content.

To support this capability, introduce the BACKGROUND_COLOR standard DRM
mode property, which can be attached to a CRTC through the
drm_crtc_attach_background_color_property() helper function.

Additionally, define a 64-bit ARGB format value to be built with the
help of a dedicated drm_argb64() utility macro.  Individual color
components can be extracted with desired precision using the
corresponding DRM_ARGB64_*() macros.

Co-developed-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
VOP2 allows configuring the background color of each video output port.

Since a previous patch introduced the BACKGROUND_COLOR CRTC property,
which defaults to solid black, take it into account when programming the
hardware.

Note that only the 10 least significant bits of each color component are
used, as this is the maximum precision supported by the display
controller.

Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
Since a previous patch introduced the BACKGROUND_COLOR CRTC property,
which defaults to solid black, take it into account when programming the
hardware.
The exact registers used varies between the hardware generations,
but is supported by all of them.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
When adding the register definitions for the GEN_6D hardware, 6
defines managed to get added twice.

Remove that duplication.

Fixes: 3ca2940 ("drm/vc4: hvs: Add in support for 2712 D-step.")
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
@6by9
Copy link
Contributor Author

6by9 commented Sep 2, 2025

Added a patch to increase the timeout to the workflow "install toolchain" step as it appears to be failing regularly. Hopefully that'll get it through.

@6by9 6by9 marked this pull request as draft September 3, 2025 10:20
@6by9
Copy link
Contributor Author

6by9 commented Sep 3, 2025

Upstream appear to be having some debate over this as to how it should be implemented, and referencing to previous attempts that caused discussion over 16bit precision or float and ranges for the parameter.

Whilst we may decide to merge this anyway if it can help us, I've converted it to draft to remind us to see what happens in those discussions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants