Skip to content

Commit

Permalink
media: imx219: fix change format when crop/compose has changed
Browse files Browse the repository at this point in the history
Signed-off-by: Vinay Varma <[email protected]>
  • Loading branch information
vvarma committed Sep 19, 2023
1 parent 801cd1b commit 3cbc4a0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion drivers/media/i2c/imx219.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#include <media/v4l2-event.h>
#include <media/v4l2-fwnode.h>
#include <media/v4l2-mediabus.h>
#include <media/v4l2-rect.h>
#include <asm/unaligned.h>

#define IMX219_REG_VALUE_08BIT 1
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 3cbc4a0

Please sign in to comment.