drm/amd/display: Add debug option to disable dmcu
authorYongqiang Sun <yongqiang.sun@amd.com>
Thu, 15 Dec 2016 15:50:48 +0000 (10:50 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 26 Sep 2017 21:05:26 +0000 (17:05 -0400)
Signed-off-by: Yongqiang Sun <yongqiang.sun@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@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.h
drivers/gpu/drm/amd/display/dc/dce/dce_link_encoder.c

index aeb0c3b..36f1c96 100644 (file)
@@ -147,6 +147,7 @@ struct dc_debug {
        bool disable_dfs_bypass;
        bool disable_power_gate;
        bool disable_clock_gate;
+       bool disable_dmcu;
 };
 
 struct dc {
index c73d605..a8a2290 100644 (file)
@@ -1821,6 +1821,9 @@ void dce110_link_encoder_init_dmcu_backlight_settings(
        uint32_t s2;
        uint32_t value;
 
+       if (enc->ctx->dc->debug.disable_dmcu)
+               return;
+
        bl_pwm_cntl = REG_READ(BL_PWM_CNTL);
 
        /* It must not be 0, so we have to restore them