aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/radeon/radeon_semaphore.c
diff options
context:
space:
mode:
authorChristian König <deathsimple@vodafone.de>2012-05-09 15:34:49 +0200
committerDave Airlie <airlied@redhat.com>2012-05-09 17:22:31 +0100
commitdd8bea2111ab80ecb640183d00c383e03554509d (patch)
treed8aaab132b65d5a14fea7f1084c9a2b806a10395 /drivers/gpu/drm/radeon/radeon_semaphore.c
parent8a47cc9ec1249eefd600adb273148c62879a560d (diff)
downloadlinux-stericsson-dd8bea2111ab80ecb640183d00c383e03554509d.tar.gz
drm/radeon: use inline functions to calc sa_bo addr
Instead of hacking the calculation multiple times. Signed-off-by: Christian König <deathsimple@vodafone.de> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon_semaphore.c')
-rw-r--r--drivers/gpu/drm/radeon/radeon_semaphore.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_semaphore.c b/drivers/gpu/drm/radeon/radeon_semaphore.c
index c5b3d8ecece9..f312ba59bbe9 100644
--- a/drivers/gpu/drm/radeon/radeon_semaphore.c
+++ b/drivers/gpu/drm/radeon/radeon_semaphore.c
@@ -53,10 +53,8 @@ static int radeon_semaphore_add_bo(struct radeon_device *rdev)
kfree(bo);
return r;
}
- gpu_addr = rdev->ib_pool.sa_manager.gpu_addr;
- gpu_addr += bo->ib->sa_bo.offset;
- cpu_ptr = rdev->ib_pool.sa_manager.cpu_ptr;
- cpu_ptr += (bo->ib->sa_bo.offset >> 2);
+ gpu_addr = radeon_sa_bo_gpu_addr(&bo->ib->sa_bo);
+ cpu_ptr = radeon_sa_bo_cpu_addr(&bo->ib->sa_bo);
for (i = 0; i < (RADEON_SEMAPHORE_BO_SIZE/8); i++) {
bo->semaphores[i].gpu_addr = gpu_addr;
bo->semaphores[i].cpu_ptr = cpu_ptr;