media: rcar-vin: Store scaler in a function pointer
authorNiklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Sun, 9 Oct 2022 18:35:50 +0000 (19:35 +0100)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Fri, 25 Nov 2022 11:00:03 +0000 (11:00 +0000)
commit3ad69c610ba8a3f7cf76bc856ca62c92d2bd955f
treef29e50b798ee2667840a5cef54b7acb6a771c5ea
parentf42a323252afc930eea0c9fd839037f952baf691
media: rcar-vin: Store scaler in a function pointer

The scaler implementation is different between the VIN generations, and
not all SoCs have a scaler. Currently only Gen2 scalers are supported.

Prepare to add support for more scalers by storing the setup in a
function pointer initialized at probe time. While at it move call site
to after, instead of before, the generic capture setup, this have no
effect on the Gen2 scaler but will be leveraged by the Gen3 scaler.

Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
drivers/media/platform/renesas/rcar-vin/rcar-core.c
drivers/media/platform/renesas/rcar-vin/rcar-dma.c
drivers/media/platform/renesas/rcar-vin/rcar-v4l2.c
drivers/media/platform/renesas/rcar-vin/rcar-vin.h