@@ -244,18 +244,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,
};
@@ -349,7 +352,8 @@ static int rcar_vin_remove(struct platform_device *pdev)
v4l2_async_notifier_cleanup(&vin->notifier);
/* Checks internaly if handlers have been init or not */
- v4l2_ctrl_handler_free(&vin->ctrl_handler);
+ if (!vin->info->use_mc)
+ v4l2_ctrl_handler_free(&vin->ctrl_handler);
rvin_v4l2_unregister(vin);
@@ -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;