[Intel-gfx] [PATCH 32/37] drm/i915: Mark GTT as iomem and access appropriately
Chris Wilson
chris at chris-wilson.co.uk
Wed Mar 10 23:45:19 CET 2010
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
---
drivers/gpu/drm/i915/i915_dma.c | 4 ++--
drivers/gpu/drm/i915/i915_drv.h | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c
index b63638a..ee9cdfa 100644
--- a/drivers/gpu/drm/i915/i915_dma.c
+++ b/drivers/gpu/drm/i915/i915_dma.c
@@ -1238,7 +1238,7 @@ static int i915_probe_agp(struct drm_device *dev, uint32_t *aperture_size,
static unsigned long i915_gtt_to_phys(struct drm_device *dev,
unsigned long gtt_addr)
{
- unsigned long *gtt;
+ unsigned long __iomem *gtt;
unsigned long entry, phys;
int gtt_bar = IS_I9XX(dev) ? 0 : 1;
int gtt_offset, gtt_size;
@@ -1264,7 +1264,7 @@ static unsigned long i915_gtt_to_phys(struct drm_device *dev,
return 0;
}
- entry = *(volatile u32 *)(gtt + (gtt_addr / 1024));
+ entry = ioread32(gtt + (gtt_addr / 1024));
DRM_DEBUG_DRIVER("GTT addr: 0x%08lx, PTE: 0x%08lx\n", gtt_addr, entry);
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index feeff71..eada25f 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -485,7 +485,7 @@ typedef struct drm_i915_private {
struct {
struct drm_mm gtt_space;
- struct io_mapping *gtt_mapping;
+ struct io_mapping __iomem *gtt_mapping;
int gtt_mtrr;
/**
--
1.7.0
More information about the Intel-gfx
mailing list