staging: media: tegra-video: add support for Tegra20 parallel input
authorLuca Ceresoli <luca.ceresoli@bootlin.com>
Tue, 18 Apr 2023 08:00:54 +0000 (10:00 +0200)
committerHans Verkuil <hverkuil-cisco@xs4all.nl>
Thu, 25 May 2023 14:21:19 +0000 (16:21 +0200)
commite740d199cf0ff1e53ddc2ab067c0a09b55845d68
tree1802a3b4c0280f8f9a058f9353f6f4ef7a4ff78b
parenteeb036ab9ca90bcc0abf917a14983fb8a66b7a28
staging: media: tegra-video: add support for Tegra20 parallel input

The VI peripheral of Tegra supports capturing from MIPI CSI-2 or parallel
video (called VIP in the docs).

The staging tegra-video driver currently implements MIPI CSI-2 video
capture for Tegra210. Add support for parallel video capture (VIP) on
Tegra20. With the generalizations added to the VI driver in previous
commits, this is only a matter of adding the vip.c and tegra20.c
implementations and registering them.

Unfortunately there was no documentation available for the VI or VIP
peripherals of Tegra20 (or any other Tegra chips). This implementation has
been based entirely on the code from a vendor kernel based on Linux 3.1 and
massively adapted to fit into the tegra-video driver. Parts of this code is
definitely non-optimal to say the least (especially tegra20_vi_enable() and
the single-frame capture logic), but it was impossible to improve it.

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>
[hverkuil: fix host1x_client_unregister usage: it's now a void func]
drivers/staging/media/tegra-video/Makefile
drivers/staging/media/tegra-video/tegra20.c [new file with mode: 0644]
drivers/staging/media/tegra-video/vi.c
drivers/staging/media/tegra-video/vi.h
drivers/staging/media/tegra-video/video.c
drivers/staging/media/tegra-video/video.h
drivers/staging/media/tegra-video/vip.c [new file with mode: 0644]
drivers/staging/media/tegra-video/vip.h [new file with mode: 0644]