diff options
author | Ivan Kokshaysky <ink@jurassic.park.msu.ru> | 2005-10-26 11:05:25 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-10-26 10:46:19 -0700 |
commit | b0917bd912d3708c50e1df1b5e1648d0547108a3 (patch) | |
tree | 3e96b8ca817eb6be2a2751167bb879d0b3350b80 /drivers/char/drm/radeon_cp.c | |
parent | 4bcde03d41d2264edb4ea3c47cb27da1e2609e48 (diff) | |
download | kernel_samsung_smdk4412-b0917bd912d3708c50e1df1b5e1648d0547108a3.zip kernel_samsung_smdk4412-b0917bd912d3708c50e1df1b5e1648d0547108a3.tar.gz kernel_samsung_smdk4412-b0917bd912d3708c50e1df1b5e1648d0547108a3.tar.bz2 |
[PATCH] fix radeon_cp_init_ring_buffer()
I've seen similar failure on alpha.
Obviously, someone forgot to convert sg->handle stuff for
PCI gart case.
Signed-off-by: Dave Airlie <airlied@linux.ie>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/char/drm/radeon_cp.c')
-rw-r--r-- | drivers/char/drm/radeon_cp.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/char/drm/radeon_cp.c b/drivers/char/drm/radeon_cp.c index 6d9080a..12ef13f 100644 --- a/drivers/char/drm/radeon_cp.c +++ b/drivers/char/drm/radeon_cp.c @@ -1133,10 +1133,10 @@ static void radeon_cp_init_ring_buffer( drm_device_t *dev, ring_start = (dev_priv->cp_ring->offset - dev->agp->base + dev_priv->gart_vm_start); - } else + } else #endif ring_start = (dev_priv->cp_ring->offset - - dev->sg->handle + - (unsigned long)dev->sg->virtual + dev_priv->gart_vm_start); RADEON_WRITE( RADEON_CP_RB_BASE, ring_start ); @@ -1164,7 +1164,8 @@ static void radeon_cp_init_ring_buffer( drm_device_t *dev, drm_sg_mem_t *entry = dev->sg; unsigned long tmp_ofs, page_ofs; - tmp_ofs = dev_priv->ring_rptr->offset - dev->sg->handle; + tmp_ofs = dev_priv->ring_rptr->offset - + (unsigned long)dev->sg->virtual; page_ofs = tmp_ofs >> PAGE_SHIFT; RADEON_WRITE( RADEON_CP_RB_RPTR_ADDR, @@ -1491,8 +1492,8 @@ static int radeon_do_init_cp( drm_device_t *dev, drm_radeon_init_t *init ) else #endif dev_priv->gart_buffers_offset = (dev->agp_buffer_map->offset - - dev->sg->handle - + dev_priv->gart_vm_start); + - (unsigned long)dev->sg->virtual + + dev_priv->gart_vm_start); DRM_DEBUG( "dev_priv->gart_size %d\n", dev_priv->gart_size ); |