<html>
    <head>
      <base href="https://bugs.freedesktop.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_REOPENED "
   title="REOPENED --- - Corruption in some windows after returning from xlock"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=72375#c24">Comment # 24</a>
              on <a class="bz_bug_link 
          bz_status_REOPENED "
   title="REOPENED --- - Corruption in some windows after returning from xlock"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=72375">bug 72375</a>
              from <span class="vcard"><a class="email" href="mailto:chris@chris-wilson.co.uk" title="Chris Wilson <chris@chris-wilson.co.uk>"> <span class="fn">Chris Wilson</span></a>
</span></b>
        <pre>Ok, that looks like a plausible commit for that type of error.

Can you please try:

diff --git a/src/sna/gen6_render.c b/src/sna/gen6_render.c
index aadc6f7..64707ce 100644
--- a/src/sna/gen6_render.c
+++ b/src/sna/gen6_render.c
@@ -870,15 +870,19 @@ gen6_emit_state(struct sna *sna,

        assert(op->dst.bo->exec);

-       need_flush =
-               gen6_emit_cc(sna, GEN6_BLEND(op->u.gen6.flags)) &&
-               wm_binding_table & 1;
+       need_stall = need_flush = false;
+       if (gen6_emit_cc(sna, GEN6_BLEND(op->u.gen6.flags))) {
+               if (wm_binding_table & 1)
+                       need_flush = true;
+               else
+                       need_stall = true;
+       }
        gen6_emit_sampler(sna, GEN6_SAMPLER(op->u.gen6.flags));
        gen6_emit_sf(sna, GEN6_VERTEX(op->u.gen6.flags) >> 2);
        gen6_emit_wm(sna, GEN6_KERNEL(op->u.gen6.flags),
GEN6_VERTEX(op->u.gen6.flags) >> 2);
        gen6_emit_vertex_elements(sna, op);

-       need_stall = gen6_emit_binding_table(sna, wm_binding_table & ~1);
+       need_stall |= gen6_emit_binding_table(sna, wm_binding_table & ~1);
        if (gen6_emit_drawing_rectangle(sna, op))
                need_stall = false;
        if (need_flush || kgem_bo_is_dirty(op->src.bo) ||
kgem_bo_is_dirty(op->mask.bo)) {


which will restore the stall we had previously in the cases where we don't emit
the flush.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the QA Contact for the bug.</li>
      </ul>
    </body>
</html>