[Mesa-dev] [PATCH mesa] st/va: add missing mutex_unlock

Zhang, Boyuan Boyuan.Zhang at amd.com
Mon Aug 22 20:57:23 UTC 2016


Patch is Reviewed-by: Boyuan Zhang <boyuan.zhang at amd.com>

Regards,
Boyuan

-----Original Message-----
From: Eric Engestrom [mailto:eric at engestrom.ch] 
Sent: August-21-16 5:12 PM
To: mesa-dev at lists.freedesktop.org
Cc: Zhang, Boyuan; Koenig, Christian; Eric Engestrom
Subject: [PATCH mesa] st/va: add missing mutex_unlock

Fixes: c59628d11b134fc01638 ("st/va: enable dual instances encode by sync surface")
Signed-off-by: Eric Engestrom <eric at engestrom.ch>
---
 src/gallium/state_trackers/va/surface.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/gallium/state_trackers/va/surface.c b/src/gallium/state_trackers/va/surface.c
index 012e48e..3ee1cdd 100644
--- a/src/gallium/state_trackers/va/surface.c
+++ b/src/gallium/state_trackers/va/surface.c
@@ -106,8 +106,10 @@ vlVaSyncSurface(VADriverContextP ctx, VASurfaceID render_target)
    pipe_mutex_lock(drv->mutex);
    surf = handle_table_get(drv->htab, render_target);
 
-   if (!surf || !surf->buffer)
+   if (!surf || !surf->buffer) {
+      pipe_mutex_unlock(drv->mutex);
       return VA_STATUS_ERROR_INVALID_SURFACE;
+   }
 
    context = handle_table_get(drv->htab, surf->ctx);
    if (!context) {
-- 
2.9.3



More information about the mesa-dev mailing list