From: sashiko-bot@kernel.org
To: "Jiaqi Shi" <shijiaqi_develop@163.com>, imx@lists.linux.dev
Cc: Frank.Li@kernel.org, media-ci@linuxtv.org
Subject: Re: [PATCH v4 1/2] media: imx: remove legacy video node control and format handling
Date: Sat, 21 Nov 2026 18:52:53 +0000 [thread overview]
Message-ID: <sashiko-outbox-227277@kernel.org> (raw)
In-Reply-To: <20261121184033.429680-2-shijiaqi_develop@163.com>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Medium] media: imx: callers of imx_media_capture_device_init() still
pass legacy_api
--
commit 38a236574cfd2ca3669e9b8ee53cd0ec8b2e47d4
Author: Jiaqi Shi <shijiaqi_develop@163.com>
media: imx: remove legacy video node control and format handling
This commit removes V4L2 control inheritance from pipeline subdevices to
capture video nodes and switches capture video nodes to
source-independent format ioctls and default formats.
> 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);
[ ... ]
> diff --git a/drivers/staging/media/imx/imx-media-capture.c b/drivers/staging/media/imx/imx-media-capture.c
> index 9216a221b72f4..f587179503c21 100644
> --- a/drivers/staging/media/imx/imx-media-capture.c
> +++ b/drivers/staging/media/imx/imx-media-capture.c
[ ... ]
> @@ -566,10 +474,10 @@ static const struct v4l2_ioctl_ops capture_legacy_ioctl_ops = {
> .vidioc_enum_framesizes = capture_legacy_enum_framesizes,
> .vidioc_enum_frameintervals = capture_legacy_enum_frameintervals,
>
> - .vidioc_enum_fmt_vid_cap = capture_legacy_enum_fmt_vid_cap,
> + .vidioc_enum_fmt_vid_cap = capture_enum_fmt_vid_cap,
> .vidioc_g_fmt_vid_cap = capture_g_fmt_vid_cap,
> - .vidioc_try_fmt_vid_cap = capture_legacy_try_fmt_vid_cap,
> - .vidioc_s_fmt_vid_cap = capture_legacy_s_fmt_vid_cap,
> + .vidioc_try_fmt_vid_cap = capture_try_fmt_vid_cap,
> + .vidioc_s_fmt_vid_cap = capture_s_fmt_vid_cap,
[Severity: Medium]
Should prp_registered() and csi_registered() pass legacy_api = false to
imx_media_capture_device_init() (or should the legacy_api path be
removed)?
Because both callers still pass legacy_api = true,
capture_legacy_ioctl_ops is always used and V4L2_CAP_IO_MC is never set,
leaving capture_ioctl_ops, capture_enum_framesizes() and
capture_subscribe_event() unreachable and causing v4l_enum_fmt() in
v4l2-core to clear f->mbus_code before capture_enum_fmt_vid_cap() runs.
In addition, capture_legacy_ioctl_ops pairs capture_enum_fmt_vid_cap()
with capture_legacy_enum_framesizes(), which queries the connected
subdev's active enum_frame_size op using cc->codes[0] (or 0 for
in-memory-only planar formats). On ipuX_ic_prpenc and ipuX_ic_prpvf
capture nodes, prp_enum_frame_size() only accepts IPU-internal media bus
codes, so VIDIOC_ENUM_FRAMESIZES now fails with -EINVAL for 22 of the 23
formats enumerated by VIDIOC_ENUM_FMT (including the default UYVY), and
on ipuX_csiY capture nodes frame size enumeration remains coupled to the
CSI subdev's active format.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261121184033.429680-1-shijiaqi_develop@163.com?part=1
next prev parent reply other threads:[~2026-11-21 18:52 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-21 18:40 [PATCH v4 0/2] media: imx: staging cleanup and FIM export to v4l2-core Jiaqi Shi
2026-11-21 18:40 ` [PATCH v4 1/2] media: imx: remove legacy video node control and format handling Jiaqi Shi
2026-11-21 18:52 ` sashiko-bot [this message]
2026-11-21 18:40 ` [PATCH v4 2/2] media: v4l2-core: add frame interval monitor helper 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=sashiko-outbox-227277@kernel.org \
--to=sashiko-bot@kernel.org \
--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.