diff --git a/drivers/media/i2c/imx219.c b/drivers/media/i2c/imx219.c index bd37bee48e98c2..0672c2a3f421f8 100644 --- a/drivers/media/i2c/imx219.c +++ b/drivers/media/i2c/imx219.c @@ -26,6 +26,7 @@ #include #include #include +#include #include #define IMX219_REG_VALUE_08BIT 1 @@ -964,7 +965,10 @@ static int imx219_set_pad_format(struct v4l2_subdev *sd, fmt->pad); *framefmt = fmt->format; } else if (imx219->mode != mode || - imx219->fmt.code != fmt->format.code) { + imx219->fmt.code != fmt->format.code || + !v4l2_rect_equal(&imx219->crop, &mode->crop) || + imx219->compose.height != mode->height || + imx219->compose.width != mode->width) { struct v4l2_rect curr_compose = imx219->compose; imx219->mode = mode;