From: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
To: Dan Scally <dan.scally@ideasonboard.com>
Cc: "Jacopo Mondi" <jacopo.mondi@ideasonboard.com>,
"Barnabás Pőcze" <barnabas.pocze@ideasonboard.com>,
"Mauro Carvalho Chehab" <mchehab@kernel.org>,
"Hans Verkuil" <hverkuil+cisco@kernel.org>,
linux-media@vger.kernel.org, linux-renesas-soc@vger.kernel.org,
linux-kernel@vger.kernel.org,
"Jacopo Mondi" <jacopo.mondi+renesas@ideasonboard.com>,
"Barnabás Pőcze" <barnabas.pocze+renesas@ideasonboard.com>,
stable@vger.kernel.org
Subject: Re: [PATCH 3/7] media: rzv2h-ivc: Write AXIRX_PIXFMT once
Date: Fri, 13 Mar 2026 17:12:50 +0100 [thread overview]
Message-ID: <abQ3X1MA27VKrq-N@zed> (raw)
In-Reply-To: <75c4cacf-9f52-4904-9cf6-44425fabaea1@ideasonboard.com>
Hi Dan
On Fri, Mar 13, 2026 at 04:07:47PM +0000, Dan Scally wrote:
> Hi Jacopo (and Barnabás)
>
> On 13/03/2026 11:13, Jacopo Mondi wrote:
> > From: Barnabás Pőcze <barnabas.pocze+renesas@ideasonboard.com>
> >
> > The documentation prescribes that invalid formats should not be set,
> > so do a single write to ensure that both the CLFMT and DTYPE fields
> > are set to valid values.
> >
> > Cc: stable@vger.kernel.org
> > Fixes: f0b3984d821b ("media: platform: Add Renesas Input Video Control block driver")
> > Signed-off-by: Barnabás Pőcze <barnabas.pocze+renesas@ideasonboard.com>
> > Signed-off-by: Jacopo Mondi <jacopo.mondi+renesas@ideasonboard.com>
> > ---
> > drivers/media/platform/renesas/rzv2h-ivc/rzv2h-ivc-video.c | 8 ++++----
> > drivers/media/platform/renesas/rzv2h-ivc/rzv2h-ivc.h | 7 ++++---
> > 2 files changed, 8 insertions(+), 7 deletions(-)
> >
> > diff --git a/drivers/media/platform/renesas/rzv2h-ivc/rzv2h-ivc-video.c b/drivers/media/platform/renesas/rzv2h-ivc/rzv2h-ivc-video.c
> > index bfe5b0c7045e..d894a880c33f 100644
> > --- a/drivers/media/platform/renesas/rzv2h-ivc/rzv2h-ivc-video.c
> > +++ b/drivers/media/platform/renesas/rzv2h-ivc/rzv2h-ivc-video.c
> > @@ -215,10 +215,10 @@ static void rzv2h_ivc_format_configure(struct rzv2h_ivc *ivc)
> > /* Currently only CRU packed pixel formats are supported */
> > rzv2h_ivc_write(ivc, RZV2H_IVC_REG_AXIRX_PXFMT,
> > - RZV2H_IVC_INPUT_FMT_CRU_PACKED);
> > -
> > - rzv2h_ivc_update_bits(ivc, RZV2H_IVC_REG_AXIRX_PXFMT,
> > - RZV2H_IVC_PXFMT_DTYPE, fmt->dtype);
> > + FIELD_PREP(RZV2H_IVC_AXIRX_PXFMT_FIELD_DTYPE,
> > + fmt->dtype) |
> > + FIELD_PREP(RZV2H_IVC_AXIRX_PXFMT_FIELD_CLFMT,
> > + RZV2H_IVC_CLFMT_CRU_PACKED));
>
> TIL of FIELD_PREP(), I like that! Maybe #include <linux/bitfield.h> though?
It has been included in the previous patch if I'm not mistaken ?
>
> Reviewed-by: Daniel Scally <dan.scally@ideasonboard.com>
>
> > rzv2h_ivc_write(ivc, RZV2H_IVC_REG_AXIRX_HSIZE, pix->width);
> > rzv2h_ivc_write(ivc, RZV2H_IVC_REG_AXIRX_VSIZE, pix->height);
> > diff --git a/drivers/media/platform/renesas/rzv2h-ivc/rzv2h-ivc.h b/drivers/media/platform/renesas/rzv2h-ivc/rzv2h-ivc.h
> > index 4ef44c8b4656..54c70de31c1e 100644
> > --- a/drivers/media/platform/renesas/rzv2h-ivc/rzv2h-ivc.h
> > +++ b/drivers/media/platform/renesas/rzv2h-ivc/rzv2h-ivc.h
> > @@ -24,9 +24,10 @@
> > #define RZV2H_IVC_ONE_EXPOSURE 0x00
> > #define RZV2H_IVC_TWO_EXPOSURE 0x01
> > #define RZV2H_IVC_REG_AXIRX_PXFMT 0x0004
> > -#define RZV2H_IVC_INPUT_FMT_MIPI (0 << 16)
> > -#define RZV2H_IVC_INPUT_FMT_CRU_PACKED BIT(16)
> > -#define RZV2H_IVC_PXFMT_DTYPE GENMASK(7, 0)
> > +#define RZV2H_IVC_AXIRX_PXFMT_FIELD_CLFMT GENMASK(17, 16)
> > +#define RZV2H_IVC_CLFMT_MIPI 0
> > +#define RZV2H_IVC_CLFMT_CRU_PACKED 1
> > +#define RZV2H_IVC_AXIRX_PXFMT_FIELD_DTYPE GENMASK(7, 0)
> > #define RZV2H_IVC_REG_AXIRX_SADDL_P0 0x0010
> > #define RZV2H_IVC_REG_AXIRX_SADDH_P0 0x0014
> > #define RZV2H_IVC_REG_AXIRX_SADDL_P1 0x0018
> >
>
next prev parent reply other threads:[~2026-03-13 16:12 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-13 11:13 [PATCH 0/7] media: renesas: rzv2h-ivc: Fix concurrent job scheduling Jacopo Mondi
2026-03-13 11:13 ` [PATCH 1/7] media: rzv2h-ivc: Revise default VBLANK formula Jacopo Mondi
2026-03-13 11:13 ` [PATCH 2/7] media: rzv2h-ivc: Fix AXIRX_VBLANK register write Jacopo Mondi
2026-03-13 16:15 ` Dan Scally
2026-03-18 8:24 ` Barnabás Pőcze
2026-03-13 11:13 ` [PATCH 3/7] media: rzv2h-ivc: Write AXIRX_PIXFMT once Jacopo Mondi
2026-03-13 16:07 ` Dan Scally
2026-03-13 16:12 ` Jacopo Mondi [this message]
2026-03-13 16:14 ` Dan Scally
2026-03-13 11:14 ` [PATCH 4/7] media: rzv2h-ivc: Fix FM_STOP register write Jacopo Mondi
2026-03-13 20:39 ` Dan Scally
2026-03-13 11:14 ` [PATCH 5/7] media: rzv2h-ivc: Fix concurrent buffer list access Jacopo Mondi
2026-03-13 22:11 ` Dan Scally
2026-03-13 11:14 ` [PATCH 6/7] media: rzv2h-ivc: Avoid double job scheduling Jacopo Mondi
2026-03-18 8:00 ` Dan Scally
2026-03-18 8:18 ` Barnabás Pőcze
2026-03-20 17:16 ` [PATCH 0/7] media: renesas: rzv2h-ivc: Fix concurrent " Lad, Prabhakar
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=abQ3X1MA27VKrq-N@zed \
--to=jacopo.mondi@ideasonboard.com \
--cc=barnabas.pocze+renesas@ideasonboard.com \
--cc=barnabas.pocze@ideasonboard.com \
--cc=dan.scally@ideasonboard.com \
--cc=hverkuil+cisco@kernel.org \
--cc=jacopo.mondi+renesas@ideasonboard.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=stable@vger.kernel.org \
/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