From: Daniel Vetter <daniel@ffwll.ch>
To: Chris Wilson <chris@chris-wilson.co.uk>,
Daniel Vetter <daniel@ffwll.ch>,
intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 2/2] drm/i915: Request PIN_GLOBAL when pinning a vma for GTT relocations
Date: Tue, 4 Nov 2014 11:23:17 +0100 [thread overview]
Message-ID: <20141104102317.GG26941@phenom.ffwll.local> (raw)
In-Reply-To: <20141104092136.GB26941@phenom.ffwll.local>
On Tue, Nov 04, 2014 at 10:21:36AM +0100, Daniel Vetter wrote:
> On Mon, Nov 03, 2014 at 08:49:08PM +0000, Chris Wilson wrote:
> > On Mon, Nov 03, 2014 at 04:20:58PM +0100, Daniel Vetter wrote:
> > > On Fri, Oct 31, 2014 at 01:53:53PM +0000, Chris Wilson wrote:
> > > > Always require PIN_GLOBAL when we want a mappable offset (PIN_MAPPABLE).
> > > > This causes the pin to fixup the global binding in cases were the vma
> > > > was already bound (and due to the proceeding bug, we considered it to be
> > > > already mappable).
> > > >
> > > > References: https://bugs.freedesktop.org/show_bug.cgi?id=85671
> > > > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> > > > ---
> > > > drivers/gpu/drm/i915/i915_gem.c | 2 +-
> > > > drivers/gpu/drm/i915/i915_gem_execbuffer.c | 2 +-
> > > > 2 files changed, 2 insertions(+), 2 deletions(-)
> > > >
> > > > diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
> > > > index fe6c602a2a00..0c82a4d2cd0c 100644
> > > > --- a/drivers/gpu/drm/i915/i915_gem.c
> > > > +++ b/drivers/gpu/drm/i915/i915_gem.c
> > > > @@ -3479,7 +3479,7 @@ search_free:
> > > >
> > > > trace_i915_vma_bind(vma, flags);
> > > > vma->bind_vma(vma, obj->cache_level,
> > > > - flags & (PIN_MAPPABLE | PIN_GLOBAL) ? GLOBAL_BIND : 0);
> > > > + flags & PIN_GLOBAL ? GLOBAL_BIND : 0);
> > >
> > > Hm, why this? If we want to reduce the interface complexity maybe we
> > > should throw in a WARN_ON if PIN_MAPPABLE is set, but PIN_GLOBAL isnt?
> > > Just removing this safeguard make me a bit uneasy ...
> >
> > Just review all the users, takes less than 2 minutes ;)
> > It's a wart in the interface, which should do as I say, not guess, and
> > PIN_MAPPABLE doesn't translate well to GLOBAL_BIND imo.
>
> I don't object to the functional change, it makes sense. But I think
> throwing in the safeguard WARN_ON would be useful.
Done as per our irc discussion and merged them all.
-Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2014-11-04 10:23 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-31 13:53 [PATCH 1/2] drm/i915: Only mark as map-and-fenceable when bound into the GGTT Chris Wilson
2014-10-31 13:53 ` [PATCH 2/2] drm/i915: Request PIN_GLOBAL when pinning a vma for GTT relocations Chris Wilson
2014-11-03 15:20 ` Daniel Vetter
2014-11-03 20:49 ` Chris Wilson
2014-11-04 9:21 ` Daniel Vetter
2014-11-04 10:23 ` Daniel Vetter [this message]
2014-11-03 8:13 ` [PATCH 1/2] drm/i915: Only mark as map-and-fenceable when bound into the GGTT Chris Wilson
2014-11-03 15:17 ` Daniel Vetter
2014-11-03 20:45 ` Chris Wilson
2014-11-03 20:52 ` Chris Wilson
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=20141104102317.GG26941@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=chris@chris-wilson.co.uk \
--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