drm/radeon: properly handle mc_stop/mc_resume on evergreen+ (v2)
authorAlex Deucher <alexander.deucher@amd.com>
Wed, 15 Aug 2012 21:18:42 +0000 (17:18 -0400)
committerBen Hutchings <ben@decadent.org.uk>
Wed, 17 Oct 2012 02:49:55 +0000 (03:49 +0100)
commitbdaa64973474612383fc8f144646174ddcfd9db6
tree7a5896568f0e55d082c236ed09f95c78f968643e
parent4dcbf47bac95e0b7cb4e6fa5347318117a19b580
drm/radeon: properly handle mc_stop/mc_resume on evergreen+ (v2)

commit 62444b7462a2b98bc78d68736c03a7c4e66ba7e2 upstream.

- Stop the displays from accessing the FB
- Block CPU access
- Turn off MC client access

This should fix issues some users have seen, especially
with UEFI, when changing the MC FB location that result
in hangs or display corruption.

v2: fix crtc enabled check noticed by Luca Tettamanti

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
[bwh: Backported to 3.2:
 - Drop DCE6 cases
 - Call evergreen_mc_wait_for_idle() directly
 - Add dce4_wait_for_vblank() (commits 3ae19b750bdc09ce233e1504348320141593ffda
   and 4a15903db02026728d0cf2755c6fabae16b8db6a) and call it directly
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/gpu/drm/radeon/evergreen.c
drivers/gpu/drm/radeon/evergreen_reg.h
drivers/gpu/drm/radeon/evergreend.h
drivers/gpu/drm/radeon/radeon_asic.h