Searched hist:b2ac2387 (Results 1 – 1 of 1) sorted by relevance
/openbmc/linux/drivers/media/v4l2-core/ |
H A D | v4l2-subdev.c | b2ac2387 Tue Apr 12 04:42:47 CDT 2022 Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> media: subdev: add locking wrappers to subdev op wrappers
It is common that media drivers call subdev ops in source subdevs, and pass NULL as the state. This was the way to indicate that the callee should use the callee's private active state.
E.g.:
v4l2_subdev_call(priv->source_sd, pad, get_fmt, NULL, &sd_fmt);
Now that we have a real subdev active state in the v4l2_subdev struct, we want the caller to pass a proper state (when available). And furthermore, the state should be locked.
This would mean changing all the callers, which is the long term goal.
To fix this issue in the short term, let's add an extra wrapper layer to all v4l2_subdev_call_pad_wrappers which deal with states. These wrappers handle the state == NULL case by using the locked active state instead (when available).
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> Reviewed-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
|