From: bugzilla-daemon@freedesktop.org Subject: [Bug 99158] vdpau segfaults and gpu locks with kodi on R9285 Date: Wed, 04 Jan 2017 10:18:48 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1666028227==" Return-path: Received: from culpepper.freedesktop.org (culpepper.freedesktop.org [131.252.210.165]) by gabe.freedesktop.org (Postfix) with ESMTP id 22A486E6E5 for ; Wed, 4 Jan 2017 10:18:48 +0000 (UTC) In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org --===============1666028227== Content-Type: multipart/alternative; boundary="14835251270.B8CFFE.26936"; charset="UTF-8" --14835251270.B8CFFE.26936 Date: Wed, 4 Jan 2017 10:18:47 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://bugs.freedesktop.org/ Auto-Submitted: auto-generated https://bugs.freedesktop.org/show_bug.cgi?id=3D99158 --- Comment #6 from Marek Ol=C5=A1=C3=A1k --- 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 =3D DRM_API_HANDLE_TYPE_FD; pscreen =3D 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; --=20 You are receiving this mail because: You are the assignee for the bug.= --14835251270.B8CFFE.26936 Date: Wed, 4 Jan 2017 10:18:47 +0000 MIME-Version: 1.0 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://bugs.freedesktop.org/ Auto-Submitted: auto-generated

Comment= # 6 on bug 99158<= /a> from Marek Ol=C5=A1=C3=A1k
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(VdpO=
utputSurface
surface,
    whandle.type =3D DRM_API_HANDLE_TYPE_FD;

    pscreen =3D vlsurface->surface->texture->screen;
-   if (!pscreen->resource_get_handle(pscreen, vlsurface->device->=
context,
+   if (!pscreen->resource_get_handle(pscreen, NULL,
                                      vlsurface->surface->texture, &a=
mp;whandle,
                                     PIPE_HANDLE_USAGE_READ_WRITE))
       return VDP_STATUS_NO_IMPLEMENTATION;


You are receiving this mail because:
  • You are the assignee for the bug.
= --14835251270.B8CFFE.26936-- --===============1666028227== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHBzOi8vbGlz dHMuZnJlZWRlc2t0b3Aub3JnL21haWxtYW4vbGlzdGluZm8vZHJpLWRldmVsCg== --===============1666028227==--