diff options
author | Dave Airlie | 2009-08-07 03:03:26 +0200 |
---|---|---|
committer | Dave Airlie | 2009-08-07 12:33:11 +0200 |
commit | 17332925d7b11bb6c2d0c49450ae58dd836005da (patch) | |
tree | c18ee8bee50c211f3e6a8e391f1c771ac16bd510 | |
parent | drm/radeon/kms: Fix caching mode selection for GTT object (diff) | |
download | kernel-qcow2-linux-17332925d7b11bb6c2d0c49450ae58dd836005da.tar.gz kernel-qcow2-linux-17332925d7b11bb6c2d0c49450ae58dd836005da.tar.xz kernel-qcow2-linux-17332925d7b11bb6c2d0c49450ae58dd836005da.zip |
drm/radeon/kms: setup MC/VRAM the same way for suspend/resume
we should align the GTT after VRAM no matter what, as we can
come back from resume and put in a different place and bad things happen.
Signed-off-by: Dave Airlie <airlied@redhat.com>
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_device.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_device.c b/drivers/gpu/drm/radeon/radeon_device.c index a162ade74b7f..9ff6dcb97f9d 100644 --- a/drivers/gpu/drm/radeon/radeon_device.c +++ b/drivers/gpu/drm/radeon/radeon_device.c @@ -152,7 +152,9 @@ int radeon_mc_setup(struct radeon_device *rdev) } } else { rdev->mc.vram_location = 0; - rdev->mc.gtt_location = rdev->mc.mc_vram_size; + tmp = rdev->mc.mc_vram_size; + tmp = (tmp + rdev->mc.gtt_size - 1) & ~(rdev->mc.gtt_size - 1); + rdev->mc.gtt_location = tmp; } DRM_INFO("radeon: VRAM %uM\n", rdev->mc.real_vram_size >> 20); DRM_INFO("radeon: VRAM from 0x%08X to 0x%08X\n", |