diff options
author | Paul Hsieh <paul.hsieh@amd.com> | 2019-05-03 18:50:10 +0300 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2019-05-24 20:21:00 +0300 |
commit | 1090d58d4815b1fcd95a80987391006c86398b4c (patch) | |
tree | 3257bc4dbd39b89d1f1bd06d2e89cb1cbeb20e3a /drivers/gpu/drm/amd/display/dc/dce/dce_abm.c | |
parent | ccd76ebce4e8e1e19df19bc7024355a1f82a9363 (diff) | |
download | linux-1090d58d4815b1fcd95a80987391006c86398b4c.tar.xz |
drm/amd/display: Disable ABM before destroy ABM struct
[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>
Diffstat (limited to 'drivers/gpu/drm/amd/display/dc/dce/dce_abm.c')
-rw-r--r-- | drivers/gpu/drm/amd/display/dc/dce/dce_abm.c | 2 |
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 da96229db53a..2959c3c9390b 100644 --- a/drivers/gpu/drm/amd/display/dc/dce/dce_abm.c +++ b/drivers/gpu/drm/amd/display/dc/dce/dce_abm.c @@ -473,6 +473,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; } |