Commit f3d34948 authored by Harry Wentland's avatar Harry Wentland Committed by Alex Deucher
Browse files

drm/amd/display: Add COLOR_ENCODING/COLOR_RANGE to overlay planes



Extend COLOR_ENCODING and COLOR_RANGE property creation to overlay
planes in addition to primary planes. This allows overlay planes to
use YUV formats with proper color space configuration when the
hardware supports NV12/P010 formats.

These properties control the YUV-to-RGB conversion matrix selection
(BT.601/BT.709/BT.2020) and range handling (limited/full range).

Assisted-by: Claude: claude-sonnet-4.5
Reviewed-by: default avatarAlex Hung <alex.hung@amd.com>
Signed-off-by: default avatarHarry Wentland <harry.wentland@amd.com>
Signed-off-by: default avatarAlex Hung <alex.hung@amd.com>
Tested-by: default avatarDan Wheeler <daniel.wheeler@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 63fff551
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1911,7 +1911,8 @@ int amdgpu_dm_plane_init(struct amdgpu_display_manager *dm,
		drm_plane_create_zpos_immutable_property(plane, 255);
	}

	if (plane->type == DRM_PLANE_TYPE_PRIMARY &&
	if ((plane->type == DRM_PLANE_TYPE_PRIMARY ||
	     plane->type == DRM_PLANE_TYPE_OVERLAY) &&
	    plane_cap &&
	    (plane_cap->pixel_format_support.nv12 ||
	     plane_cap->pixel_format_support.p010)) {