[Intel-gfx] [PATCH] drm/i915: move objects to the GTT domain at fault time
Eric Anholt
eric at anholt.net
Wed Jun 17 22:39:28 CEST 2009
On Wed, 2009-06-17 at 13:30 -0700, Jesse Barnes wrote:
> Chris pointed out that Kristian's fix to move faulted objects into the
> GTT domain wouldn't work if the object was still bound, but in another
> domain.
>
> So move the domain transition to just before the vm_insert_pfn to make
> sure the domain is always correct when the user is about to access the
> object. We might want to add a check to the GTT domain transition
> function to avoid unnecessary flushes in the event the object is
> already there.
Userland is also calling set_domain(GTT, GTT), since we won't
necessarily fault when just accessing the object again through the GTT
after GPU use. So I don't think you're fixing any problem here --
userland has to call set_domain, and either userland will have
successfully set to GTT (the object was bound), or the fault path will
successfully set to GTT (the object was unbound).
(Incidentally, I wrote the same patch, before deciding that I didn't
need it. Maybe writing a comment instead would have been good!)
--
Eric Anholt
eric at anholt.net eric.anholt at intel.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freedesktop.org/archives/intel-gfx/attachments/20090617/a789fd15/attachment.sig>
More information about the Intel-gfx
mailing list