staging: media: tegra-video: add hooks for planar YUV and H/V flip
authorLuca Ceresoli <luca.ceresoli@bootlin.com>
Tue, 18 Apr 2023 08:00:52 +0000 (10:00 +0200)
committerHans Verkuil <hverkuil-cisco@xs4all.nl>
Thu, 25 May 2023 11:04:48 +0000 (13:04 +0200)
commitb4e2572267a1e91ba6e4813b4d71517cccccdbea
tree1945e6b36865eee094b97068c274aeac290ed673
parent4cbd8479cd2ea6d36597ad7c16860a074d804f85
staging: media: tegra-video: add hooks for planar YUV and H/V flip

Tegra20 supports planar YUV422 capture, which can be implemented by writing
U and V base address registers in addition to the "main" base buffer
address register.

It also supports H and V flip, which among others requires to write the
start address (i.e. the 1st offset to write, at the end of the buffer or
line) in more registers for Y and, for planar formats, U and V.

Add minimal hooks in VI to allow per-SoC optional support to those
features:

 - variables in struct tegra_vi for the U and V buffer base offsets
 - variables in struct tegra_vi for the Y, U and V buffer start offsets
 - an optional per-soc VI operation to compute those values on queue setup

Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Reviewed-by: Dmitry Osipenko <digetx@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
drivers/staging/media/tegra-video/vi.c
drivers/staging/media/tegra-video/vi.h