[media] rcar-vin: reset bytesperline and sizeimage when resetting format
authorNiklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Wed, 24 May 2017 00:15:24 +0000 (21:15 -0300)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Tue, 6 Jun 2017 13:05:56 +0000 (10:05 -0300)
These two were forgotten when refactoring the format reset code. If
they are not also reset at the same time as width and height the format
returned from G_FMT will not match reality.

Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/platform/rcar-vin/rcar-v4l2.c

index 2bbe6d495fa634da37ce8ed2aa8ba7385b43419f..69bc4cfea6a8aeb5428ff9267988bab9fd7ffdd1 100644 (file)
@@ -151,6 +151,9 @@ static int rvin_reset_format(struct rvin_dev *vin)
 
        rvin_reset_crop_compose(vin);
 
+       vin->format.bytesperline = rvin_format_bytesperline(&vin->format);
+       vin->format.sizeimage = rvin_format_sizeimage(&vin->format);
+
        return 0;
 }