media: rcar-vin: simplify how formats are set and reset
authorNiklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Sat, 14 Apr 2018 11:57:09 +0000 (07:57 -0400)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Fri, 20 Apr 2018 13:57:45 +0000 (09:57 -0400)
commit897e371389e7751438bf59409cc7098b9599ce21
treec925b904fa0b1ab4f5e05d32be629b995c6b1994
parenta0b6d712f53ace54d4db8fcb99bc09415efc72fc
media: rcar-vin: simplify how formats are set and reset

With the recent cleanup of the format code to prepare for Gen3 it's
possible to simplify the Gen2 format code path as well. Clean up the
process by defining two functions to handle the set format and reset of
format when the standard is changed.

While at it replace the driver local struct rvin_source_fmt with a
struct v4l2_rect as all it's used for is keep track of the source
dimensions.

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
drivers/media/platform/rcar-vin/rcar-vin.h