media: rcar-vin: Update format alignment constraints
authorNiklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Thu, 25 Nov 2021 23:02:57 +0000 (00:02 +0100)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Tue, 7 Dec 2021 10:29:55 +0000 (11:29 +0100)
commitda6911f330d40cfe115a37249e47643eff555e82
treec3fc59db739e3ddcf340e2540eba92e5848fbfc9
parentd912740881d5f7c13247ec714e9bc59b7cc1aace
media: rcar-vin: Update format alignment constraints

This change fixes two issues with the size constraints for buffers.

- There is no width alignment constraint for RGB formats. Prior to this
  change they were treated as YUV and as a result were more restricted
  than needed. Add a new check to differentiate between the two.

- The minimum width and height supported is 5x2, not 2x4, this is an
  artifact from the driver's soc-camera days. Fix this incorrect
  assumption.

Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/platform/rcar-vin/rcar-v4l2.c