meta-dcm/recipes-kernel/linux/linux-stm32mp/0003-fix-atmel-isi-v4l2-api...

25 lines
880 B
Diff

--- a/drivers/media/platform/atmel/atmel-isi.c 2025-06-02 16:35:10.613553904 +0200
+++ b/drivers/media/platform/atmel/atmel-isi.c 2025-06-02 16:42:41.343980909 +0200
@@ -572,11 +572,17 @@
* just use the maximum ISI can receive.
*/
if (ret) {
- sd_state->pads->try_crop.width = MAX_SUPPORT_WIDTH;
- sd_state->pads->try_crop.height = MAX_SUPPORT_HEIGHT;
+ struct v4l2_rect *crop = v4l2_subdev_get_try_crop(isi->entity.subdev, sd_state, 0);
+ crop->left = 0;
+ crop->top = 0;
+ crop->width = MAX_SUPPORT_WIDTH;
+ crop->height = MAX_SUPPORT_HEIGHT;
} else {
- sd_state->pads->try_crop.width = fse.max_width;
- sd_state->pads->try_crop.height = fse.max_height;
+ struct v4l2_rect *crop = v4l2_subdev_get_try_crop(isi->entity.subdev, sd_state, 0);
+ crop->left = 0;
+ crop->top = 0;
+ crop->width = fse.max_width;
+ crop->height = fse.max_height;
}
}