Re: [PATCH v3 3/3] media: i2c: os02g10: implement crop handling with set_selection
From: Sakari Ailus
Date: Thu Jun 18 2026 - 07:49:45 EST
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.
--
Kind regards,
Sakari Ailus