Commit 1c56d211 authored by Lionel Landwerlin's avatar Lionel Landwerlin

egl/dri: fix error value with unknown drm format

According to the EGL_EXT_image_dma_buf_import spec, creating an EGL
image with a DRM format not supported should yield the BAD_MATCH
error :

       * If <target> is EGL_LINUX_DMA_BUF_EXT, and the EGL_LINUX_DRM_FOURCC_EXT
         attribute is set to a format not supported by the EGL, EGL_BAD_MATCH
         is generated.
Signed-off-by: 's avatarLionel Landwerlin <>
Fixes: 20de7f9f ("egl/dri2: support for creating images out of dma buffers")
Reviewed-by: 's avatarEmil Velikov <>
Reviewed-by: 's avatarTapani Pälli <>
Reviewed-by: 's avatarEric Engestrom <>
Reviewed-by: 's avatarChad Versace <>
parent 5e1fe240
......@@ -2310,7 +2310,7 @@ dri2_check_dma_buf_format(const _EGLImageAttribs *attrs)
unsigned plane_n = dri2_num_fourcc_format_planes(attrs->DMABufFourCC.Value);
if (plane_n == 0) {
_eglError(EGL_BAD_ATTRIBUTE, "invalid format");
_eglError(EGL_BAD_MATCH, "unknown drm fourcc format");
return 0;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment