summaryrefslogtreecommitdiffstats
path: root/init
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2020-04-06 18:38:58 +0200
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>2020-04-21 13:15:24 +0200
commit0cd5d896a192887041f4030c1d388099a572322e (patch)
treebd98c440901eeb386a4837299198e4d782047341 /init
parentc25ab5caf516f9439a5607162852d398c635d948 (diff)
downloadlinux-stable-0cd5d896a192887041f4030c1d388099a572322e.tar.gz
linux-stable-0cd5d896a192887041f4030c1d388099a572322e.tar.bz2
linux-stable-0cd5d896a192887041f4030c1d388099a572322e.zip
media: imx: utils: Handle Bayer format lookup through a selection flag
The format lookup (and enumeration) functions take a boolean flag to tell if Bayer formats should be considered. This leads to hard to read lines such as return enum_format(fourcc, NULL, index, cs_sel, true, false); where the boolean parameters can easily be mixed. To make the code clearer, add a CS_SEL_BAYER flag that can be passed through the codespace_sel parameter of the lookup functions to replace the bool parameter. [slongerbeam@gmail.com: Instead of declaring CS_SEL_ANY as a bitfield containing only CS_SEL_YUV | CS_SEL_RGB, declare CS_SEL_ANY as all of the above (YUV, RGB, BAYER). A new enum is declared for the YUV | RGB selection as CS_SEL_YUV_RGB, and that is used by sub-devices that don't support BAYER and only allow selecting and enumerating YUV or RGB encodings. CS_SEL_ANY is now only used by the CSI sub-devices and the attached capture interfaces, since only those devices support BAYER formats.] Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Steve Longerbeam <slongerbeam@gmail.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Diffstat (limited to 'init')
0 files changed, 0 insertions, 0 deletions