]> git.baikalelectronics.ru Git - kernel.git/commit
drm/sun4i: frontend: Determine input format based on colorspace
authorPaul Kocialkowski <paul.kocialkowski@bootlin.com>
Fri, 18 Jan 2019 14:51:15 +0000 (15:51 +0100)
committerMaxime Ripard <maxime.ripard@bootlin.com>
Fri, 18 Jan 2019 18:01:08 +0000 (19:01 +0100)
commitb5c30dce41d97bf56fe6e76e9d036b6e3b0e4014
treebe4d5ea7ec3c4df479ef67ce5ee618b839373869
parentb9d3dc1a774c63cf2bb6ea9ebaf3b9bb6c589f77
drm/sun4i: frontend: Determine input format based on colorspace

Since all the RGB input formats have the same value for the DATA_FMT
field of the INPUT_FMT register, we can group them when the format is
known to be RGB. Here, we assume that a non-YUV format is RGB, because
the hardware does not support any other colorspace than RGB and YUV.

Use the DRM format info structure to check whether the format uses a
YUV colorspace.

Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
Acked-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-6-paul.kocialkowski@bootlin.com
drivers/gpu/drm/sun4i/sun4i_frontend.c