diff options
author | Dave Airlie <airlied@linux.ie> | 2009-08-07 11:03:26 +1000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2009-08-07 20:33:11 +1000 |
commit | 17332925d7b11bb6c2d0c49450ae58dd836005da (patch) | |
tree | c18ee8bee50c211f3e6a8e391f1c771ac16bd510 /drivers/gpu | |
parent | 985fe845aea9cd56fd351800302270444556e45a (diff) | |
download | linux-stable-17332925d7b11bb6c2d0c49450ae58dd836005da.tar.gz linux-stable-17332925d7b11bb6c2d0c49450ae58dd836005da.tar.bz2 linux-stable-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>
Diffstat (limited to 'drivers/gpu')
-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", |