From: Alain Volmat <alain.volmat@foss.st.com>
To: Hans Verkuil <hverkuil+cisco@kernel.org>
Cc: Hugues Fruchet <hugues.fruchet@foss.st.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Maxime Coquelin <mcoquelin.stm32@gmail.com>,
"Alexandre Torgue" <alexandre.torgue@foss.st.com>,
<linux-media@vger.kernel.org>,
<linux-stm32@st-md-mailman.stormreply.com>,
<linux-arm-kernel@lists.infradead.org>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v3 10/13] media: stm32: dcmipp: pixelproc: addition of dcmipp-pixelproc subdev
Date: Thu, 20 Aug 2026 09:13:11 +0200 [thread overview]
Message-ID: <aoapB478q-3OVY9c@gnbcxd0016.gnb.st.com> (raw)
In-Reply-To: <23512cf4-1991-4ee8-96c5-a83e8ba197ca@kernel.org>
Hi Hans,
thanks for the review,
On Mon, Jul 27, 2026 at 03:49:38PM +0200, Hans Verkuil wrote:
> Hi Alain,
>
> Some control-related comments:
>
> On 24/07/2026 18:13, Alain Volmat wrote:
> > Addition of the driver for dcmipp-pixelproc subdev. This subdev is the
> > last one before the capture device at the tail of both main and
> > aux pipelines.
> >
> > It is in charge of:
> > - framerate adjustment
> > - downscale
> > - gamma correction
> > - color conversion
> > - pixel packing
> >
> > Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
> > ---
> > .../media/platform/st/stm32/stm32-dcmipp/Makefile | 2 +-
> > .../platform/st/stm32/stm32-dcmipp/dcmipp-common.h | 4 +
> > .../st/stm32/stm32-dcmipp/dcmipp-pixelproc.c | 941 +++++++++++++++++++++
> > 3 files changed, 946 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/media/platform/st/stm32/stm32-dcmipp/Makefile b/drivers/media/platform/st/stm32/stm32-dcmipp/Makefile
> > index a708534a51af4..7178934bb116b 100644
> > --- a/drivers/media/platform/st/stm32/stm32-dcmipp/Makefile
> > +++ b/drivers/media/platform/st/stm32/stm32-dcmipp/Makefile
> > @@ -1,5 +1,5 @@
> > # SPDX-License-Identifier: GPL-2.0
> > stm32-dcmipp-y := dcmipp-core.o dcmipp-common.o dcmipp-input.o dcmipp-byteproc.o dcmipp-bytecap.o
> > -stm32-dcmipp-y += dcmipp-pixelcommon.o dcmipp-isp.o
> > +stm32-dcmipp-y += dcmipp-pixelcommon.o dcmipp-isp.o dcmipp-pixelproc.o
> >
> > obj-$(CONFIG_VIDEO_STM32_DCMIPP) += stm32-dcmipp.o
> > diff --git a/drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-common.h b/drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-common.h
> > index e04fde86550a5..8f41473605aae 100644
> > --- a/drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-common.h
> > +++ b/drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-common.h
> > @@ -285,5 +285,9 @@ void dcmipp_bytecap_ent_release(struct dcmipp_ent_device *ved);
> > struct dcmipp_ent_device *dcmipp_isp_ent_init(const char *entity_name,
> > struct dcmipp_device *dcmipp);
> > void dcmipp_isp_ent_release(struct dcmipp_ent_device *ved);
> > +struct dcmipp_ent_device *
> > +dcmipp_pixelproc_ent_init(const char *entity_name,
> > + struct dcmipp_device *dcmipp);
> > +void dcmipp_pixelproc_ent_release(struct dcmipp_ent_device *ved);
> >
> > #endif
> > diff --git a/drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-pixelproc.c b/drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-pixelproc.c
> > new file mode 100644
> > index 0000000000000..4372c75508725
> > --- /dev/null
> > +++ b/drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-pixelproc.c
>
> <snip>
>
> > +/*
> > + * Functions handling controls
> > + */
> > +#define V4L2_CID_PIXELPROC_GAMMA_CORRECTION (V4L2_CID_USER_BASE | 0x1001)
>
> You need to reserve a range in include/uapi/linux/v4l2-controls.h for this
> driver (search for V4L2_CID_USER_MALI_C55_BASE).
Done in v4.
>
> And the define should include the driver name. 'PIXELPROC' is much too generic.
> It probably should be called DCMIPP_PIXELPROC.
Done in v4.
> Please document what this control does. Typically a new header is added to
> include/linux/uapi for this driver containing the CID and the documentation.
> See: include/uapi/linux/dw100.h
Looking at other drivers such as raspberry etc, they seems to have their
header in include/uapi/linux/media/xx so I added a new header include/uapi/linux/media/st/dcmipp_config.h
>
> > +
> > +static int dcmipp_pixelproc_s_ctrl(struct v4l2_ctrl *ctrl)
> > +{
> > + struct dcmipp_pixelproc_device *pixelproc =
> > + container_of(ctrl->handler,
> > + struct dcmipp_pixelproc_device, ctrls);
> > +
> > + if (!pm_runtime_get_if_in_use(pixelproc->dev))
> > + return 0;
> > +
> > + switch (ctrl->id) {
> > + case V4L2_CID_PIXELPROC_GAMMA_CORRECTION:
> > + reg_write(pixelproc, DCMIPP_PxGMCR(pixelproc->pipe_id),
> > + (ctrl->val ? DCMIPP_PxGMCR_ENABLE : 0));
> > + break;
> > + }
> > +
> > + pm_runtime_put(pixelproc->dev);
> > +
> > + return 0;
> > +};
> > +
> > +static const struct v4l2_ctrl_ops dcmipp_pixelproc_ctrl_ops = {
> > + .s_ctrl = dcmipp_pixelproc_s_ctrl,
> > +};
> > +
> > +static const struct v4l2_ctrl_config dcmipp_pixelproc_ctrls[] = {
> > + {
> > + .ops = &dcmipp_pixelproc_ctrl_ops,
> > + .id = V4L2_CID_PIXELPROC_GAMMA_CORRECTION,
> > + .type = V4L2_CTRL_TYPE_BOOLEAN,
> > + .name = "Gamma correction",
>
> "Gamma Correction". More likely, "Gamma Correction Enable" (and ENABLE should probably
> be in the CID define as well).
Done in v4.
Regards,
Alain
next prev parent reply other threads:[~2026-08-20 7:13 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-24 16:13 [PATCH v3 00/13] media: stm32: dcmipp: add support for MP2x pixel pipes Alain Volmat
2026-07-24 16:13 ` [PATCH v3 01/13] media: stm32: dcmipp: share struct dcmipp_device among subdevs Alain Volmat
2026-07-24 16:13 ` [PATCH v3 02/13] media: stm32: dcmipp: make dcmipp_state & cmsr2 read common Alain Volmat
2026-07-24 16:13 ` [PATCH v3 03/13] media: stm32: dcmipp: bytecap: protect CMIER register access Alain Volmat
2026-07-24 16:13 ` [PATCH v3 04/13] media: stm32: dcmipp: move common structures in dcmipp-common.h Alain Volmat
2026-07-24 16:13 ` [PATCH v3 05/13] media: stm32: dcmipp: correct swap in YUYV data with parallel input Alain Volmat
2026-07-24 16:13 ` [PATCH v3 06/13] media: stm32: dcmipp: configure csi input of all pipes on stm32mp25 Alain Volmat
2026-07-24 16:13 ` [PATCH v3 07/13] media: stm32: dcmipp: introduce a dcmipp global media_pipeline Alain Volmat
2026-07-24 16:13 ` [PATCH v3 08/13] media: stm32: dcmipp: add pixel pipes helper functions Alain Volmat
2026-07-24 16:13 ` [PATCH v3 09/13] media: stm32: dcmipp: addition of a dcmipp-isp subdev Alain Volmat
2026-07-24 16:13 ` [PATCH v3 10/13] media: stm32: dcmipp: pixelproc: addition of dcmipp-pixelproc subdev Alain Volmat
2026-07-27 13:49 ` Hans Verkuil
2026-08-20 7:13 ` Alain Volmat [this message]
2026-07-24 16:13 ` [PATCH v3 11/13] media: stm32: dcmipp: add pixel-pipe support in bytecap Alain Volmat
2026-07-24 16:13 ` [PATCH v3 12/13] media: stm32: dcmipp: rename bytecap into capture Alain Volmat
2026-07-24 16:13 ` [PATCH v3 13/13] media: stm32: dcmipp: instantiate & link stm32mp25 subdevs Alain Volmat
2026-07-27 13:53 ` [PATCH v3 00/13] media: stm32: dcmipp: add support for MP2x pixel pipes Hans Verkuil
2026-08-20 7:14 ` Alain Volmat
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=aoapB478q-3OVY9c@gnbcxd0016.gnb.st.com \
--to=alain.volmat@foss.st.com \
--cc=alexandre.torgue@foss.st.com \
--cc=hugues.fruchet@foss.st.com \
--cc=hverkuil+cisco@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=mchehab@kernel.org \
--cc=mcoquelin.stm32@gmail.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