From: Daniel Vetter <daniel@ffwll.ch>
To: Ben Widawsky <ben@bwidawsk.net>
Cc: intel-gfx@lists.freedesktop.org,
Ben Widawsky <benjamin.widawsky@intel.com>
Subject: Re: [PATCH 6/6 v2] drm/i915: Make GSM void
Date: Thu, 20 Dec 2012 16:33:28 +0100 [thread overview]
Message-ID: <20121220153328.GH5737@phenom.ffwll.local> (raw)
In-Reply-To: <20121219192015.GA8902@lundgren>
On Wed, Dec 19, 2012 at 11:20:15AM -0800, Ben Widawsky wrote:
> On Wed, Dec 19, 2012 at 01:45:23PM +0200, Ville Syrjälä wrote:
> > On Tue, Dec 18, 2012 at 10:31:27AM -0800, Ben Widawsky wrote:
> > > The iomapping of the register region has historically been a uint32_t
> > > for the obvious reason that our PTE size was always 4b. In the future
> > > however, we cannot make this assumption.
> > >
> > > By making the type void, it makes the upcoming pointer math we will do
> > > much easier, and hopefully gives the compiler opportunities to warn us
> > > when we do stupid things.
> > >
> > > v2: Cast to __iomem, caught by Ville
> > >
> > > Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
> > > ---
> > > drivers/gpu/drm/i915/i915_drv.h | 2 +-
> > > drivers/gpu/drm/i915/i915_gem_gtt.c | 5 +++--
> > > 2 files changed, 4 insertions(+), 3 deletions(-)
> > >
> > > diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
> > > index 49f465a..90dfbd5 100644
> > > --- a/drivers/gpu/drm/i915/i915_drv.h
> > > +++ b/drivers/gpu/drm/i915/i915_drv.h
> > > @@ -800,7 +800,7 @@ typedef struct drm_i915_private {
> > > unsigned long stolen_base; /* limited to low memory (32-bit) */
> > >
> > > /** "Graphics Stolen Memory" holds the global PTEs */
> > > - uint32_t __iomem *gsm;
> > > + void __iomem *gsm;
> > >
> > > struct io_mapping *gtt_mapping;
> > > phys_addr_t gtt_base_addr;
> > > diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c
> > > index b4c1e34..a52e784 100644
> > > --- a/drivers/gpu/drm/i915/i915_gem_gtt.c
> > > +++ b/drivers/gpu/drm/i915/i915_gem_gtt.c
> > > @@ -290,7 +290,7 @@ void i915_gem_init_ppgtt(struct drm_device *dev)
> > > return;
> > >
> > >
> > > - pd_addr = dev_priv->mm.gsm + ppgtt->pd_offset/sizeof(gtt_pte_t);
> > > + pd_addr = (gtt_pte_t *)dev_priv->mm.gsm + ppgtt->pd_offset/sizeof(gtt_pte_t);
> >
> > This cast is still missing __iomem.
>
> That looks to be correct. But it wasn't introduced by me, right? Ie.
> separate patch to fix it before this one?
Very much, and right in this patch - pd_addr and mm.gsm are both __iomem,
so you need to keep that annotation in the cast from void* to gtt_pte_t *.
Fixed up and the remaining three patches applied.
Thanks, Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
prev parent reply other threads:[~2012-12-20 15:31 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-18 18:31 [PATCH 1/6] drm/i915: BUG() if fences are used on unsupported platform Ben Widawsky
2012-12-18 18:31 ` [PATCH 2/6] drm/i915: Bug on unsupported swizzled platforms Ben Widawsky
2012-12-18 18:31 ` [PATCH 3/6] drm/i915: Missed conversion to gtt_pte_t Ben Widawsky
2012-12-18 21:34 ` Daniel Vetter
2012-12-18 18:31 ` [PATCH 4/6] drm/i915: Move even more gtt code to i915_gem_gtt Ben Widawsky
2012-12-20 11:22 ` Mika Kuoppala
2012-12-18 18:31 ` [PATCH 5/6] drm/i915: Move GSM mapping into dev_priv Ben Widawsky
2012-12-20 12:19 ` Mika Kuoppala
2012-12-18 18:31 ` [PATCH 6/6 v2] drm/i915: Make GSM void Ben Widawsky
2012-12-19 11:45 ` Ville Syrjälä
2012-12-19 19:20 ` Ben Widawsky
2012-12-20 15:33 ` Daniel Vetter [this message]
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=20121220153328.GH5737@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.