[Intel-gfx] [PATCH 7/9] drm/i915: [sparse] forced __iomem ringbuffer fixes
Ben Widawsky
ben at bwidawsk.net
Mon Apr 16 23:07:46 CEST 2012
It should be safe to do this since GEN driver is only ever for x86, an
__iomem and dma mem should be the same. However, these changes caused me
to really think and try multiple solutions. Someone may come along and
decide to do something better with these.
Signed-off-by: Ben Widawsky <benjamin.widawsky at intel.com>
---
drivers/gpu/drm/i915/intel_ringbuffer.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c
index 62e11c5..8a0050f 100644
--- a/drivers/gpu/drm/i915/intel_ringbuffer.c
+++ b/drivers/gpu/drm/i915/intel_ringbuffer.c
@@ -869,7 +869,7 @@ static int init_status_page(struct intel_ring_buffer *ring)
}
ring->status_page.gfx_addr = obj->gtt_offset;
- ring->status_page.page_addr = kmap(obj->pages[0]);
+ ring->status_page.page_addr = (uint32_t __iomem *)kmap(obj->pages[0]);
if (ring->status_page.page_addr == NULL) {
memset(&dev_priv->hws_map, 0, sizeof(dev_priv->hws_map));
goto err_unpin;
@@ -1309,7 +1309,8 @@ int intel_init_render_ring_buffer(struct drm_device *dev)
if (!I915_NEED_GFX_HWS(dev)) {
- ring->status_page.page_addr = dev_priv->status_page_dmah->vaddr;
+ ring->status_page.page_addr =
+ (void __iomem *) dev_priv->status_page_dmah->vaddr;
memset_io(ring->status_page.page_addr, 0, PAGE_SIZE);
}
@@ -1350,7 +1351,8 @@ int intel_render_ring_init_dri(struct drm_device *dev, u64 start, u32 size)
ring->cleanup = render_ring_cleanup;
if (!I915_NEED_GFX_HWS(dev))
- ring->status_page.page_addr = dev_priv->status_page_dmah->vaddr;
+ ring->status_page.page_addr =
+ (void __iomem *) dev_priv->status_page_dmah->vaddr;
ring->dev = dev;
INIT_LIST_HEAD(&ring->active_list);
--
1.7.10
More information about the Intel-gfx
mailing list