diff options
author | Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> | 2019-09-04 18:54:07 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+samsung@kernel.org> | 2019-10-01 17:08:33 -0300 |
commit | 104464f573d5e1c58e2901fce209fc4682b6f8e3 (patch) | |
tree | d056fd055e5683d78af919d677411edb36f17721 /drivers/media/platform/rcar-vin/rcar-v4l2.c | |
parent | 20aca4a33bc4c35e8e157db4b653dd14780a33de (diff) |
media: rcar-vin: Do not reset the crop and compose rectangles in s_fmt
The crop and compose rectangles are reset when s_fmt is called
resulting in potentially valid rectangles being lost when updating the
format. Fix this by mapping the rectangles inside the new format.
Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'drivers/media/platform/rcar-vin/rcar-v4l2.c')
-rw-r--r-- | drivers/media/platform/rcar-vin/rcar-v4l2.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/media/platform/rcar-vin/rcar-v4l2.c b/drivers/media/platform/rcar-vin/rcar-v4l2.c index 4d01a13ad14e..3f175e2e0a9a 100644 --- a/drivers/media/platform/rcar-vin/rcar-v4l2.c +++ b/drivers/media/platform/rcar-vin/rcar-v4l2.c @@ -283,8 +283,8 @@ static int rvin_s_fmt_vid_cap(struct file *file, void *priv, return ret; vin->format = f->fmt.pix; - vin->crop = crop; - vin->compose = compose; + v4l2_rect_map_inside(&vin->crop, &crop); + v4l2_rect_map_inside(&vin->compose, &compose); vin->src_rect = crop; return 0; |