[Intel-gfx] [PATCH 2/3] drm/i915: Fix obj->map_and_fenceable for ppgtt
Ben Widawsky
benjamin.widawsky at intel.com
Sat Aug 9 21:29:17 CEST 2014
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 at chris-wilson.co.uk>
> Cc: Ben Widawsky <benjamin.widawsky at intel.com>
> Cc: Daniel Vetter <daniel.vetter at 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
More information about the Intel-gfx
mailing list