<html>
    <head>
      <base href="https://bugs.freedesktop.org/">
    </head>
    <body><span class="vcard"><a class="email" href="mailto:eero.t.tamminen@intel.com" title="Eero Tamminen <eero.t.tamminen@intel.com>"> <span class="fn">Eero Tamminen</span></a>
</span> changed
          <a class="bz_bug_link 
          bz_status_NEEDINFO "
   title="NEEDINFO - glXSwapBuffers() can cause BadMatch or lock X when performed repeatedly"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=88354">bug 88354</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 - glXSwapBuffers() can cause BadMatch or lock X when performed repeatedly"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=88354#c3">Comment # 3</a>
              on <a class="bz_bug_link 
          bz_status_NEEDINFO "
   title="NEEDINFO - glXSwapBuffers() can cause BadMatch or lock X when performed repeatedly"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=88354">bug 88354</a>
              from <span class="vcard"><a class="email" href="mailto:eero.t.tamminen@intel.com" title="Eero Tamminen <eero.t.tamminen@intel.com>"> <span class="fn">Eero Tamminen</span></a>
</span></b>
        <pre>On SKL with Ubuntu 16.04, using latest Mesa from Git everything seems to work
fine, same with older Mesa 11.2 coming with Ubuntu.  No crashes / locks either
with Intel DDX or modesetting, with DRI3 or DRI2.

I would think that the issue is either fixed in Mesa, or culprit is something
else than Mesa. Can you try newer Mesa, and if that doesn't help, newer Intel
DDX version?


Btw. your test program shows interesting difference between DRI3 & DRI2.

I increased the test loop count a bit.  With Intel XX / DRI2, test goes through
10 000 rounds "instantly".

With DRI3, it takes 5-10x longer, and perf says following of the Xorg 100% CPU
usage:
-------------------------------------
23.83%  Xorg Xorg  [.] SyncAddTriggerToSyncObject  
18.20%  Xorg intel_drv.so  [.] 0x000000000010a5e5  
16.83%  Xorg Xorg  [.] TimerSet
16.49%  Xorg Xorg  [.] present_pixmap  
14.41%  Xorg Xorg  [.] present_event_notify
 7.96%  Xorg Xorg  [.] SyncDeleteTriggerFromSyncObject 
...
-------------------------------------


With modesetting instead of Intel DDX:
- test takes even longer and seems to be limited to 60 FPS
- with DRI2, CPU usage is ~1% (LIBGL_DRI3_DISABLE=1 Mesa option)
- with DRI3, CPU usage is 100%
-------------------------------------
Overview:
 98.99% Xorg
     80.49% [kernel.kallsyms]
      6.66% [unknown]  (I think this is on kernel side also)
      5.12% [vdso]
      3.99% modesetting_drv.so
      1.68% libc-2.23.so
      1.64% libdrm.so.2.4.0

Details:
 16.55%  Xorg   [kernel.kallsyms]    [k] copy_user_enhanced_fast_string   
  9.27%  Xorg   [kernel.kallsyms]    [k] do_sys_poll  
  8.13%  Xorg   [kernel.kallsyms]    [.] entry_SYSCALL_64_fastpath   
  5.43%  Xorg   [kernel.kallsyms]    [k] _raw_spin_unlock_irqrestore 
  4.51%  Xorg   [kernel.kallsyms]    [k] entry_SYSCALL_64_after_swapgs    
  4.44%  Xorg   [kernel.kallsyms]    [k] _raw_spin_lock_irqsave 
  4.20%  Xorg   [kernel.kallsyms]    [k] kfree   
  3.79%  Xorg   [kernel.kallsyms]    [k] drm_ioctl    
  3.48%  Xorg   [kernel.kallsyms]    [k] drm_wait_vblank   
  3.44%  Xorg   [kernel.kallsyms]    [k] kmem_cache_alloc_trace
-------------------------------------

In general, with DRI3, first (few thousand) swaps go faster than the later
ones.</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>