diff options
author | Alex Deucher <alexander.deucher@amd.com> | 2013-04-10 19:08:14 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2013-04-22 10:39:10 -0400 |
commit | abf1457bbbe4c62066bd03c6d31837dea28644dc (patch) | |
tree | d5bba74ba02b93281e704d4a1cdf63788c8327a5 /drivers/gpu/drm/radeon/evergreen.c | |
parent | e884fc640ccbdb6f94b9bdb57cfb8464b6688f4c (diff) |
drm/radeon: disable the crtcs in mc_stop (evergreen+) (v2)
Just disabling the mem requests should be enough, but
that doesn't seem to work correctly on efi systems.
May fix:
https://bugs.freedesktop.org/show_bug.cgi?id=57567
https://bugs.freedesktop.org/show_bug.cgi?id=43655
https://bugzilla.kernel.org/show_bug.cgi?id=56441
v2: blank displays first, then disable.
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
Diffstat (limited to 'drivers/gpu/drm/radeon/evergreen.c')
-rw-r--r-- | drivers/gpu/drm/radeon/evergreen.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/gpu/drm/radeon/evergreen.c b/drivers/gpu/drm/radeon/evergreen.c index 42111e6b5282..d425a4fa0109 100644 --- a/drivers/gpu/drm/radeon/evergreen.c +++ b/drivers/gpu/drm/radeon/evergreen.c | |||
@@ -1574,6 +1574,7 @@ void evergreen_mc_stop(struct radeon_device *rdev, struct evergreen_mc_save *sav | |||
1574 | tmp = RREG32(EVERGREEN_CRTC_BLANK_CONTROL + crtc_offsets[i]); | 1574 | tmp = RREG32(EVERGREEN_CRTC_BLANK_CONTROL + crtc_offsets[i]); |
1575 | if (!(tmp & EVERGREEN_CRTC_BLANK_DATA_EN)) { | 1575 | if (!(tmp & EVERGREEN_CRTC_BLANK_DATA_EN)) { |
1576 | radeon_wait_for_vblank(rdev, i); | 1576 | radeon_wait_for_vblank(rdev, i); |
1577 | WREG32(EVERGREEN_CRTC_UPDATE_LOCK + crtc_offsets[i], 1); | ||
1577 | tmp |= EVERGREEN_CRTC_BLANK_DATA_EN; | 1578 | tmp |= EVERGREEN_CRTC_BLANK_DATA_EN; |
1578 | WREG32(EVERGREEN_CRTC_BLANK_CONTROL + crtc_offsets[i], tmp); | 1579 | WREG32(EVERGREEN_CRTC_BLANK_CONTROL + crtc_offsets[i], tmp); |
1579 | } | 1580 | } |
@@ -1581,8 +1582,10 @@ void evergreen_mc_stop(struct radeon_device *rdev, struct evergreen_mc_save *sav | |||
1581 | tmp = RREG32(EVERGREEN_CRTC_CONTROL + crtc_offsets[i]); | 1582 | tmp = RREG32(EVERGREEN_CRTC_CONTROL + crtc_offsets[i]); |
1582 | if (!(tmp & EVERGREEN_CRTC_DISP_READ_REQUEST_DISABLE)) { | 1583 | if (!(tmp & EVERGREEN_CRTC_DISP_READ_REQUEST_DISABLE)) { |
1583 | radeon_wait_for_vblank(rdev, i); | 1584 | radeon_wait_for_vblank(rdev, i); |
1585 | WREG32(EVERGREEN_CRTC_UPDATE_LOCK + crtc_offsets[i], 1); | ||
1584 | tmp |= EVERGREEN_CRTC_DISP_READ_REQUEST_DISABLE; | 1586 | tmp |= EVERGREEN_CRTC_DISP_READ_REQUEST_DISABLE; |
1585 | WREG32(EVERGREEN_CRTC_CONTROL + crtc_offsets[i], tmp); | 1587 | WREG32(EVERGREEN_CRTC_CONTROL + crtc_offsets[i], tmp); |
1588 | WREG32(EVERGREEN_CRTC_UPDATE_LOCK + crtc_offsets[i], 0); | ||
1586 | } | 1589 | } |
1587 | } | 1590 | } |
1588 | /* wait for the next frame */ | 1591 | /* wait for the next frame */ |
@@ -1592,6 +1595,15 @@ void evergreen_mc_stop(struct radeon_device *rdev, struct evergreen_mc_save *sav | |||
1592 | break; | 1595 | break; |
1593 | udelay(1); | 1596 | udelay(1); |
1594 | } | 1597 | } |
1598 | |||
1599 | /* XXX this is a hack to avoid strange behavior with EFI on certain systems */ | ||
1600 | WREG32(EVERGREEN_CRTC_UPDATE_LOCK + crtc_offsets[i], 1); | ||
1601 | tmp = RREG32(EVERGREEN_CRTC_CONTROL + crtc_offsets[i]); | ||
1602 | tmp &= ~EVERGREEN_CRTC_MASTER_EN; | ||
1603 | WREG32(EVERGREEN_CRTC_CONTROL + crtc_offsets[i], tmp); | ||
1604 | WREG32(EVERGREEN_CRTC_UPDATE_LOCK + crtc_offsets[i], 0); | ||
1605 | save->crtc_enabled[i] = false; | ||
1606 | /* ***** */ | ||
1595 | } else { | 1607 | } else { |
1596 | save->crtc_enabled[i] = false; | 1608 | save->crtc_enabled[i] = false; |
1597 | } | 1609 | } |