From dc1dc76bd9a48c6aba3efae5eadb9a884043966e Mon Sep 17 00:00:00 2001 From: Geert Uytterhoeven Date: Fri, 8 Jul 2022 20:20:47 +0200 Subject: drm/fourcc: Add drm_format_info.is_color_indexed flag Add a flag to struct drm_format_info to indicate if a format is color-indexed, similar to the existing .is_yuv flag. This way generic code and drivers can just check this flag, instead of checking against a list of fourcc formats. Signed-off-by: Geert Uytterhoeven Reviewed-by: Javier Martinez Canillas Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/90cd390b2b4d481661f966de7b504f1702d80dfd.1657294931.git.geert@linux-m68k.org --- include/drm/drm_fourcc.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include/drm/drm_fourcc.h') diff --git a/include/drm/drm_fourcc.h b/include/drm/drm_fourcc.h index 3800a7ad7f0c..532ae78ca747 100644 --- a/include/drm/drm_fourcc.h +++ b/include/drm/drm_fourcc.h @@ -138,6 +138,9 @@ struct drm_format_info { /** @is_yuv: Is it a YUV format? */ bool is_yuv; + + /** @is_color_indexed: Is it a color-indexed format? */ + bool is_color_indexed; }; /** -- cgit v1.2.3