public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Ben Widawsky <ben@bwidawsk.net>
To: intel-gfx@lists.freedesktop.org
Cc: Ben Widawsky <ben@bwidawsk.net>,
	Ben Widawsky <benjamin.widawsky@intel.com>
Subject: [PATCH 7/9] drm/i915: [sparse] forced __iomem ringbuffer fixes
Date: Mon, 16 Apr 2012 14:07:46 -0700	[thread overview]
Message-ID: <1334610468-9274-8-git-send-email-ben@bwidawsk.net> (raw)
In-Reply-To: <1334610468-9274-1-git-send-email-ben@bwidawsk.net>

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@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

  parent reply	other threads:[~2012-04-16 21:09 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-16 21:07 [PATCH 0/9] i915 fixes for sparse warnings Ben Widawsky
2012-04-16 21:07 ` [PATCH 1/9] drm/i915: [sparse] trivial sparse fixes Ben Widawsky
2012-04-16 21:13   ` Chris Wilson
2012-04-16 21:07 ` [PATCH 2/9] drm/i915: [sparse] don't use variable size arrays Ben Widawsky
2012-04-18  1:39   ` Paulo Zanoni
2012-04-18  2:20     ` Ben Widawsky
2012-04-18  9:05       ` Daniel Vetter
2012-04-16 21:07 ` [PATCH 3/9] drm/i915: [sparse] __iomem fixes for opregion Ben Widawsky
2012-04-16 21:07 ` [PATCH 4/9] drm/i915: [sparse] __iomem fixes for overlay Ben Widawsky
2012-04-16 21:07 ` [PATCH 5/9] drm/i915: [sparse] __iomem fixes for debugfs Ben Widawsky
2012-04-16 21:07 ` [PATCH 6/9] drm/i915: [sparse] __iomem fixes for ringbuffer Ben Widawsky
2012-04-16 21:28   ` Chris Wilson
2012-04-16 21:07 ` Ben Widawsky [this message]
2012-04-16 21:07 ` [PATCH 8/9] drm/i915: [sparse] __iomem fixes for gem Ben Widawsky
2012-04-16 21:07 ` [PATCH 9/9] drm/i915: [sparse] __iomem fixes for intel_bios Ben Widawsky
2012-04-21 20:59 ` [PATCH 0/9] i915 fixes for sparse warnings Daniel Vetter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1334610468-9274-8-git-send-email-ben@bwidawsk.net \
    --to=ben@bwidawsk.net \
    --cc=benjamin.widawsky@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox