egl/dri: fix error value with unknown drm format
authorLionel Landwerlin <lionel.g.landwerlin@intel.com>
Tue, 13 Nov 2018 14:10:45 +0000 (14:10 +0000)
committerLionel Landwerlin <lionel.g.landwerlin@intel.com>
Fri, 16 Nov 2018 10:28:06 +0000 (10:28 +0000)
commit1c56d211563300e8b837378962dd455d45d7956e
tree6ec86787e0b45db44f57d37c9df5b85969f8d527
parent5e1fe240c43537150e124e99915702d193ea9430
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: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 20de7f9f226401 ("egl/dri2: support for creating images out of dma buffers")
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Chad Versace <chadversary@chromium.org>
src/egl/drivers/dri2/egl_dri2.c