<div class="gmail_quote">On Tue, Nov 29, 2011 at 13:12, Chris Wilson <span dir="ltr"><<a href="mailto:chris@chris-wilson.co.uk">chris@chris-wilson.co.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

By clearing the GPU read domains before waiting upon the buffer, we run<br>
the risk of the wait being interrupted and the domains prematurely<br>
cleared. The next time we attempt to wait upon the buffer (after<br>
userspace handles the signal), we believe that the buffer is idle and so<br>
skip the wait.<br>
<br>
There are a number of bugs across all generations which show signs of an<br>
overly haste reuse of active buffers.<br>
<br>
Such as:<br>
<br>
  <a href="https://bugs.freedesktop.org/show_bug.cgi?id=29046" target="_blank">https://bugs.freedesktop.org/show_bug.cgi?id=29046</a><br>
  <a href="https://bugs.freedesktop.org/show_bug.cgi?id=35863" target="_blank">https://bugs.freedesktop.org/show_bug.cgi?id=35863</a><br>
  <a href="https://bugs.freedesktop.org/show_bug.cgi?id=38952" target="_blank">https://bugs.freedesktop.org/show_bug.cgi?id=38952</a><br>
  <a href="https://bugs.freedesktop.org/show_bug.cgi?id=40282" target="_blank">https://bugs.freedesktop.org/show_bug.cgi?id=40282</a><br>
  <a href="https://bugs.freedesktop.org/show_bug.cgi?id=41098" target="_blank">https://bugs.freedesktop.org/show_bug.cgi?id=41098</a><br>
  <a href="https://bugs.freedesktop.org/show_bug.cgi?id=41102" target="_blank">https://bugs.freedesktop.org/show_bug.cgi?id=41102</a><br>
  <a href="https://bugs.freedesktop.org/show_bug.cgi?id=41284" target="_blank">https://bugs.freedesktop.org/show_bug.cgi?id=41284</a><br>
  <a href="https://bugs.freedesktop.org/show_bug.cgi?id=42141" target="_blank">https://bugs.freedesktop.org/show_bug.cgi?id=42141</a><br>
<br>
A couple of those pre-date i915_gem_object_finish_gpu(), so may be<br>
unrelated (such as a wild write from a userspace command buffer), but<br>
this does look like a convincing cause for most of those bugs.<br>
<br>
Signed-off-by: Chris Wilson <<a href="mailto:chris@chris-wilson.co.uk">chris@chris-wilson.co.uk</a>><br>
Cc: <a href="mailto:stable@kernel.org">stable@kernel.org</a><br></blockquote><div><br>Reviewed-by: Eugeni Dodonov <<a href="mailto:eugeni.dodonov@intel.com">eugeni.dodonov@intel.com</a>> <br clear="all"></div></div>

<br>-- <br>Eugeni Dodonov<a href="http://eugeni.dodonov.net/" target="_blank"><br></a><br>