Skip to content

Commit 00755bb

Browse files
Stylon Wangalexdeucher
authored andcommitted
drm/amd/display: Enable BT2020 in COLOR_ENCODING property
[Why] BT2020 is not supported in COLOR_ENCODING property of planes. Only BT601 and BT709 was available. [How] Allow BT2020 as legit value in setting COLOR_ENCODING property. Signed-off-by: Stylon Wang <[email protected]> Reviewed-by: Nicholas Kazlauskas <[email protected]> Acked-by: Rodrigo Siqueira <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent 5a6b545 commit 00755bb

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5592,12 +5592,15 @@ static int amdgpu_dm_plane_init(struct amdgpu_display_manager *dm,
55925592
}
55935593

55945594
if (plane->type == DRM_PLANE_TYPE_PRIMARY &&
5595-
plane_cap && plane_cap->pixel_format_support.nv12) {
5595+
plane_cap &&
5596+
(plane_cap->pixel_format_support.nv12 ||
5597+
plane_cap->pixel_format_support.p010)) {
55965598
/* This only affects YUV formats. */
55975599
drm_plane_create_color_properties(
55985600
plane,
55995601
BIT(DRM_COLOR_YCBCR_BT601) |
5600-
BIT(DRM_COLOR_YCBCR_BT709),
5602+
BIT(DRM_COLOR_YCBCR_BT709) |
5603+
BIT(DRM_COLOR_YCBCR_BT2020),
56015604
BIT(DRM_COLOR_YCBCR_LIMITED_RANGE) |
56025605
BIT(DRM_COLOR_YCBCR_FULL_RANGE),
56035606
DRM_COLOR_YCBCR_BT709, DRM_COLOR_YCBCR_LIMITED_RANGE);

0 commit comments

Comments
 (0)