aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/radeon/radeon_ring.c
diff options
context:
space:
mode:
authorChristian König <deathsimple@vodafone.de>2012-09-11 16:09:59 +0200
committerAlex Deucher <alexander.deucher@amd.com>2012-09-20 13:10:42 -0400
commitca19f21ece0ad96c77f45a01c43f3bb582f1a35c (patch)
tree0b0f5da266221d6a06b87c5affb8ed471b474aff /drivers/gpu/drm/radeon/radeon_ring.c
parent96a5844f90a6d3b1c0cabfe4870e62e7b1cc4640 (diff)
drm/radeon: move IB pool to 1MB offset
Even GPUs can have a null pointer dereference, so move the IB pool to another offset to catch those. Signed-off-by: Christian König <deathsimple@vodafone.de> Reviewed-by: Jerome Glisse <jglisse@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon_ring.c')
-rw-r--r--drivers/gpu/drm/radeon/radeon_ring.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_ring.c b/drivers/gpu/drm/radeon/radeon_ring.c
index 993cf712074..d90b0bc6f07 100644
--- a/drivers/gpu/drm/radeon/radeon_ring.c
+++ b/drivers/gpu/drm/radeon/radeon_ring.c
@@ -79,10 +79,10 @@ int radeon_ib_get(struct radeon_device *rdev, int ring,
ib->ptr = radeon_sa_bo_cpu_addr(ib->sa_bo);
ib->vm = vm;
if (vm) {
- /* ib pool is bind at 0 in virtual address space,
- * so gpu_addr is the offset inside the pool bo
+ /* ib pool is bound at RADEON_VA_IB_OFFSET in virtual address
+ * space and soffset is the offset inside the pool bo
*/
- ib->gpu_addr = ib->sa_bo->soffset;
+ ib->gpu_addr = ib->sa_bo->soffset + RADEON_VA_IB_OFFSET;
} else {
ib->gpu_addr = radeon_sa_bo_gpu_addr(ib->sa_bo);
}