[Bug 90953] [IVB] GPU hang (possibly triggered by VA-API)

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Mon Oct 12 06:10:28 PDT 2015


https://bugs.freedesktop.org/show_bug.cgi?id=90953

--- Comment #15 from Simon Farnsworth <simon at farnz.org.uk> ---
I've had the chance to do a bit more work on this.

It looks like VA-API doesn't give the kernel the right hints for tracking GEM
object dirty state; in the kernel, if I change
i915_gem_execbuffer_move_to_active to unconditionally set obj->dirty=1 (instead
of only setting it if obj->base.write_domain is true), the hang goes away:

--- a/drivers/gpu/drm/i915/i915_gem_execbuffer.c
+++ b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
@@ -1032,6 +1032,7 @@ i915_gem_execbuffer_move_to_active(struct list_head
*vmas,
                u32 old_read = obj->base.read_domains;
                u32 old_write = obj->base.write_domain;

+               obj->dirty = 1;
                obj->base.write_domain = obj->base.pending_write_domain;
                if (obj->base.write_domain == 0)
                        obj->base.pending_read_domains |=
obj->base.read_domains;
@@ -1039,7 +1040,6 @@ i915_gem_execbuffer_move_to_active(struct list_head
*vmas,

                i915_vma_move_to_active(vma, req);
                if (obj->base.write_domain) {
-                       obj->dirty = 1;
                        i915_gem_request_assign(&obj->last_write_req, req);

                        intel_fb_obj_invalidate(obj, ORIGIN_CS);

I assume that this means that you're not calling the SET_DOMAIN ioctl() at
appropriate points, but relying on the kernel doing the right thing for you
anyway.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/intel-gfx-bugs/attachments/20151012/18501eac/attachment.html>


More information about the intel-gfx-bugs mailing list