All of lore.kernel.org
 help / color / mirror / Atom feed
From: Frank Li <Frank.li@oss.nxp.com>
To: sashiko-reviews@lists.linux.dev
Cc: Jiaqi Shi <shijiaqi_develop@163.com>,
	imx@lists.linux.dev, Frank.Li@kernel.org, media-ci@linuxtv.org
Subject: Re: [PATCH v6 1/2] media: imx: remove legacy video node control and format handling
Date: Mon, 23 Nov 2026 11:56:41 -0600	[thread overview]
Message-ID: <awR-WfnTvAxN6Lcg@SMW015318> (raw)
In-Reply-To: <sashiko-outbox-227913@kernel.org>

On Sun, Nov 22, 2026 at 11:53:32AM +0000, sashiko-bot@kernel.org wrote:
> Thank you for your contribution! Sashiko AI review found 1 potential
> issue to consider:
> - [Medium] media: imx: callers of imx_media_capture_device_init() pass
>   legacy_api
> --
>
> commit f477c79fad0e434429f9fa5c4d3df4807bcb087f
> Author: Jiaqi Shi <shijiaqi_develop@163.com>
>
> media: imx: remove legacy video node control and format handling
>
> This commit removes subdevice control inheritance to capture video nodes
> and switches capture nodes to source-independent format negotiation with
> stream-time format validation.
>
> > diff --git a/drivers/staging/media/imx/imx-ic-prpencvf.c b/drivers/staging/media/imx/imx-ic-prpencvf.c
> > index 3430ddeac3569..bd4c2e7a0b8d0 100644
> > --- a/drivers/staging/media/imx/imx-ic-prpencvf.c
> > +++ b/drivers/staging/media/imx/imx-ic-prpencvf.c
>
> [ ... ]
>
> > @@ -1280,13 +1281,13 @@ static int prp_registered(struct v4l2_subdev *sd)
> >
> >  	priv->vdev = imx_media_capture_device_init(ic_priv->ipu_dev,
> >  						   &ic_priv->sd,
> > -						   PRPENCVF_SRC_PAD, true);
> > +						   PRPENCVF_SRC_PAD, true, true);
>
> [Severity: Medium]
> Should prp_registered() and csi_registered() pass legacy_api = false (or
> should the legacy_api parameter and capture_legacy_ioctl_ops be removed)?
>
> Because both callers of imx_media_capture_device_init() still pass
> legacy_api = true:
>
> drivers/staging/media/imx/imx-media-capture.c:imx_media_capture_device_init() {
> 	...
> 	vfd->ioctl_ops = legacy_api ? &capture_legacy_ioctl_ops
> 		       : &capture_ioctl_ops;
> 	...
> 	vfd->device_caps = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_STREAMING
> 			 | (!legacy_api ? V4L2_CAP_IO_MC : 0);
> }
>
> V4L2_CAP_IO_MC is never set on any capture device, so v4l_enum_fmt() in
> v4l2-core zeroes f->mbus_code before calling capture_enum_fmt_vid_cap(),
> making its f->mbus_code filtering unreachable from userspace.  In
> addition, capture_ioctl_ops is left unused while
> capture_legacy_enum_frameintervals() remains active and coupled to the
> source subdevice's V4L2_SUBDEV_FORMAT_ACTIVE configuration.


Please check this one?

Frank
>
> --
> Sashiko AI review · https://sashiko.dev/#/patchset/20261122114205.494704-1-shijiaqi_develop@163.com?part=1

  reply	other threads:[~2026-11-23 17:56 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-22 11:42 [PATCH v6 0/2] media: imx: staging cleanup and FIM export to v4l2-core Jiaqi Shi
2026-11-22 11:42 ` [PATCH v6 1/2] media: imx: remove legacy video node control and format handling Jiaqi Shi
2026-11-22 11:53   ` sashiko-bot
2026-11-23 17:56     ` Frank Li [this message]
2026-11-24  5:38       ` Jiaqi Shi
2026-11-22 11:42 ` [PATCH v6 2/2] media: v4l2-core: add frame interval monitor helper Jiaqi Shi
2026-11-24  5:37 ` [PATCH v6 0/2] media: imx: staging cleanup and FIM export to v4l2-core Dan Carpenter
2026-11-25 11:00 ` Hans Verkuil
2026-11-27 23:41   ` Jiaqi Shi

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=awR-WfnTvAxN6Lcg@SMW015318 \
    --to=frank.li@oss.nxp.com \
    --cc=Frank.Li@kernel.org \
    --cc=imx@lists.linux.dev \
    --cc=media-ci@linuxtv.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=shijiaqi_develop@163.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.