<html>
    <head>
      <base href="https://bugs.freedesktop.org/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Priority</th>
          <td>medium
          </td>
        </tr>

        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - Intel driver fails with "intel_do_flush_locked failed: No such file or directory" if buffer imported with EGL_NATIVE_PIXMAP_KHR"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=71759">71759</a>
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>idr@freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Intel driver fails with "intel_do_flush_locked failed: No such file or directory" if buffer imported with EGL_NATIVE_PIXMAP_KHR
          </td>
        </tr>

        <tr>
          <th>QA Contact</th>
          <td>intel-3d-bugs@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux (All)
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>vebveb@hotmail.fr
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>x86-64 (AMD64)
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>git
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Drivers/DRI/i965
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>Mesa
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Hello,

Glamor enables DDX to create a pixmap from a bo by passing a GEM name.

This is useful for DDX, since they like to have access to the bo to support
DRI2 and other features.

I'm using gbm_bo for the XWayland wlglamor DDX.

Since I would like wlglamor to work on a render-node, and that render-nodes are
not allowed to manipulates GEM names, I was trying to get Glamor to work with
passing gbm_bo to create the pixmap, instead of GEM names.

That's in this situation I got the bug I describe below.


When import GEM names, what Glamor do is:
. use eglCreateImageKHR with the EGL_DRM_BUFFER_MESA parameter to get an
EGLImage from the name
. create a texture from the image
. use the texture to render.

What I did is
. use eglCreateImageKHR with EGL_NATIVE_PIXMAP_KHR to get an EGLImage from the
gbm_bo
. same than before

The only changes are to get the EGLImage.

But with that, the DDX won't work, and will get "intel_do_flush_locked failed:
No such file or directory".

I've not debugged enough to have the precise location where it fails, but I
know it isn't in eglCreateImageKHR, which returns with a valid image.

I've gone through the code for eglCreateImageKHR with EGL_NATIVE_PIXMAP_KHR,
and I've found nothing incorrect.

My bet is that something that is set when importing a name (perhaps kernel
side?), isn't set when we import a gbm_bo (eglCreateImageKHR just duplicates
the descriptor of the image contained in the gbm_bo)

I've tested my code with a radeon card, and it worked, so the bug is intel
specific.</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>