diff options
author | Dave Airlie <airlied@redhat.com> | 2009-02-25 19:15:24 -0500 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2009-03-13 00:24:16 -0400 |
commit | a7d13ad0e2c1b0572492fd53ca1a090794e2f8e2 (patch) | |
tree | 02bc31289c61385a02ea173226f23eaf05ed09e6 /drivers/gpu/drm/radeon/r600_cp.c | |
parent | eb1d91954ededc00ddcfb51e2626f114ff351524 (diff) |
drm/r600: fix rptr address along lines of previous fixes to radeon.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/r600_cp.c')
-rw-r--r-- | drivers/gpu/drm/radeon/r600_cp.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/drivers/gpu/drm/radeon/r600_cp.c b/drivers/gpu/drm/radeon/r600_cp.c index 54ea867c4c66..37249b26f836 100644 --- a/drivers/gpu/drm/radeon/r600_cp.c +++ b/drivers/gpu/drm/radeon/r600_cp.c | |||
@@ -1689,18 +1689,12 @@ static void r600_cp_init_ring_buffer(struct drm_device *dev, | |||
1689 | } else | 1689 | } else |
1690 | #endif | 1690 | #endif |
1691 | { | 1691 | { |
1692 | struct drm_sg_mem *entry = dev->sg; | 1692 | RADEON_WRITE(R600_CP_RB_RPTR_ADDR, |
1693 | unsigned long tmp_ofs, page_ofs; | 1693 | dev_priv->ring_rptr->offset |
1694 | 1694 | - ((unsigned long) dev->sg->virtual) | |
1695 | tmp_ofs = dev_priv->ring_rptr->offset - | 1695 | + dev_priv->gart_vm_start); |
1696 | (unsigned long)dev->sg->virtual; | ||
1697 | page_ofs = tmp_ofs >> PAGE_SHIFT; | ||
1698 | 1696 | ||
1699 | RADEON_WRITE(R600_CP_RB_RPTR_ADDR, entry->busaddr[page_ofs] >> 8); | ||
1700 | RADEON_WRITE(R600_CP_RB_RPTR_ADDR_HI, 0); | 1697 | RADEON_WRITE(R600_CP_RB_RPTR_ADDR_HI, 0); |
1701 | DRM_DEBUG("ring rptr: offset=0x%08lx handle=0x%08lx\n", | ||
1702 | (unsigned long)entry->busaddr[page_ofs], | ||
1703 | entry->handle + tmp_ofs); | ||
1704 | } | 1698 | } |
1705 | 1699 | ||
1706 | #ifdef __BIG_ENDIAN | 1700 | #ifdef __BIG_ENDIAN |