From: sashiko-bot@kernel.org
To: "Maximo Manriquez Lizarraga" <DelaySystem@tubot.lat>
Cc: imx@lists.linux.dev, Frank.Li@kernel.org, media-ci@linuxtv.org
Subject: Re: [PATCH v2] staging: media: imx: ic-prpencvf: add FORMAT_TRY frame interval support
Date: Wed, 18 Nov 2026 00:27:41 +0000 [thread overview]
Message-ID: <sashiko-outbox-219842@kernel.org> (raw)
In-Reply-To: <20261117-batch1-m2-prpencvf-try-v2-1-dd331ab13137@tubot.lat>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] staging: media: imx: divergent TRY pad intervals in
prp_set_frame_interval()
--
commit ab0674eed0b91380970c6973e29f82828fdedc3b
Author: Maximo Manriquez Lizarraga <DelaySystem@tubot.lat>
staging: media: imx: ic-prpencvf: add FORMAT_TRY frame interval support
This commit adds V4L2_SUBDEV_FORMAT_TRY support for frame intervals in
the i.MX IC prpencvf subdev by storing TRY intervals in the subdev state
and initializing them in a custom init_state callback.
> diff --git a/drivers/staging/media/imx/imx-ic-prpencvf.c b/drivers/staging/media/imx/imx-ic-prpencvf.c
> index 3430ddeac3569..5ce0eb56be5bf 100644
> --- a/drivers/staging/media/imx/imx-ic-prpencvf.c
> +++ b/drivers/staging/media/imx/imx-ic-prpencvf.c
[ ... ]
> @@ -1231,24 +1246,68 @@ static int prp_set_frame_interval(struct v4l2_subdev *sd,
> struct v4l2_subdev_frame_interval *fi)
> {
> struct prp_priv *priv = sd_to_priv(sd);
> -
> - /*
> - * FIXME: Implement support for V4L2_SUBDEV_FORMAT_TRY, using the V4L2
> - * subdev active state API.
> - */
> - if (fi->which != V4L2_SUBDEV_FORMAT_ACTIVE)
> - return -EINVAL;
> + struct v4l2_fract *interval;
> + int ret = 0;
>
> if (fi->pad >= PRPENCVF_NUM_PADS)
> return -EINVAL;
>
> mutex_lock(&priv->lock);
> + interval = __prp_get_frame_interval(priv, sd_state, fi->pad,
> + fi->which);
> + if (!interval) {
> + ret = -EINVAL;
> + goto out;
> + }
>
> /* No limits on valid frame intervals */
> - if (fi->interval.numerator == 0 || fi->interval.denominator == 0)
> - fi->interval = priv->frame_interval;
> - else
> - priv->frame_interval = fi->interval;
> + if (fi->interval.numerator == 0 || fi->interval.denominator == 0) {
> + fi->interval = *interval;
> + } else {
> + *interval = fi->interval;
> +
> + /*
> + * The IC task does not change the frame rate between sink
> + * and source, so keep both TRY slots in sync the same way
> + * prp_set_fmt() propagates formats to the source pad.
> + * (ACTIVE uses a single shared interval and needs nothing.)
> + */
> + if (fi->which == V4L2_SUBDEV_FORMAT_TRY &&
> + fi->pad == PRPENCVF_SINK_PAD) {
> + struct v4l2_fract *src_interval;
> +
> + src_interval = __prp_get_frame_interval(priv, sd_state,
> + PRPENCVF_SRC_PAD,
> + fi->which);
> + if (src_interval)
> + *src_interval = fi->interval;
> + }
> + }
[Severity: Low]
Can setting a V4L2_SUBDEV_FORMAT_TRY frame interval on PRPENCVF_SRC_PAD
cause the sink and source TRY intervals to diverge?
For V4L2_SUBDEV_FORMAT_ACTIVE, both pads share priv->frame_interval, so
calling prp_set_frame_interval() on PRPENCVF_SRC_PAD updates both pads.
For V4L2_SUBDEV_FORMAT_TRY, *interval = fi->interval overwrites the
source pad slot without either clamping it to the sink pad interval or
updating the sink pad slot to match, leaving the two pads with different
TRY frame intervals even though the IC does not alter the frame rate.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261117-batch1-m2-prpencvf-try-v2-1-dd331ab13137@tubot.lat?part=1
next prev parent reply other threads:[~2026-11-18 0:27 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-18 0:06 [PATCH v2] staging: media: imx: ic-prpencvf: add FORMAT_TRY frame interval support Maximo Manriquez Lizarraga via B4 Relay
2026-11-18 0:27 ` sashiko-bot [this message]
2026-11-18 9:03 ` Dan Carpenter
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-219842@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=DelaySystem@tubot.lat \
--cc=Frank.Li@kernel.org \
--cc=imx@lists.linux.dev \
--cc=media-ci@linuxtv.org \
--cc=sashiko-reviews@lists.linux.dev \
/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