From: "Niklas Söderlund" <niklas.soderlund@ragnatech.se>
To: Tomi Valkeinen <tomi.valkeinen+renesas@ideasonboard.com>
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>,
Sakari Ailus <sakari.ailus@linux.intel.com>,
linux-media@vger.kernel.org, linux-renesas-soc@vger.kernel.org,
linux-kernel@vger.kernel.org,
Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Subject: Re: [PATCH 1/3] media: rcar-vin: Add RCAR_GEN4 model value
Date: Mon, 31 Mar 2025 23:13:28 +0200 [thread overview]
Message-ID: <20250331211328.GB1240431@ragnatech.se> (raw)
In-Reply-To: <20250324-rcar-fix-raw-v1-1-ae56c1c7a2f6@ideasonboard.com>
Hi Tomi,
Thanks for your work.
On 2025-03-24 13:48:52 +0200, Tomi Valkeinen wrote:
> Currently Gen4 VINs are marked as RCAN_GEN3 models. Add a new enum
> value, RCAR_GEN4, and use it for Gen4 VINs. No functional changes in
> this patch.
>
> Signed-off-by: Tomi Valkeinen <tomi.valkeinen+renesas@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Tested-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
> ---
> drivers/media/platform/renesas/rcar-vin/rcar-core.c | 2 +-
> drivers/media/platform/renesas/rcar-vin/rcar-dma.c | 8 ++++----
> drivers/media/platform/renesas/rcar-vin/rcar-vin.h | 1 +
> 3 files changed, 6 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/media/platform/renesas/rcar-vin/rcar-core.c b/drivers/media/platform/renesas/rcar-vin/rcar-core.c
> index ddfb18e6e7a4..88989c5fe636 100644
> --- a/drivers/media/platform/renesas/rcar-vin/rcar-core.c
> +++ b/drivers/media/platform/renesas/rcar-vin/rcar-core.c
> @@ -1275,7 +1275,7 @@ static const struct rvin_info rcar_info_r8a77995 = {
> };
>
> static const struct rvin_info rcar_info_gen4 = {
> - .model = RCAR_GEN3,
> + .model = RCAR_GEN4,
> .use_mc = true,
> .use_isp = true,
> .nv12 = true,
> diff --git a/drivers/media/platform/renesas/rcar-vin/rcar-dma.c b/drivers/media/platform/renesas/rcar-vin/rcar-dma.c
> index 8de871240440..972ae2cb3314 100644
> --- a/drivers/media/platform/renesas/rcar-vin/rcar-dma.c
> +++ b/drivers/media/platform/renesas/rcar-vin/rcar-dma.c
> @@ -803,7 +803,7 @@ static int rvin_setup(struct rvin_dev *vin)
> }
>
> /* Make sure input interface and input format is valid. */
> - if (vin->info->model == RCAR_GEN3) {
> + if (vin->info->model == RCAR_GEN3 || vin->info->model == RCAR_GEN4) {
> switch (vnmc & VNMC_INF_MASK) {
> case VNMC_INF_YUV8_BT656:
> case VNMC_INF_YUV10_BT656:
> @@ -826,7 +826,7 @@ static int rvin_setup(struct rvin_dev *vin)
> }
>
> /* Enable VSYNC Field Toggle mode after one VSYNC input */
> - if (vin->info->model == RCAR_GEN3)
> + if (vin->info->model == RCAR_GEN3 || vin->info->model == RCAR_GEN4)
> dmr2 = VNDMR2_FTEV;
> else
> dmr2 = VNDMR2_FTEV | VNDMR2_VLV(1);
> @@ -926,7 +926,7 @@ static int rvin_setup(struct rvin_dev *vin)
> if (input_is_yuv == output_is_yuv)
> vnmc |= VNMC_BPS;
>
> - if (vin->info->model == RCAR_GEN3) {
> + if (vin->info->model == RCAR_GEN3 || vin->info->model == RCAR_GEN4) {
> /* Select between CSI-2 and parallel input */
> if (vin->is_csi)
> vnmc &= ~VNMC_DPINE;
> @@ -1351,7 +1351,7 @@ 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 &&
> + if ((vin->info->model == RCAR_GEN3 || vin->info->model == RCAR_GEN4) &&
> vin->format.pixelformat == V4L2_PIX_FMT_NV12)
> return -EPIPE;
>
> diff --git a/drivers/media/platform/renesas/rcar-vin/rcar-vin.h b/drivers/media/platform/renesas/rcar-vin/rcar-vin.h
> index f87d4bc9e53e..34bbd1343bf6 100644
> --- a/drivers/media/platform/renesas/rcar-vin/rcar-vin.h
> +++ b/drivers/media/platform/renesas/rcar-vin/rcar-vin.h
> @@ -39,6 +39,7 @@ enum model_id {
> RCAR_M1,
> RCAR_GEN2,
> RCAR_GEN3,
> + RCAR_GEN4,
> };
>
> enum rvin_csi_id {
>
> --
> 2.43.0
>
--
Kind Regards,
Niklas Söderlund
next prev parent reply other threads:[~2025-03-31 21:13 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-24 11:48 [PATCH 0/3] media: rcar: Fix RAW formats Tomi Valkeinen
2025-03-24 11:48 ` [PATCH 1/3] media: rcar-vin: Add RCAR_GEN4 model value Tomi Valkeinen
2025-03-31 21:13 ` Niklas Söderlund [this message]
2025-03-24 11:48 ` [PATCH 2/3] media: rcar-vin: Fix RAW8 Tomi Valkeinen
2025-03-31 21:16 ` Niklas Söderlund
2025-03-24 11:48 ` [PATCH 3/3] media: rcar-vin: Fix RAW10 Tomi Valkeinen
2025-03-31 21:11 ` Niklas Söderlund
2025-04-03 8:15 ` Tomi Valkeinen
2025-04-03 8:57 ` Niklas Söderlund
2025-04-03 9:12 ` Tomi Valkeinen
2025-04-03 9:36 ` Niklas Söderlund
2025-04-03 8:18 ` Tomi Valkeinen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250331211328.GB1240431@ragnatech.se \
--to=niklas.soderlund@ragnatech.se \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=mchehab+huawei@kernel.org \
--cc=mchehab@kernel.org \
--cc=sakari.ailus@linux.intel.com \
--cc=tomi.valkeinen+renesas@ideasonboard.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®