[media] rcar-vin: use rvin_reset_format() in S_DV_TIMINGS
authorNiklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Wed, 24 May 2017 00:15:25 +0000 (21:15 -0300)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Tue, 6 Jun 2017 13:06:21 +0000 (10:06 -0300)
Use rvin_reset_format() in rvin_s_dv_timings() instead of just resetting
a few fields. This fixes an issue where the field format was not
properly set after S_DV_TIMINGS.

Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
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 69bc4cf..7ca2759 100644 (file)
@@ -573,12 +573,8 @@ static int rvin_s_dv_timings(struct file *file, void *priv_fh,
        if (ret)
                return ret;
 
-       vin->source.width = timings->bt.width;
-       vin->source.height = timings->bt.height;
-       vin->format.width = timings->bt.width;
-       vin->format.height = timings->bt.height;
-
-       return 0;
+       /* Changing the timings will change the width/height */
+       return rvin_reset_format(vin);
 }
 
 static int rvin_g_dv_timings(struct file *file, void *priv_fh,