Mesa (master): st/vdpau: fix deadlock in PresentationQueueQuerySurfaceStatus

Christian König deathsimple at kemper.freedesktop.org
Tue Apr 3 15:42:34 UTC 2012


Module: Mesa
Branch: master
Commit: 24ca588ce66233a92e95dc70deb983c97dc24e55
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=24ca588ce66233a92e95dc70deb983c97dc24e55

Author: Christian König <deathsimple at vodafone.de>
Date:   Thu Mar 29 15:53:28 2012 +0200

st/vdpau: fix deadlock in PresentationQueueQuerySurfaceStatus

Signed-off-by: Christian König <deathsimple at vodafone.de>

---

 src/gallium/state_trackers/vdpau/presentation.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/src/gallium/state_trackers/vdpau/presentation.c b/src/gallium/state_trackers/vdpau/presentation.c
index 2e3bea9..51a702e 100644
--- a/src/gallium/state_trackers/vdpau/presentation.c
+++ b/src/gallium/state_trackers/vdpau/presentation.c
@@ -368,14 +368,15 @@ vlVdpPresentationQueueQuerySurfaceStatus(VdpPresentationQueue presentation_queue
       if (screen->fence_signalled(screen, surf->fence)) {
          screen->fence_reference(screen, &surf->fence, NULL);
          *status = VDP_PRESENTATION_QUEUE_STATUS_VISIBLE;
+         pipe_mutex_unlock(pq->device->mutex);
 
          // We actually need to query the timestamp of the last VSYNC event from the hardware
          vlVdpPresentationQueueGetTime(presentation_queue, first_presentation_time);
          *first_presentation_time += 1;
       } else {
          *status = VDP_PRESENTATION_QUEUE_STATUS_QUEUED;
+         pipe_mutex_unlock(pq->device->mutex);
       }
-      pipe_mutex_unlock(pq->device->mutex);
    }
 
    return VDP_STATUS_OK;




More information about the mesa-commit mailing list