st/dri: Don't expose sRGB formats to clients
authorDaniel Stone <daniels@collabora.com>
Fri, 31 Aug 2018 16:34:03 +0000 (17:34 +0100)
committerDaniel Stone <daniels@collabora.com>
Fri, 31 Aug 2018 17:02:42 +0000 (18:02 +0100)
commit01c0aa9f058673071f908ed775a76b4415464b5c
treeeabb69b68ff854229573cf90b2e28f95a7ae8775
parent686ec97cfb40b12774843463da14d2807477b71e
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: 8c1b9882b2e0 ("egl/dri2: Guard against invalid fourcc formats")
Acked-by: Jason Ekstrand <jason.ekstrand@intel.com>
src/gallium/state_trackers/dri/dri2.c