<html>
    <head>
      <base href="https://bugs.freedesktop.org/">
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - vdpau segfaults and gpu locks with kodi on R9285"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=99158#c6">Comment # 6</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - vdpau segfaults and gpu locks with kodi on R9285"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=99158">bug 99158</a>
              from <span class="vcard"><a class="email" href="mailto:maraeo@gmail.com" title="Marek Olšák <maraeo@gmail.com>"> <span class="fn">Marek Olšák</span></a>
</span></b>
        <pre>We could get a race if vlVdpOutputSurfaceDMABuf is called from a different
thread than the context is normally used with. Can that happen?

You can try to test this:

diff --git a/src/gallium/state_trackers/vdpau/output.c
b/src/gallium/state_trackers/vdpau/output.c
index 64574b2..96474fb 100644
--- a/src/gallium/state_trackers/vdpau/output.c
+++ b/src/gallium/state_trackers/vdpau/output.c
@@ -804,7 +804,7 @@ VdpStatus vlVdpOutputSurfaceDMABuf(VdpOutputSurface
surface,
    whandle.type = DRM_API_HANDLE_TYPE_FD;

    pscreen = vlsurface->surface->texture->screen;
-   if (!pscreen->resource_get_handle(pscreen, vlsurface->device->context,
+   if (!pscreen->resource_get_handle(pscreen, NULL,
                                      vlsurface->surface->texture, &whandle,
                                     PIPE_HANDLE_USAGE_READ_WRITE))
       return VDP_STATUS_NO_IMPLEMENTATION;</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>