On Gen3 a media controller API needs to be used to allow userspace to configure the subdevices in the pipeline instead of directly controlling a single source subdevice, which is and will continue to be the mode of operation on Gen2. Prepare for these two modes of operation by adding a flag to struct rvin_graph_entity which will control which mode to use. Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@xxxxxxxxxxxx> --- drivers/media/platform/rcar-vin/rcar-core.c | 3 +++ drivers/media/platform/rcar-vin/rcar-vin.h | 2 ++ 2 files changed, 5 insertions(+) diff --git a/drivers/media/platform/rcar-vin/rcar-core.c b/drivers/media/platform/rcar-vin/rcar-core.c index adc38696a0ba70b9..8b30d8d3ec7d9c04 100644 --- a/drivers/media/platform/rcar-vin/rcar-core.c +++ b/drivers/media/platform/rcar-vin/rcar-core.c @@ -261,18 +261,21 @@ static int rvin_digital_graph_init(struct rvin_dev *vin) static const struct rvin_info rcar_info_h1 = { .chip = RCAR_H1, + .use_mc = false, .max_width = 2048, .max_height = 2048, }; static const struct rvin_info rcar_info_m1 = { .chip = RCAR_M1, + .use_mc = false, .max_width = 2048, .max_height = 2048, }; static const struct rvin_info rcar_info_gen2 = { .chip = RCAR_GEN2, + .use_mc = false, .max_width = 2048, .max_height = 2048, }; diff --git a/drivers/media/platform/rcar-vin/rcar-vin.h b/drivers/media/platform/rcar-vin/rcar-vin.h index b1cd0abba9ca9c94..512e67fdefd15015 100644 --- a/drivers/media/platform/rcar-vin/rcar-vin.h +++ b/drivers/media/platform/rcar-vin/rcar-vin.h @@ -77,12 +77,14 @@ struct rvin_graph_entity { /** * struct rvin_info- Information about the particular VIN implementation * @chip: type of VIN chip + * @use_mc: use media controller instead of controlling subdevice * * max_width: max input width the VIN supports * max_height: max input height the VIN supports */ struct rvin_info { enum chip_id chip; + bool use_mc; unsigned int max_width; unsigned int max_height; -- 2.12.2