]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/amd/display: Add debug option to disable DSC support
authorWenjing Liu <Wenjing.Liu@amd.com>
Tue, 7 Jan 2020 21:33:32 +0000 (16:33 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 22 Jan 2020 21:55:27 +0000 (16:55 -0500)
[how]
Empty dsc enc caps when debug option is set to disable DSC.

Signed-off-by: Wenjing Liu <Wenjing.Liu@amd.com>
Reviewed-by: Nikola Cornij <Nikola.Cornij@amd.com>
Acked-by: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/dc.h
drivers/gpu/drm/amd/display/dc/dsc/dc_dsc.c

index 3fa85a54360fef9c22d79565e785ba3ce40718ed..7d31dcb9e37fe6b2073c30d76c8fdefd095a952b 100644 (file)
@@ -425,6 +425,7 @@ struct dc_debug_options {
        bool validate_dml_output;
        bool enable_dmcub_surface_flip;
        bool usbc_combo_phy_reset_wa;
+       bool disable_dsc;
 };
 
 struct dc_debug_data {
index 8b78fcbfe74691a84c4b091dddfa0fd6ef9c04ca..87d682d25278ab4a8f5f41e9a586112299006f3c 100644 (file)
@@ -224,7 +224,8 @@ static void get_dsc_enc_caps(
 
        memset(dsc_enc_caps, 0, sizeof(struct dsc_enc_caps));
        if (dsc) {
-               dsc->funcs->dsc_get_enc_caps(dsc_enc_caps, pixel_clock_100Hz);
+               if (!dsc->ctx->dc->debug.disable_dsc)
+                       dsc->funcs->dsc_get_enc_caps(dsc_enc_caps, pixel_clock_100Hz);
                if (dsc->ctx->dc->debug.native422_support)
                        dsc_enc_caps->color_formats.bits.YCBCR_NATIVE_422 = 1;
        }