]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
drm: Add CRTC background color property
authorCristian Ciocaltea <cristian.ciocaltea@collabora.com>
Tue, 3 Mar 2026 19:24:18 +0000 (21:24 +0200)
committerDaniel Stone <daniels@collabora.com>
Wed, 18 Mar 2026 09:59:57 +0000 (09:59 +0000)
commit4c684596cde44d03dfd9624c86e1de4db0dcf121
tree76d9e8ec43117acbca9c4e2027248bf668945b92
parentde9e2b3d88af36411301c049a1b049f3e4fe0757
drm: Add CRTC background color property

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 couple of dedicated DRM_ARGB64_PREP*() helpers.  Individual
color components can be extracted with desired precision using the
corresponding DRM_ARGB64_GET*() macros.

Co-developed-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Reviewed-by: NĂ­colas F. R. A. Prado <nfraprado@collabora.com>
Tested-by: Diederik de Haas <diederik@cknow-tech.com>
Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
Link: https://patch.msgid.link/20260303-rk3588-bgcolor-v8-2-fee377037ad1@collabora.com
Signed-off-by: Daniel Stone <daniels@collabora.com>
drivers/gpu/drm/drm_atomic.c
drivers/gpu/drm/drm_atomic_state_helper.c
drivers/gpu/drm/drm_atomic_uapi.c
drivers/gpu/drm/drm_blend.c
drivers/gpu/drm/drm_mode_config.c
include/drm/drm_blend.h
include/drm/drm_crtc.h
include/drm/drm_mode_config.h
include/uapi/drm/drm_mode.h