drm/amd/display: DPP CM ICSC AYCRCB8888 format support
authorvikrant mhaske <vikrant.mhaske@amd.com>
Thu, 12 Jul 2018 08:04:43 +0000 (16:04 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 24 Jul 2018 20:15:41 +0000 (15:15 -0500)
[why]
Diags has POR to run the video workload using AYCRCB8888 through DCN;
capture it through DWB and send it to VCN hardware to encode

[how]
added the code to support this format so that DPP ICSC will be able to
convert it from YUV444 to internal RGB and DWB OCSC will be able to
convert from internal RGB to YUV420

Signed-off-by: vikrant mhaske <vikrant.mhaske@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Acked-by: Leo Li <sunpeng.li@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/dc_hw_types.h
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hubp.c

index 9cfd7ea845e3ffe31840f06cfaeea056fcc1940d..1d1f2d5ece519f511cb75b7c2f3c83778eb1135a 100644 (file)
@@ -192,7 +192,7 @@ enum surface_pixel_format {
        /*swaped & float*/
        SURFACE_PIXEL_FORMAT_GRPH_ABGR16161616F,
        /*grow graphics here if necessary */
-
+       SURFACE_PIXEL_FORMAT_VIDEO_AYCrCb8888,
        SURFACE_PIXEL_FORMAT_VIDEO_BEGIN,
        SURFACE_PIXEL_FORMAT_VIDEO_420_YCbCr =
                SURFACE_PIXEL_FORMAT_VIDEO_BEGIN,
index 332354ca6529ea5a4ca4b32aa847d9a7e838fa6e..2138cd3c5d1dc12c73c0f0abef6e13fbbf4bf9a8 100644 (file)
@@ -294,6 +294,10 @@ void hubp1_program_pixel_format(
                REG_UPDATE(DCSURF_SURFACE_CONFIG,
                                SURFACE_PIXEL_FORMAT, 66);
                break;
+       case SURFACE_PIXEL_FORMAT_VIDEO_AYCrCb8888:
+               REG_UPDATE(DCSURF_SURFACE_CONFIG,
+                               SURFACE_PIXEL_FORMAT, 12);
+               break;
        default:
                BREAK_TO_DEBUGGER();
                break;