Re: [PATCH v3 3/3] media: i2c: os02g10: implement crop handling with set_selection

From: Laurent Pinchart

Date: Thu Jun 18 2026 - 09:09:13 EST


On Thu, Jun 18, 2026 at 02:47:23PM +0300, Sakari Ailus wrote:
> Hi Elgin,
>
> On Fri, Apr 24, 2026 at 02:55:47PM +0530, Elgin Perumbilly wrote:
> > From: Tarang Raval <tarang.raval@xxxxxxxxxxxxxxxxx>
> >
> > Add crop support to os02g10 by implementing .set_selection() and
> > storing the crop rectangle in subdev state.
> >
> > Initialize the default crop to the active area, make set_fmt() use the
> > current crop, and update the output format when the crop size changes.
> > Also program the sensor window from the active crop/format state instead
> > of using the fixed supported_modes entry.
> >
> > This allows userspace to configure the sensor crop window explicitly.
>
> Please wait for the Common Raw Sensor Model patches to be merged before
> adding this -- we don't have an established way to configure cropping
> before that. Some drivers might do something but it's all a bit haphazard.

Does it mean we should wait for the raw sensor model to merge this
driver ?

Many existing drivers configure analog crop the same way, through the
crop selection rectangle on the source pad. Is there harm in doing so
already ? I wouldn't enable binning and skipping yet, that I agree with.

--
Regards,

Laurent Pinchart