diff options
author | Andi Kleen <ak@linux.intel.com> | 2011-10-13 19:08:42 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2011-10-18 04:55:05 -0400 |
commit | 6fcbef7a50b2f618376b65845a92cde3efc4a131 (patch) | |
tree | b354c4a7d32ae53d08deda69be293e70f7467a36 /drivers/gpu/drm/radeon/r100.c | |
parent | ce580fab739c815e25d13bae62f96ba7251f6e2e (diff) |
drm/radeon: Move r100_*_*reg out of line
This shrinks the sizes of a lot of functions in the radeon driver
dramatically.
With a non force inline + -Os kernel this is default anyways.
Cc: David Airlie <airlied@linux.ie>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
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.c | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/drivers/gpu/drm/radeon/r100.c b/drivers/gpu/drm/radeon/r100.c index 13c0169e70ac..e108f265882a 100644 --- a/drivers/gpu/drm/radeon/r100.c +++ b/drivers/gpu/drm/radeon/r100.c | |||
@@ -4072,3 +4072,43 @@ int r100_init(struct radeon_device *rdev) | |||
4072 | } | 4072 | } |
4073 | return 0; | 4073 | return 0; |
4074 | } | 4074 | } |
4075 | |||
4076 | uint32_t r100_mm_rreg(struct radeon_device *rdev, uint32_t reg) | ||
4077 | { | ||
4078 | if (reg < rdev->rmmio_size) | ||
4079 | return readl(((void __iomem *)rdev->rmmio) + reg); | ||
4080 | else { | ||
4081 | writel(reg, ((void __iomem *)rdev->rmmio) + RADEON_MM_INDEX); | ||
4082 | return readl(((void __iomem *)rdev->rmmio) + RADEON_MM_DATA); | ||
4083 | } | ||
4084 | } | ||
4085 | |||
4086 | void r100_mm_wreg(struct radeon_device *rdev, uint32_t reg, uint32_t v) | ||
4087 | { | ||
4088 | if (reg < rdev->rmmio_size) | ||
4089 | writel(v, ((void __iomem *)rdev->rmmio) + reg); | ||
4090 | else { | ||
4091 | writel(reg, ((void __iomem *)rdev->rmmio) + RADEON_MM_INDEX); | ||
4092 | writel(v, ((void __iomem *)rdev->rmmio) + RADEON_MM_DATA); | ||
4093 | } | ||
4094 | } | ||
4095 | |||
4096 | u32 r100_io_rreg(struct radeon_device *rdev, u32 reg) | ||
4097 | { | ||
4098 | if (reg < rdev->rio_mem_size) | ||
4099 | return ioread32(rdev->rio_mem + reg); | ||
4100 | else { | ||
4101 | iowrite32(reg, rdev->rio_mem + RADEON_MM_INDEX); | ||
4102 | return ioread32(rdev->rio_mem + RADEON_MM_DATA); | ||
4103 | } | ||
4104 | } | ||
4105 | |||
4106 | void r100_io_wreg(struct radeon_device *rdev, u32 reg, u32 v) | ||
4107 | { | ||
4108 | if (reg < rdev->rio_mem_size) | ||
4109 | iowrite32(v, rdev->rio_mem + reg); | ||
4110 | else { | ||
4111 | iowrite32(reg, rdev->rio_mem + RADEON_MM_INDEX); | ||
4112 | iowrite32(v, rdev->rio_mem + RADEON_MM_DATA); | ||
4113 | } | ||
4114 | } | ||