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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 27 Jan 2022 10:04:35 +0000 (11:04 +0100)
commitd747b4831d5f1e16a8377b8895c1fb4ec419ca25
tree2728aa0de7784421e356142942924fd13a6e6843
parent1c9bbda87cdc199e18a04c656e326eec140838ee
media: rcar-vin: Update format alignment constraints

[ Upstream commit da6911f330d40cfe115a37249e47643eff555e82 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/media/platform/rcar-vin/rcar-v4l2.c