drm/amd/display: support ACrYCb2101010
authorZheng, XueLai(Eric) <XueLai.Zheng@amd.com>
Tue, 8 May 2018 16:25:15 +0000 (12:25 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 5 Jul 2018 21:38:37 +0000 (16:38 -0500)
Signed-off-by: XueLai(Eric), Zheng <XueLai.Zheng@amd.com>
Reviewed-by: Charlene Liu <Charlene.Liu@amd.com>
Acked-by: Harry Wentland <harry.wentland@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 d31023d57b58a1ff8b5cdaf4e32797f1f30ad496..14afbc5c0a62191ffc571e8ddd7fa7ad9e6b0e55 100644 (file)
@@ -199,6 +199,7 @@ enum surface_pixel_format {
        SURFACE_PIXEL_FORMAT_VIDEO_420_YCrCb,
        SURFACE_PIXEL_FORMAT_VIDEO_420_10bpc_YCbCr,
        SURFACE_PIXEL_FORMAT_VIDEO_420_10bpc_YCrCb,
+               SURFACE_PIXEL_FORMAT_SUBSAMPLE_END,
        SURFACE_PIXEL_FORMAT_INVALID
 
        /*grow 444 video here if necessary */
index c28085be39ff9530730481f98e3c2c800ea167cc..93f52c58bc695c1be0ead3c02f1b51cb220749cd 100644 (file)
@@ -166,7 +166,7 @@ void hubp1_program_size_and_rotation(
        /* Program data and meta surface pitch (calculation from addrlib)
         * 444 or 420 luma
         */
-       if (format >= SURFACE_PIXEL_FORMAT_VIDEO_BEGIN) {
+       if (format >= SURFACE_PIXEL_FORMAT_VIDEO_BEGIN && format < SURFACE_PIXEL_FORMAT_SUBSAMPLE_END) {
                ASSERT(plane_size->video.chroma_pitch != 0);
                /* Chroma pitch zero can cause system hang! */