From: Yongqiang Sun Date: Thu, 15 Dec 2016 15:50:48 +0000 (-0500) Subject: drm/amd/display: Add debug option to disable dmcu X-Git-Tag: v4.15-rc1~56^2~23^2~850 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=aa66df58b2f272dad459c9f02fa3718d844b9fc6;p=thirdparty%2Fkernel%2Flinux.git drm/amd/display: Add debug option to disable dmcu Signed-off-by: Yongqiang Sun Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/display/dc/dc.h b/drivers/gpu/drm/amd/display/dc/dc.h index aeb0c3be24d69..36f1c96605e81 100644 --- a/drivers/gpu/drm/amd/display/dc/dc.h +++ b/drivers/gpu/drm/amd/display/dc/dc.h @@ -147,6 +147,7 @@ struct dc_debug { bool disable_dfs_bypass; bool disable_power_gate; bool disable_clock_gate; + bool disable_dmcu; }; struct dc { diff --git a/drivers/gpu/drm/amd/display/dc/dce/dce_link_encoder.c b/drivers/gpu/drm/amd/display/dc/dce/dce_link_encoder.c index c73d6054cdda1..a8a2290d47db2 100644 --- a/drivers/gpu/drm/amd/display/dc/dce/dce_link_encoder.c +++ b/drivers/gpu/drm/amd/display/dc/dce/dce_link_encoder.c @@ -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