drm/fourcc: Add format info helpers for checking YUV sub-sampling
authorPaul Kocialkowski <paul.kocialkowski@bootlin.com>
Fri, 18 Jan 2019 14:51:12 +0000 (15:51 +0100)
committerMaxime Ripard <maxime.ripard@bootlin.com>
Fri, 18 Jan 2019 18:00:18 +0000 (19:00 +0100)
commita211e56e947c8dbf37e1682f278bcfe8b20129c4
tree8d29c37b6883803356be4097382828e284e07feb
parent41c8c210a2b4ba8b1b532cdba7ff0112ef76abb2
drm/fourcc: Add format info helpers for checking YUV sub-sampling

Display engine drivers often need to distinguish between different types of
YUV sub-sampling. This introduces helpers to check for common sub-sampling
ratios in their commonly-used denomination from the DRM format info.

Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
Reviewed-by: Maxime Ripard <maxime.ripard@bootlin.com>
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190118145133.21281-3-paul.kocialkowski@bootlin.com
include/drm/drm_fourcc.h