diff --git a/drivers/media/i2c/imx219.c b/drivers/media/i2c/imx219.c index 119002116087c6..26f9560d382c58 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 @@ -965,7 +966,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;