media: rockchip: rga: use pixelformat to find format
authorMichael Tretter <m.tretter@pengutronix.de>
Fri, 13 Oct 2023 11:00:29 +0000 (13:00 +0200)
committerHans Verkuil <hverkuil-cisco@xs4all.nl>
Thu, 7 Dec 2023 07:56:14 +0000 (08:56 +0100)
commit012602c560b43a6de4c82a463bb4f282d50c38b4
tree2cf126c5bafda1d36b755324ac2273852e23cad4
parent60faf2b82b52ffc3f75ad7ddc28691ce3c367d82
media: rockchip: rga: use pixelformat to find format

Use the pixelformat instead of the v4l2_format to find the rga_fmt. This
avoids knowing the structure and type of v4l2_format in rga_fmt_find and
simplifies the function.

Also cleanup the users of the function. In try_fmt always return the
found pixel format to make sure that the pixel format is always set.
Thus, we can be sure that we will find the rga_fmt in s_fmt and can drop
the check if a given format has been found.

Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
drivers/media/platform/rockchip/rga/rga.c