[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230520181750.823365-6-sashal@kernel.org>
Date: Sat, 20 May 2023 14:17:38 -0400
From: Sasha Levin <sashal@...nel.org>
To: linux-kernel@...r.kernel.org, stable@...r.kernel.org
Cc: Niklas Söderlund
<niklas.soderlund+renesas@...natech.se>,
Hans Verkuil <hverkuil-cisco@...all.nl>,
Sasha Levin <sashal@...nel.org>, niklas.soderlund@...natech.se,
mchehab@...nel.org, linux-media@...r.kernel.org,
linux-renesas-soc@...r.kernel.org
Subject: [PATCH AUTOSEL 6.3 06/18] media: rcar-vin: Gen3 can not scale NV12
From: Niklas Söderlund <niklas.soderlund+renesas@...natech.se>
[ Upstream commit 879c5a458e532b95783ce27f704d1b21573066f7 ]
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@...natech.se>
Signed-off-by: Hans Verkuil <hverkuil-cisco@...all.nl>
Signed-off-by: Sasha Levin <sashal@...nel.org>
---
drivers/media/platform/renesas/rcar-vin/rcar-dma.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/media/platform/renesas/rcar-vin/rcar-dma.c b/drivers/media/platform/renesas/rcar-vin/rcar-dma.c
index 98bfd445a649b..cc6b59e5621ae 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 {
--
2.39.2
Powered by blists - more mailing lists