mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-03-11 02:40:39 +01:00
egl/dri2: Add a couple of missing mutex release in error path
This is causing a hang in the intel compute runtime when
trying to cl/gl share an unsupported texture format.
Fixes: f1efe037df ("egl/dri2: Add display lock")
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24487>
This commit is contained in:
parent
04cc8c6f8d
commit
a0a5d0f02e
1 changed files with 5 additions and 2 deletions
|
|
@ -2951,7 +2951,8 @@ dri2_export_drm_image_mesa(_EGLDisplay *disp, _EGLImage *img, EGLint *name,
|
|||
|
||||
if (name && !dri2_dpy->image->queryImage(dri2_img->dri_image,
|
||||
__DRI_IMAGE_ATTRIB_NAME, name))
|
||||
return _eglError(EGL_BAD_ALLOC, "dri2_export_drm_image_mesa");
|
||||
return dri2_egl_error_unlock(dri2_dpy, EGL_BAD_ALLOC,
|
||||
"dri2_export_drm_image_mesa");
|
||||
|
||||
if (handle)
|
||||
dri2_dpy->image->queryImage(dri2_img->dri_image,
|
||||
|
|
@ -3040,8 +3041,10 @@ dri2_export_dma_buf_image_mesa(_EGLDisplay *disp, _EGLImage *img, int *fds,
|
|||
struct dri2_egl_image *dri2_img = dri2_egl_image(img);
|
||||
EGLint nplanes;
|
||||
|
||||
if (!dri2_can_export_dma_buf_image(disp, img))
|
||||
if (!dri2_can_export_dma_buf_image(disp, img)) {
|
||||
mtx_unlock(&dri2_dpy->lock);
|
||||
return EGL_FALSE;
|
||||
}
|
||||
|
||||
/* EGL_MESA_image_dma_buf_export spec says:
|
||||
* "If the number of fds is less than the number of planes, then
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue