OSDN Git Service

drm/amd/display: add hdmi disable debug check
authorDale Zhao <dale.zhao@amd.com>
Mon, 15 Nov 2021 06:28:18 +0000 (14:28 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 1 Dec 2021 21:05:16 +0000 (16:05 -0500)
[Why]
Using the hdmi_disable option doesnt disable 6GB bandwidth

[How]
Add debug.hdmi20_disable flage when checking 6GB enable or not.

Reviewed-by: Chris Park <Chris.Park@amd.com>
Reviewed-by: Aric Cyr <Aric.Cyr@amd.com>
Acked-by: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>
Signed-off-by: Dale Zhao <dale.zhao@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/dce/dce_link_encoder.c
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_link_encoder.c

index 1e77ffe..f1c61d5 100644 (file)
@@ -788,8 +788,9 @@ static bool dce110_link_encoder_validate_hdmi_output(
                        crtc_timing->pixel_encoding == PIXEL_ENCODING_YCBCR420)
                return false;
 
-       if (!enc110->base.features.flags.bits.HDMI_6GB_EN &&
-               adjusted_pix_clk_khz >= 300000)
+       if ((!enc110->base.features.flags.bits.HDMI_6GB_EN ||
+                       enc110->base.ctx->dc->debug.hdmi20_disable) &&
+                       adjusted_pix_clk_khz >= 300000)
                return false;
        if (enc110->base.ctx->dc->debug.hdmi20_disable &&
                crtc_timing->pixel_encoding == PIXEL_ENCODING_YCBCR420)
index 2dc4b4e..f4b34c1 100644 (file)
@@ -646,8 +646,9 @@ static bool dcn10_link_encoder_validate_hdmi_output(
                        crtc_timing->pixel_encoding == PIXEL_ENCODING_YCBCR420)
                return false;
 
-       if (!enc10->base.features.flags.bits.HDMI_6GB_EN &&
-               adjusted_pix_clk_100hz >= 3000000)
+       if ((!enc10->base.features.flags.bits.HDMI_6GB_EN ||
+                       enc10->base.ctx->dc->debug.hdmi20_disable) &&
+                       adjusted_pix_clk_100hz >= 3000000)
                return false;
        if (enc10->base.ctx->dc->debug.hdmi20_disable &&
                crtc_timing->pixel_encoding == PIXEL_ENCODING_YCBCR420)