aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Deucher2013-04-10 18:08:14 -0500
committerGreg Kroah-Hartman2013-05-11 15:54:06 -0500
commit9c0050b0d778d326be83d5f57dcaa2af98810eff (patch)
tree170f5914a10f2978de5ad97f20f3a5ee91f098b5
parentf404959ea072d99e46557bd197ff7b01d3ec718d (diff)
downloadkernel-omap-9c0050b0d778d326be83d5f57dcaa2af98810eff.tar.gz
kernel-omap-9c0050b0d778d326be83d5f57dcaa2af98810eff.tar.xz
kernel-omap-9c0050b0d778d326be83d5f57dcaa2af98810eff.zip
drm/radeon: disable the crtcs in mc_stop (evergreen+) (v2)
commit abf1457bbbe4c62066bd03c6d31837dea28644dc upstream. 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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-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 82d855f9a013..4078f25fad72 100644
--- a/drivers/gpu/drm/radeon/evergreen.c
+++ b/drivers/gpu/drm/radeon/evergreen.c
@@ -1353,6 +1353,7 @@ void evergreen_mc_stop(struct radeon_device *rdev, struct evergreen_mc_save *sav
1353 tmp = RREG32(EVERGREEN_CRTC_BLANK_CONTROL + crtc_offsets[i]); 1353 tmp = RREG32(EVERGREEN_CRTC_BLANK_CONTROL + crtc_offsets[i]);
1354 if (!(tmp & EVERGREEN_CRTC_BLANK_DATA_EN)) { 1354 if (!(tmp & EVERGREEN_CRTC_BLANK_DATA_EN)) {
1355 radeon_wait_for_vblank(rdev, i); 1355 radeon_wait_for_vblank(rdev, i);
1356 WREG32(EVERGREEN_CRTC_UPDATE_LOCK + crtc_offsets[i], 1);
1356 tmp |= EVERGREEN_CRTC_BLANK_DATA_EN; 1357 tmp |= EVERGREEN_CRTC_BLANK_DATA_EN;
1357 WREG32(EVERGREEN_CRTC_BLANK_CONTROL + crtc_offsets[i], tmp); 1358 WREG32(EVERGREEN_CRTC_BLANK_CONTROL + crtc_offsets[i], tmp);
1358 } 1359 }
@@ -1360,8 +1361,10 @@ void evergreen_mc_stop(struct radeon_device *rdev, struct evergreen_mc_save *sav
1360 tmp = RREG32(EVERGREEN_CRTC_CONTROL + crtc_offsets[i]); 1361 tmp = RREG32(EVERGREEN_CRTC_CONTROL + crtc_offsets[i]);
1361 if (!(tmp & EVERGREEN_CRTC_DISP_READ_REQUEST_DISABLE)) { 1362 if (!(tmp & EVERGREEN_CRTC_DISP_READ_REQUEST_DISABLE)) {
1362 radeon_wait_for_vblank(rdev, i); 1363 radeon_wait_for_vblank(rdev, i);
1364 WREG32(EVERGREEN_CRTC_UPDATE_LOCK + crtc_offsets[i], 1);
1363 tmp |= EVERGREEN_CRTC_DISP_READ_REQUEST_DISABLE; 1365 tmp |= EVERGREEN_CRTC_DISP_READ_REQUEST_DISABLE;
1364 WREG32(EVERGREEN_CRTC_CONTROL + crtc_offsets[i], tmp); 1366 WREG32(EVERGREEN_CRTC_CONTROL + crtc_offsets[i], tmp);
1367 WREG32(EVERGREEN_CRTC_UPDATE_LOCK + crtc_offsets[i], 0);
1365 } 1368 }
1366 } 1369 }
1367 /* wait for the next frame */ 1370 /* wait for the next frame */
@@ -1371,6 +1374,15 @@ void evergreen_mc_stop(struct radeon_device *rdev, struct evergreen_mc_save *sav
1371 break; 1374 break;
1372 udelay(1); 1375 udelay(1);
1373 } 1376 }
1377
1378 /* XXX this is a hack to avoid strange behavior with EFI on certain systems */
1379 WREG32(EVERGREEN_CRTC_UPDATE_LOCK + crtc_offsets[i], 1);
1380 tmp = RREG32(EVERGREEN_CRTC_CONTROL + crtc_offsets[i]);
1381 tmp &= ~EVERGREEN_CRTC_MASTER_EN;
1382 WREG32(EVERGREEN_CRTC_CONTROL + crtc_offsets[i], tmp);
1383 WREG32(EVERGREEN_CRTC_UPDATE_LOCK + crtc_offsets[i], 0);
1384 save->crtc_enabled[i] = false;
1385 /* ***** */
1374 } else { 1386 } else {
1375 save->crtc_enabled[i] = false; 1387 save->crtc_enabled[i] = false;
1376 } 1388 }