Message ID | 20210610145606.3468235-1-tomi.valkeinen@ideasonboard.com |
---|---|
Headers | show |
Series | media: v4l2-subdev: add subdev-wide state struct | expand |
Moi, On Thu, Jun 10, 2021 at 05:55:57PM +0300, Tomi Valkeinen wrote: > Hi, > > v5 of the series. No content changes compared to v4, but the series is > split into smaller parts to enable reviews. > > The split is artificial, and all the patches need to be squashed into > one before merging. > > The point of the series is explained in "media: v4l2-subdev: add > subdev-wide state struct", but for easier reviews I add it partially > here: > > We have 'struct v4l2_subdev_pad_config' which contains configuration for > a single pad used for the TRY functionality, and an array of those > structs is passed to various v4l2_subdev_pad_ops. > > I was working on subdev internal routing between pads, and realized that > there's no way to add TRY functionality for routes, which is not pad > specific configuration. Adding a separate struct for try-route config > wouldn't work either, as e.g. set-fmt needs to know the try-route > configuration to propagate the settings. > > This patch adds a new struct, 'struct v4l2_subdev_state' (which at the > moment only contains the v4l2_subdev_pad_config array) and the new > struct is used in most of the places where v4l2_subdev_pad_config was > used. All v4l2_subdev_pad_ops functions taking v4l2_subdev_pad_config > are changed to instead take v4l2_subdev_state. Thanks for the update. For the set: Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
On 11/06/2021 08:49, Tomi Valkeinen wrote: > Patch "media: v4l2-subdev: add subdev-wide state struct" describes the > semantic patch used to convert drivers to the new subdev-wide state. For > some reason the semantic patch didn't catch a single case of: > > #if IS_ENABLED(CONFIG_VIDEO_V4L2_SUBDEV_API) > this was patched > #else > this was not patched > #endif > > Manually fix this one case. > > Note that this patch is meant to be squashed into the main patch. > > Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> > --- > drivers/media/i2c/mt9v111.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/media/i2c/mt9v111.c b/drivers/media/i2c/mt9v111.c > index b438f8c077d5..2dc4a0f24ce8 100644 > --- a/drivers/media/i2c/mt9v111.c > +++ b/drivers/media/i2c/mt9v111.c > @@ -800,7 +800,7 @@ static struct v4l2_mbus_framefmt *__mt9v111_get_pad_format( > #if IS_ENABLED(CONFIG_VIDEO_V4L2_SUBDEV_API) > return v4l2_subdev_get_try_format(&mt9v111->sd, sd_state, pad); > #else > - return &cfg->try_fmt; > + return &sd_state->pads->try_fmt; > #endif > case V4L2_SUBDEV_FORMAT_ACTIVE: > return &mt9v111->fmt; > I missed adding: Reported-by: kernel test robot <lkp@intel.com> Tomi