summaryrefslogtreecommitdiffstats
path: root/include/drm
diff options
context:
space:
mode:
authorAyan Kumar Halder <ayan.halder@arm.com>2018-07-17 18:13:42 +0100
committerAyan Kumar Halder <ayan.halder@arm.com>2018-07-18 16:56:45 +0100
commitce2d54619a10780a0d354e10d4c83ae4fad46f41 (patch)
treed06be2068255c19d191d2fab978a40a5d12efc5d /include/drm
parent108019a7e6a34df91246365066bea7cf6faf6b02 (diff)
downloadlinux-ce2d54619a10780a0d354e10d4c83ae4fad46f41.tar.bz2
drm/fourcc: Add is_yuv field to drm_format_info to denote if the format is yuv
A lot of drivers duplicate the function to check if a format is yuv or not. If we add a field (to denote whether the format is yuv or not) in the drm_format_info table, all the drivers can use this field and it will prevent duplication of similar logic. Signed-off-by: Ayan Kumar halder <ayan.halder@arm.com> Reviewed-by: Ville Syrjala <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/1531847626-22248-1-git-send-email-ayan.halder@arm.com
Diffstat (limited to 'include/drm')
-rw-r--r--include/drm/drm_fourcc.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/drm/drm_fourcc.h b/include/drm/drm_fourcc.h
index 3e86408dac9f..f9c15845f465 100644
--- a/include/drm/drm_fourcc.h
+++ b/include/drm/drm_fourcc.h
@@ -39,6 +39,7 @@ struct drm_mode_fb_cmd2;
* @hsub: Horizontal chroma subsampling factor
* @vsub: Vertical chroma subsampling factor
* @has_alpha: Does the format embeds an alpha component?
+ * @is_yuv: Is it a YUV format?
*/
struct drm_format_info {
u32 format;
@@ -48,6 +49,7 @@ struct drm_format_info {
u8 hsub;
u8 vsub;
bool has_alpha;
+ bool is_yuv;
};
/**