aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon/evergreen.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/radeon/evergreen.c')
-rw-r--r--drivers/gpu/drm/radeon/evergreen.c12
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 }