media: staging: rkisp1: add a helper function to enumerate supported mbus formats...
authorDafna Hirschfeld <dafna.hirschfeld@collabora.com>
Tue, 1 Sep 2020 11:16:08 +0000 (13:16 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Sun, 27 Sep 2020 09:13:07 +0000 (11:13 +0200)
commit9a8e67b8bbb2c080718222b766e2aeeb1a29a4fa
treef6570cf21e4cb8cd5ba2aa76f23adf9633177737
parent5fc929ae516537720d61139df92fa89ac4989c7b
media: staging: rkisp1: add a helper function to enumerate supported mbus formats on capture

Add a function 'rkisp1_cap_enum_mbus_codes' that receive
a pointer to 'v4l2_subdev_mbus_code_enum' and returns the
next supported mbus format of the capture. The function
assumes that pixel formats with identical 'mbus' are grouped
together in the hardcoded arrays, therefore the order of the
entries in the array 'rkisp1_sp_fmts' are adjusted.
This function is a helper for the media bus enumeration of
the source pad of the resizer entity.

Signed-off-by: Dafna Hirschfeld <dafna.hirschfeld@collabora.com>
Acked-by: Helen Koike <helen.koike@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/staging/media/rkisp1/rkisp1-capture.c
drivers/staging/media/rkisp1/rkisp1-common.h