summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/display/dc/dcn20
diff options
context:
space:
mode:
authorPaul Hsieh2019-05-07 11:58:58 +0200
committerAlex Deucher2019-06-22 16:34:07 +0200
commit98b5b65eb8b7136489ba42ae4598f5ed799fa936 (patch)
treec5dc612ac2c36d062c6c582ec0e4d53026bfd769 /drivers/gpu/drm/amd/display/dc/dcn20
parentdrm/amd/display: Ensure DRR triggers in BP (diff)
downloadkernel-qcow2-linux-98b5b65eb8b7136489ba42ae4598f5ed799fa936.tar.gz
kernel-qcow2-linux-98b5b65eb8b7136489ba42ae4598f5ed799fa936.tar.xz
kernel-qcow2-linux-98b5b65eb8b7136489ba42ae4598f5ed799fa936.zip
drm/amd/display: disable PSR/ABM before destroy DMCU struct
[Why] 1. DMCU is not running on some platform but driver still send ABM command. It may cause assert due to DMCU is not alive. 2. To make sure PSR disable when driver disable [How] 1. Add dmcu_is_running in ABM struct, driver can check this flag to determine driver should send ABM command or not. 2. Send PSR disable command when destroy PSR Signed-off-by: Paul Hsieh <paul.hsieh@amd.com> Reviewed-by: Anthony Koo <Anthony.Koo@amd.com> Acked-by: Leo Li <sunpeng.li@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/display/dc/dcn20')
-rw-r--r--drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c
index 5bed89547410..2a34447112e9 100644
--- a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c
+++ b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c
@@ -657,6 +657,9 @@ static void dcn20_init_hw(struct dc *dc)
if (dmcu != NULL)
dmcu->funcs->dmcu_init(dmcu);
+ if (abm != NULL && dmcu != NULL)
+ abm->dmcu_is_running = dmcu->funcs->is_dmcu_initialized(dmcu);
+
/* power AFMT HDMI memory TODO: may move to dis/en output save power*/
REG_WRITE(DIO_MEM_PWR_CTRL, 0);