summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLewis Huang <Lewis.Huang@amd.com>2019-07-22 15:23:32 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-10-07 18:58:56 +0200
commit97641efe039e316fd33da888d2da31fe7165b063 (patch)
treedb8028d602bf2c2ca351fecd871469393e2c9ff3
parent075ad48409c18bb88058a24f94b48f508cd8b578 (diff)
downloadlinux-stable-97641efe039e316fd33da888d2da31fe7165b063.tar.gz
linux-stable-97641efe039e316fd33da888d2da31fe7165b063.tar.bz2
linux-stable-97641efe039e316fd33da888d2da31fe7165b063.zip
drm/amd/display: reprogram VM config when system resume
[ Upstream commit e5382701c3520b3ed66169a6e4aa6ce5df8c56e0 ] [Why] The vm config will be clear to 0 when system enter S4. It will cause hubbub didn't know how to fetch data when system resume. The flip always pending because earliest_inuse_address and request_address are different. [How] Reprogram VM config when system resume Signed-off-by: Lewis Huang <Lewis.Huang@amd.com> Reviewed-by: Jun Lei <Jun.Lei@amd.com> Acked-by: Eric Yang <eric.yang2@amd.com> Acked-by: Leo Li <sunpeng.li@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r--drivers/gpu/drm/amd/display/dc/core/dc.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c b/drivers/gpu/drm/amd/display/dc/core/dc.c
index 0a7adc2925e3..191f5757ded1 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc.c
@@ -2016,6 +2016,14 @@ void dc_set_power_state(
dc_resource_state_construct(dc, dc->current_state);
dc->hwss.init_hw(dc);
+
+#ifdef CONFIG_DRM_AMD_DC_DCN2_0
+ if (dc->hwss.init_sys_ctx != NULL &&
+ dc->vm_pa_config.valid) {
+ dc->hwss.init_sys_ctx(dc->hwseq, dc, &dc->vm_pa_config);
+ }
+#endif
+
break;
default:
ASSERT(dc->current_state->stream_count == 0);