From: Ben Widawsky <benjamin.widawsky@intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 2/3] drm/i915: Fix obj->map_and_fenceable for ppgtt
Date: Sat, 9 Aug 2014 12:29:17 -0700 [thread overview]
Message-ID: <20140809192916.GB508@intel.com> (raw)
In-Reply-To: <1407602244-29463-2-git-send-email-chris@chris-wilson.co.uk>
On Sat, Aug 09, 2014 at 05:37:23PM +0100, Chris Wilson wrote:
> With ppgtt, it is no longer correct to mark an object as
> map_and_fenceable if we simply unbind it from the global gtt. This has
> consequences during execbuffer where we simply use
> obj->map_and_fenceable in use_cpu_reloc() to decide which access method
> to use for writing into the object. Now for a ppgtt object,
> map_and_fenceable will be true when it is not bound into the ggtt but
> only in a ppgtt, leading to an invalid access on a non-llc architecture.
The last sentence confused me for some reason. I think the first two
sentences were perfectly succinct in describing the problem.
>
> v2: Revamp and resend to ease future patches.
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Ben Widawsky <benjamin.widawsky@intel.com>
> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
I didn't read the patch closely, but the problem is clear. It seems like
the one hunk:
> - if (use_cpu_reloc(obj))
> + if (use_cpu_reloc(obj) || !i915_gem_obj_ggtt_bound(obj))
would be sufficient to fix the problem.
I had a local solution at one point (I'm too lazy to check what I've
sent out these days) where I turned map_and_fenceable into a getter(). I
thought that looked pretty nice as well.
lgtm
[snip]
--
Ben Widawsky, Intel Open Source Technology Center
next prev parent reply other threads:[~2014-08-09 19:27 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-09 16:37 [PATCH 1/3] drm/i915: Only perform set-to-gtt domain for objects bound to the global gtt Chris Wilson
2014-08-09 16:37 ` [PATCH 2/3] drm/i915: Fix obj->map_and_fenceable for ppgtt Chris Wilson
2014-08-09 19:29 ` Ben Widawsky [this message]
2014-08-10 6:55 ` Chris Wilson
2014-08-10 7:04 ` Chris Wilson
2014-08-10 7:06 ` [PATCH] drm/i915: Force CPU relocations if not GTT mapped Chris Wilson
2014-08-11 10:02 ` Daniel Vetter
2014-08-09 16:37 ` [PATCH 3/3] drm/i915: Remove fenced_gpu_access and pending_fenced_gpu_access Chris Wilson
2014-08-11 10:20 ` Daniel Vetter
2014-08-11 9:36 ` [PATCH 1/3] drm/i915: Only perform set-to-gtt domain for objects bound to the global gtt Daniel Vetter
-- strict thread matches above, loose matches on Subject: below --
2014-01-01 14:00 [PATCH 1/3] drm/i915: Only bind each object rather than for every execbuffer Chris Wilson
2014-01-01 14:00 ` [PATCH 2/3] drm/i915: Fix obj->map_and_fenceable for ppgtt 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=20140809192916.GB508@intel.com \
--to=benjamin.widawsky@intel.com \
--cc=chris@chris-wilson.co.uk \
--cc=daniel.vetter@ffwll.ch \
--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