Skip to content

Commit cbec647

Browse files
Stylon Wangalexdeucher
authored andcommitted
drm/amd/display: Support P010 pixel format
[Why] P010 pixel format is not declared as supported in DRM and DM. [How] Add P010 format to the support list presented to DRM and checked in DM 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 33eef72 commit cbec647

File tree

4 files changed

+11
-3
lines changed

4 files changed

+11
-3
lines changed

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3639,6 +3639,9 @@ fill_dc_plane_info_and_addr(struct amdgpu_device *adev,
36393639
case DRM_FORMAT_NV12:
36403640
plane_info->format = SURFACE_PIXEL_FORMAT_VIDEO_420_YCrCb;
36413641
break;
3642+
case DRM_FORMAT_P010:
3643+
plane_info->format = SURFACE_PIXEL_FORMAT_VIDEO_420_10bpc_YCrCb;
3644+
break;
36423645
default:
36433646
DRM_ERROR(
36443647
"Unsupported screen format %s\n",
@@ -5535,6 +5538,8 @@ static int get_plane_formats(const struct drm_plane *plane,
55355538

55365539
if (plane_cap && plane_cap->pixel_format_support.nv12)
55375540
formats[num_formats++] = DRM_FORMAT_NV12;
5541+
if (plane_cap && plane_cap->pixel_format_support.p010)
5542+
formats[num_formats++] = DRM_FORMAT_P010;
55385543
break;
55395544

55405545
case DRM_PLANE_TYPE_OVERLAY:

drivers/gpu/drm/amd/display/dc/dcn10/dcn10_resource.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -552,7 +552,8 @@ static const struct dc_plane_cap plane_cap = {
552552
.pixel_format_support = {
553553
.argb8888 = true,
554554
.nv12 = true,
555-
.fp16 = true
555+
.fp16 = true,
556+
.p010 = true
556557
},
557558

558559
.max_upscale_factor = {

drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1012,7 +1012,8 @@ static const struct dc_plane_cap plane_cap = {
10121012
.pixel_format_support = {
10131013
.argb8888 = true,
10141014
.nv12 = true,
1015-
.fp16 = true
1015+
.fp16 = true,
1016+
.p010 = true
10161017
},
10171018

10181019
.max_upscale_factor = {

drivers/gpu/drm/amd/display/dc/dcn21/dcn21_resource.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -838,7 +838,8 @@ static const struct dc_plane_cap plane_cap = {
838838
.pixel_format_support = {
839839
.argb8888 = true,
840840
.nv12 = true,
841-
.fp16 = true
841+
.fp16 = true,
842+
.p010 = true
842843
},
843844

844845
.max_upscale_factor = {

0 commit comments

Comments
 (0)