Re: [PATCH 2/3] media: ov02c10: Implement get_selection

From: Bryan O'Donoghue

Date: Tue Sep 08 2026 - 05:23:34 EST


On 05/09/2026 04:07, Felipe Calliari wrote:
The driver does not implement .get_selection, so userspace cannot query
the sensor's native size or active crop rectangle. libcamera reports
"Unable to get rectangle N on pad 0/0: Inappropriate ioctl for device"
and "The sensor kernel driver needs to be fixed" (see
Documentation/sensor_driver_requirements.rst).

Implement .get_selection returning the fixed geometry of the sensor:

- V4L2_SEL_TGT_NATIVE_SIZE / V4L2_SEL_TGT_CROP_BOUNDS: the full
1928x1092 pixel array.
- V4L2_SEL_TGT_CROP / V4L2_SEL_TGT_CROP_DEFAULT: the 1920x1080 active
area, offset by (4, 6), matching the readout window programmed in
sensor_1928x1092_30fps_setting[] (registers 0x3800-0x3807).

The crop is fixed, so sd_state is not consulted.

Signed-off-by: Felipe Calliari<calliarifelipe@xxxxxxxxx>

Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@xxxxxxxxxx>