diff options
author | Christian König <deathsimple@vodafone.de> | 2012-05-09 17:34:49 +0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2012-05-09 20:22:31 +0400 |
commit | dd8bea2111ab80ecb640183d00c383e03554509d (patch) | |
tree | d8aaab132b65d5a14fea7f1084c9a2b806a10395 /drivers/gpu/drm/radeon/radeon_ring.c | |
parent | 8a47cc9ec1249eefd600adb273148c62879a560d (diff) | |
download | linux-dd8bea2111ab80ecb640183d00c383e03554509d.tar.xz |
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_ring.c')
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_ring.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_ring.c b/drivers/gpu/drm/radeon/radeon_ring.c index 2fdc8c35f87c..116be5e83141 100644 --- a/drivers/gpu/drm/radeon/radeon_ring.c +++ b/drivers/gpu/drm/radeon/radeon_ring.c @@ -127,10 +127,8 @@ retry: size, 256); if (!r) { *ib = &rdev->ib_pool.ibs[idx]; - (*ib)->ptr = rdev->ib_pool.sa_manager.cpu_ptr; - (*ib)->ptr += ((*ib)->sa_bo.offset >> 2); - (*ib)->gpu_addr = rdev->ib_pool.sa_manager.gpu_addr; - (*ib)->gpu_addr += (*ib)->sa_bo.offset; + (*ib)->ptr = radeon_sa_bo_cpu_addr(&(*ib)->sa_bo); + (*ib)->gpu_addr = radeon_sa_bo_gpu_addr(&(*ib)->sa_bo); (*ib)->fence = fence; (*ib)->vm_id = 0; (*ib)->is_const_ib = false; |