aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon/r100.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2009-08-12 04:43:14 -0400
committerDave Airlie <airlied@redhat.com>2009-08-15 18:36:34 -0400
commitde1b28989edff519d0548ebaa3f94fd3d1524cf2 (patch)
treeea8bed0a409ced13c31ff68c62cf89e2b4cfd8b8 /drivers/gpu/drm/radeon/r100.c
parent7ed220d738cf16adff6bc3b31ad25b8848a2fa9c (diff)
drm/radeon/kms: cut down indirects in register accesses.
We really don't want to be doing all these indirects, updating the GPU gart table is something we do often so the less overhead the better. Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/r100.c')
-rw-r--r--drivers/gpu/drm/radeon/r100.c20
1 files changed, 0 insertions, 20 deletions
diff --git a/drivers/gpu/drm/radeon/r100.c b/drivers/gpu/drm/radeon/r100.c
index e1a6e82b9960..90ff8e0ac04e 100644
--- a/drivers/gpu/drm/radeon/r100.c
+++ b/drivers/gpu/drm/radeon/r100.c
@@ -1622,26 +1622,6 @@ void r100_pll_wreg(struct radeon_device *rdev, uint32_t reg, uint32_t v)
1622 r100_pll_errata_after_data(rdev); 1622 r100_pll_errata_after_data(rdev);
1623} 1623}
1624 1624
1625uint32_t r100_mm_rreg(struct radeon_device *rdev, uint32_t reg)
1626{
1627 if (reg < 0x10000)
1628 return readl(((void __iomem *)rdev->rmmio) + reg);
1629 else {
1630 writel(reg, ((void __iomem *)rdev->rmmio) + RADEON_MM_INDEX);
1631 return readl(((void __iomem *)rdev->rmmio) + RADEON_MM_DATA);
1632 }
1633}
1634
1635void r100_mm_wreg(struct radeon_device *rdev, uint32_t reg, uint32_t v)
1636{
1637 if (reg < 0x10000)
1638 writel(v, ((void __iomem *)rdev->rmmio) + reg);
1639 else {
1640 writel(reg, ((void __iomem *)rdev->rmmio) + RADEON_MM_INDEX);
1641 writel(v, ((void __iomem *)rdev->rmmio) + RADEON_MM_DATA);
1642 }
1643}
1644
1645int r100_init(struct radeon_device *rdev) 1625int r100_init(struct radeon_device *rdev)
1646{ 1626{
1647 return 0; 1627 return 0;