diff mbox

[01/16] rcar-vin: reset bytesperline and sizeimage when resetting format

Message ID 20170314185957.25253-2-niklas.soderlund+renesas@ragnatech.se (mailing list archive)
State New, archived
Headers show

Commit Message

Niklas Söderlund March 14, 2017, 6:59 p.m. UTC
These two where 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>
---
 drivers/media/platform/rcar-vin/rcar-v4l2.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

Sergei Shtylyov March 15, 2017, 9:07 a.m. UTC | #1
Hello!

On 3/14/2017 9:59 PM, Niklas Söderlund wrote:

> These two where forgotten when refactoring the format reset code. If

    s/where/were/?

> 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>
[...]

MBR, Sergei
Laurent Pinchart May 10, 2017, 1:22 p.m. UTC | #2
Hi Niklas,

Thank you for the patch.

On Tuesday 14 Mar 2017 19:59:42 Niklas Söderlund wrote:
> These two where 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>

With the commit message typo fixed,

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

> ---
>  drivers/media/platform/rcar-vin/rcar-v4l2.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/media/platform/rcar-vin/rcar-v4l2.c
> b/drivers/media/platform/rcar-vin/rcar-v4l2.c index
> 2bbe6d495fa634da..69bc4cfea6a8aeb5 100644
> --- a/drivers/media/platform/rcar-vin/rcar-v4l2.c
> +++ b/drivers/media/platform/rcar-vin/rcar-v4l2.c
> @@ -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;
>  }
diff mbox

Patch

diff --git a/drivers/media/platform/rcar-vin/rcar-v4l2.c b/drivers/media/platform/rcar-vin/rcar-v4l2.c
index 2bbe6d495fa634da..69bc4cfea6a8aeb5 100644
--- a/drivers/media/platform/rcar-vin/rcar-v4l2.c
+++ b/drivers/media/platform/rcar-vin/rcar-v4l2.c
@@ -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;
 }