[PATCH 03/22] drm/amd/display: Add debug option to disable dmcu

Harry Wentland harry.wentland at amd.com
Wed Dec 21 16:29:57 UTC 2016


From: Yongqiang Sun <yongqiang.sun at amd.com>

Change-Id: I5b27513237c6cc9a2fee239a6a77339f3acf962c
Signed-off-by: Yongqiang Sun <yongqiang.sun at amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng at amd.com>
Acked-by: Harry Wentland <Harry.Wentland at amd.com>
---
 drivers/gpu/drm/amd/display/dc/dc.h                   | 1 +
 drivers/gpu/drm/amd/display/dc/dce/dce_link_encoder.c | 3 +++
 2 files changed, 4 insertions(+)

diff --git a/drivers/gpu/drm/amd/display/dc/dc.h b/drivers/gpu/drm/amd/display/dc/dc.h
index 4cb194831504..c7905b367d65 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 c73d6054cdda..a8a2290d47db 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
-- 
2.9.3



More information about the amd-gfx mailing list