<html>
<head>
<base href="https://bugs.freedesktop.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - [IVB] GPU hang (possibly triggered by VA-API)"
href="https://bugs.freedesktop.org/show_bug.cgi?id=90953#c15">Comment # 15</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - [IVB] GPU hang (possibly triggered by VA-API)"
href="https://bugs.freedesktop.org/show_bug.cgi?id=90953">bug 90953</a>
from <span class="vcard"><a class="email" href="mailto:simon@farnz.org.uk" title="Simon Farnsworth <simon@farnz.org.uk>"> <span class="fn">Simon Farnsworth</span></a>
</span></b>
<pre>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.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>