egl/dri2: Guard against invalid fourcc formats
We already reject attempts to import images with invalid fourcc formats but don't really guard the queries all that well. This makes us error out in any calls to eglQueryDmaBufModifiersEXT if the given format is not a valid fourcc format. We also add an assert to ensure that drivers don't advertise any non-fourcc formats. Cc: mesa-stable@lists.freedesktop.org Tested-By:Eero Tamminen <eero.t.tamminen@intel.com> Reviewed-by:
Eric Engestrom <eric.engestrom@intel.com> (cherry picked from commit 8c1b9882) Squashed with commit: st/dri: Don't expose sRGB formats to clients Though the SARGB8888 format is used internally through its FourCC value, it is not a real format as defined by drm_fourcc.h; it cannot be used with KMS or other interfaces expecting drm_fourcc.h format codes. Ensure we don't advertise it through the dmabuf format/modifier query interfaces, preventing us from tripping over an assert. Signed-off-by:
Daniel Stone <daniels@collabora.com> Reported-by:
Michel Dänzer <michel.daenzer@amd.com> Fixes: 8c1b9882 ("egl/dri2: Guard against invalid fourcc formats") Acked-by:
Jason Ekstrand <jason.ekstrand@intel.com> (cherry picked from commit 01c0aa9f)
Loading
Please register or sign in to comment