<html>
    <head>
      <base href="https://bugs.freedesktop.org/" />
    </head>
    <body><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> changed
              <a class="bz_bug_link 
          bz_status_NEEDINFO "
   title="NEEDINFO --- - GPU hangs during full screen games on multi-monitor setup"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=69119">bug 69119</a>
        <br>
             <table border="1" cellspacing="0" cellpadding="8">
          <tr>
            <th>What</th>
            <th>Removed</th>
            <th>Added</th>
          </tr>

         <tr>
           <td style="text-align:right;">Status</td>
           <td>NEW
           </td>
           <td>NEEDINFO
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEEDINFO "
   title="NEEDINFO --- - GPU hangs during full screen games on multi-monitor setup"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=69119#c7">Comment # 7</a>
              on <a class="bz_bug_link 
          bz_status_NEEDINFO "
   title="NEEDINFO --- - GPU hangs during full screen games on multi-monitor setup"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=69119">bug 69119</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>I'm scratching my head here for lack of ideas. I could just about force this to
use the RCS and a wait-for-vblank-event, but really, really don't want to. So
hopefully reducing the scan-line window and thereby creating a larger window
for the event to fire will do the trick.

The one other possibility is that IVB requires that both y1 and y2 refer to the
line before (and not just y2). This is not mentioned in the bspec for hsw.

Just to be safe, I added and extra check:


diff --git a/src/sna/sna_display.c b/src/sna/sna_display.c
index be02a78..6a5241a 100644
--- a/src/sna/sna_display.c
+++ b/src/sna/sna_display.c
@@ -3392,6 +3392,14 @@ static bool sna_emit_wait_for_scanline_hsw(struct sna
*sna,
        b = kgem_get_batch(&sna->kgem);
        sna->kgem.nbatch += 5;

+       /* Reduce the range slightly to accommodate some latency
+        * in detection: <a class="bz_bug_link 
          bz_status_NEEDINFO "
   title="NEEDINFO --- - GPU hangs during full screen games on multi-monitor setup"
   href="show_bug.cgi?id=69119">https://bugs.freedesktop.org/show_bug.cgi?id=69119</a>
+        */
+       y1 = (y1 + 7) & ~7;
+       y2 = (y2 - 7) & ~7;
+       if (y2 <= y1)
+               return false;
+
        /* The documentation says that the LOAD_SCAN_LINES command
         * always comes in pairs. Don't ask me why. */
        switch (pipe) {</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the QA Contact for the bug.</li>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>