summaryrefslogtreecommitdiff
path: root/drivers/media
diff options
context:
space:
mode:
authorNiklas Söderlund <niklas.soderlund+renesas@ragnatech.se>2023-02-11 23:54:31 +0300
committerMauro Carvalho Chehab <mchehab@kernel.org>2023-05-08 14:11:24 +0300
commit879c5a458e532b95783ce27f704d1b21573066f7 (patch)
tree3ab90165c6d6ad97de7bdf6ad21eaaf6ad8a1b87 /drivers/media
parentba0ad6ed89fd5dada3b7b65ef2b08e95d449d4ab (diff)
downloadlinux-879c5a458e532b95783ce27f704d1b21573066f7.tar.xz
media: rcar-vin: Gen3 can not scale NV12
The VIN modules on Gen3 can not scale NV12, fail format validation if the user tries. Currently no frames are produced if this is attempted. Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/platform/renesas/rcar-vin/rcar-dma.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/media/platform/renesas/rcar-vin/rcar-dma.c b/drivers/media/platform/renesas/rcar-vin/rcar-dma.c
index 98bfd445a649..cc6b59e5621a 100644
--- a/drivers/media/platform/renesas/rcar-vin/rcar-dma.c
+++ b/drivers/media/platform/renesas/rcar-vin/rcar-dma.c
@@ -1312,6 +1312,11 @@ static int rvin_mc_validate_format(struct rvin_dev *vin, struct v4l2_subdev *sd,
}
if (rvin_scaler_needed(vin)) {
+ /* Gen3 can't scale NV12 */
+ if (vin->info->model == RCAR_GEN3 &&
+ vin->format.pixelformat == V4L2_PIX_FMT_NV12)
+ return -EPIPE;
+
if (!vin->scaler)
return -EPIPE;
} else {