From: sashiko-bot@kernel.org
To: "Svyatoslav Ryhel" <clamor95@gmail.com>
Cc: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org,
robh@kernel.org, conor+dt@kernel.org, media-ci@linuxtv.org
Subject: Re: [PATCH v1 06/10] media: tegra-video: vi: Adjust pad assignment logic
Date: Fri, 13 Nov 2026 16:39:27 +0000 [thread overview]
Message-ID: <sashiko-outbox-213215@kernel.org> (raw)
In-Reply-To: <20261113161819.36847-7-clamor95@gmail.com>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Medium] media: tegra-video: unpopulated pad index in
__tegra_channel_try_format()
--
commit afb13afd32b21ef80b48671edacb48e14ada5d73
Author: Svyatoslav Ryhel <clamor95@gmail.com>
media: tegra-video: vi: Adjust pad assignment logic
This commit populates the pad field in V4L2 subdevice format, selection, and
enumeration structures using media_get_pad_index() instead of assuming the
source pad is at index 0.
> diff --git a/drivers/media/platform/nvidia/tegra-video/vi.c b/drivers/media/platform/nvidia/tegra-video/vi.c
> index 139e3ff0faaed..f028780f07bde 100644
> --- a/drivers/media/platform/nvidia/tegra-video/vi.c
> +++ b/drivers/media/platform/nvidia/tegra-video/vi.c
[ ... ]
> @@ -465,7 +471,9 @@ static int __tegra_channel_try_format(struct tegra_vi_channel *chan,
> }
>
> pix->field = V4L2_FIELD_NONE;
> - fmt.pad = 0;
> + fmt.pad = media_get_pad_index(&subdev->entity, MEDIA_PAD_FL_SOURCE,
> + PAD_SIGNAL_DEFAULT);
> +
> v4l2_fill_mbus_format(&fmt.format, pix, fmtinfo->code);
>
> /*
[Severity: Medium]
Should fse.pad, sdsel.pad, and the pad argument to
v4l2_subdev_state_get_crop() also be set to the source pad index in
__tegra_channel_try_format()?
Right after this hunk, __tegra_channel_try_format() still targets pad 0 for
those operations:
drivers/media/platform/nvidia/tegra-video/vi.c:__tegra_channel_try_format() {
...
try_crop = v4l2_subdev_state_get_crop(sd_state, 0);
fse.code = fmtinfo->code;
ret = v4l2_subdev_call(subdev, pad, enum_frame_size, sd_state, &fse);
if (ret) {
if (!v4l2_subdev_has_op(subdev, pad, get_selection) ||
v4l2_subdev_call(subdev, pad, get_selection, NULL, NULL, &sdsel)) {
...
}
When the remote subdevice's source pad is not at index 0, enum_frame_size
and get_selection query pad 0 with a source-pad media bus code, and try_crop
updates pad 0's crop rectangle in sd_state instead of fmt.pad's before
set_fmt runs on fmt.pad.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261113161819.36847-1-clamor95@gmail.com?part=6
next prev parent reply other threads:[~2026-11-13 16:39 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-13 16:18 [PATCH v1 00/10] Tegra Video Input updates Svyatoslav Ryhel
2026-11-13 16:18 ` [PATCH v1 01/10] staging: media: tegra-video: Move driver to media/platform/nvidia Svyatoslav Ryhel
2026-11-13 16:43 ` sashiko-bot
2026-11-13 16:18 ` [PATCH v1 02/10] dt-bindings: display: tegra: Remove Tegra30 fallback Svyatoslav Ryhel
2026-11-13 16:18 ` [PATCH v1 03/10] media: tegra-video: vi: Diverge Tegra20 and Tegra30 VI SoC descriptions Svyatoslav Ryhel
2026-11-13 16:18 ` [PATCH v1 04/10] media: tegra-video: vi: Switch to media_entity_remote_source_pad_unique() helper Svyatoslav Ryhel
2026-11-13 16:39 ` sashiko-bot
2026-11-13 16:18 ` [PATCH v1 05/10] media: tegra-video: vi: Use entity function to check subdev type Svyatoslav Ryhel
2026-11-13 16:37 ` sashiko-bot
2026-11-13 16:18 ` [PATCH v1 06/10] media: tegra-video: vi: Adjust pad assignment logic Svyatoslav Ryhel
2026-11-13 16:39 ` sashiko-bot [this message]
2026-11-13 16:18 ` [PATCH v1 07/10] dt-bindings: display: tegra: Document Tegra114 CSI Svyatoslav Ryhel
2026-11-13 16:35 ` sashiko-bot
2026-11-13 16:18 ` [PATCH v1 08/10] media: tegra-video: Add CSI support for Tegra114 Svyatoslav Ryhel
2026-11-13 16:18 ` [PATCH v1 09/10] ARM: tegra: Remove fallback compatible from Tegra30 VI node Svyatoslav Ryhel
2026-11-13 16:18 ` [PATCH v1 10/10] ARM: tegra: Add CSI node for Tegra114 Svyatoslav Ryhel
2026-11-13 16:39 ` sashiko-bot
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-213215@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=clamor95@gmail.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=media-ci@linuxtv.org \
--cc=robh@kernel.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 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.