Skip to content

Commit

Permalink
drm/r600: fix rptr address along lines of previous fixes to radeon.
Browse files Browse the repository at this point in the history
Signed-off-by: Dave Airlie <airlied@redhat.com>
  • Loading branch information
Dave Airlie committed Mar 13, 2009
1 parent eb1d919 commit a7d13ad
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions drivers/gpu/drm/radeon/r600_cp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1689,18 +1689,12 @@ static void r600_cp_init_ring_buffer(struct drm_device *dev,
} else
#endif
{
struct drm_sg_mem *entry = dev->sg;
unsigned long tmp_ofs, page_ofs;

tmp_ofs = dev_priv->ring_rptr->offset -
(unsigned long)dev->sg->virtual;
page_ofs = tmp_ofs >> PAGE_SHIFT;
RADEON_WRITE(R600_CP_RB_RPTR_ADDR,
dev_priv->ring_rptr->offset
- ((unsigned long) dev->sg->virtual)
+ dev_priv->gart_vm_start);

RADEON_WRITE(R600_CP_RB_RPTR_ADDR, entry->busaddr[page_ofs] >> 8);
RADEON_WRITE(R600_CP_RB_RPTR_ADDR_HI, 0);
DRM_DEBUG("ring rptr: offset=0x%08lx handle=0x%08lx\n",
(unsigned long)entry->busaddr[page_ofs],
entry->handle + tmp_ofs);
}

#ifdef __BIG_ENDIAN
Expand Down

0 comments on commit a7d13ad

Please sign in to comment.