summaryrefslogtreecommitdiff
path: root/drivers/media/platform/rcar-vin
diff options
context:
space:
mode:
authorLad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>2020-10-02 12:26:52 +0200
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>2020-10-08 09:09:37 +0200
commit811b8d66f936f48ec8ed330756c6be226cf28b68 (patch)
tree9f1541833433f6036be7dc718cf2a7d43af4a30f /drivers/media/platform/rcar-vin
parentfd777da3e7a66617d7a04eaa5e003270b02119aa (diff)
downloadlinux-811b8d66f936f48ec8ed330756c6be226cf28b68.tar.gz
media: rcar-vin: rcar-dma: Fix setting VNIS_REG for RAW8 formats
pixelformat in vin priv structure holds V4L2_PIX_FMT_* and not MEDIA_BUS_FMT_* so make sure we check against V4L2_PIX_FMT_* formats while setting the VNIS_REG. Fixes: 8c3e0f67df6c9 ("media: rcar-vin: Extend RAW8 support to all RGB layouts") Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> Reviewed-by: Biju Das <biju.das.jz@bp.renesas.com> Reviewed-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>
Diffstat (limited to 'drivers/media/platform/rcar-vin')
-rw-r--r--drivers/media/platform/rcar-vin/rcar-dma.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/media/platform/rcar-vin/rcar-dma.c b/drivers/media/platform/rcar-vin/rcar-dma.c
index e9a47b705acc..692dea300b0d 100644
--- a/drivers/media/platform/rcar-vin/rcar-dma.c
+++ b/drivers/media/platform/rcar-vin/rcar-dma.c
@@ -600,10 +600,10 @@ void rvin_crop_scale_comp(struct rvin_dev *vin)
* format in 2 pixel unit hence configure VNIS_REG as stride / 2.
*/
switch (vin->format.pixelformat) {
- case MEDIA_BUS_FMT_SBGGR8_1X8:
- case MEDIA_BUS_FMT_SGBRG8_1X8:
- case MEDIA_BUS_FMT_SGRBG8_1X8:
- case MEDIA_BUS_FMT_SRGGB8_1X8:
+ case V4L2_PIX_FMT_SBGGR8:
+ case V4L2_PIX_FMT_SGBRG8:
+ case V4L2_PIX_FMT_SGRBG8:
+ case V4L2_PIX_FMT_SRGGB8:
stride /= 2;
break;
default: