summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd
diff options
context:
space:
mode:
authorPaul Hsieh2019-05-03 17:50:10 +0200
committerGreg Kroah-Hartman2019-07-31 07:26:58 +0200
commit6b1d2871fe369cb65f087cd300bad6af50764ac7 (patch)
treee1388216733e429ba7cf44d1eaed009cb57c891c /drivers/gpu/drm/amd
parentdrm/amdgpu/sriov: Need to initialize the HDP_NONSURFACE_BAStE (diff)
downloadkernel-qcow2-linux-6b1d2871fe369cb65f087cd300bad6af50764ac7.tar.gz
kernel-qcow2-linux-6b1d2871fe369cb65f087cd300bad6af50764ac7.tar.xz
kernel-qcow2-linux-6b1d2871fe369cb65f087cd300bad6af50764ac7.zip
drm/amd/display: Disable ABM before destroy ABM struct
[ Upstream commit 1090d58d4815b1fcd95a80987391006c86398b4c ] [Why] When disable driver, OS will set backlight optimization then do stop device. But this flag will cause driver to enable ABM when driver disabled. [How] Send ABM disable command before destroy ABM construct Signed-off-by: Paul Hsieh <paul.hsieh@amd.com> Reviewed-by: Anthony Koo <Anthony.Koo@amd.com> Acked-by: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/gpu/drm/amd')
-rw-r--r--drivers/gpu/drm/amd/display/dc/dce/dce_abm.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/dce/dce_abm.c b/drivers/gpu/drm/amd/display/dc/dce/dce_abm.c
index 29294db1a96b..070ab56a8aca 100644
--- a/drivers/gpu/drm/amd/display/dc/dce/dce_abm.c
+++ b/drivers/gpu/drm/amd/display/dc/dce/dce_abm.c
@@ -474,6 +474,8 @@ void dce_abm_destroy(struct abm **abm)
{
struct dce_abm *abm_dce = TO_DCE_ABM(*abm);
+ abm_dce->base.funcs->set_abm_immediate_disable(*abm);
+
kfree(abm_dce);
*abm = NULL;
}