From: sashiko-bot@kernel.org
To: "Dave Stevenson" <dave.stevenson@raspberrypi.com>
Cc: devicetree@vger.kernel.org, robh@kernel.org, conor+dt@kernel.org,
media-ci@linuxtv.org
Subject: Re: [PATCH v2 04/13] media: sony-starvis2: Parameterise the configuration to allow for other models
Date: Tue, 13 Oct 2026 15:35:48 +0000 [thread overview]
Message-ID: <sashiko-outbox-170022@kernel.org> (raw)
In-Reply-To: <20261013-media-starvis2-v2-4-3670722d250a@raspberrypi.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] media: sony-starvis2: missing hardware init if PM is disabled
--
commit 7eb8011a8d0af06bdae270bac96946f8a554e9b6
Author: Dave Stevenson <dave.stevenson@raspberrypi.com>
media: sony-starvis2: Parameterise the configuration to allow for other models
This commit parameterises various sensor configurations such as the pixel
array size and timings in preparation for supporting other Starvis 2 variants.
> diff --git a/drivers/media/i2c/sony-starvis2.c b/drivers/media/i2c/sony-starvis2.c
> index 20f3489b58d36..f62a957ff1a8c 100644
> --- a/drivers/media/i2c/sony-starvis2.c
> +++ b/drivers/media/i2c/sony-starvis2.c
[ ... ]
> @@ -895,8 +926,12 @@ static int starvis2_write_common(struct starvis2 *starvis2)
> {
> int ret = 0;
>
> - cci_multi_reg_write(starvis2->cci, common_regs, ARRAY_SIZE(common_regs),
> - &ret);
> + if (!starvis2->variant)
> + /* Powered on during probe to do detection. Variant unknown. */
> + return 0;
> +
> + cci_multi_reg_write(starvis2->cci, starvis2->variant->common_regs,
> + starvis2->variant->num_common_regs, &ret);
>
> cci_write(starvis2->cci, STARVIS2_REG_INCK_SEL, starvis2->inck_sel_val,
> &ret);
[Severity: High]
If CONFIG_PM is disabled or userspace prevents runtime suspend, does this
skip hardware initialization entirely when starting the stream?
In starvis2_probe(), starvis2_power_on() is called before
starvis2_identify_model() populates starvis2->variant:
starvis2_probe() {
...
ret = starvis2_power_on(dev);
...
ret = starvis2_identify_model(starvis2);
...
}
Because starvis2->variant is NULL during the initial probe,
starvis2_write_common() returns early here and skips writing the common
configuration.
If the device never runtime suspends after probe, the later call to
pm_runtime_resume_and_get() in starvis2_enable_streams() will return
immediately without invoking the resume callback, bypassing any subsequent
call to starvis2_power_on(). This appears to result in the stream starting
without the sensor's common configuration and clock settings being programmed.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261013-media-starvis2-v2-0-3670722d250a@raspberrypi.com?part=4
next prev parent reply other threads:[~2026-10-13 15:35 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-13 15:16 [PATCH v2 00/13] Update imx678 to act as a common Sony Starvis 2 driver Dave Stevenson
2026-10-13 15:17 ` [PATCH v2 01/13] media: imx678: Rework into generic Starvis 2 sensor driver Dave Stevenson
2026-10-13 15:32 ` sashiko-bot
2026-10-13 15:17 ` [PATCH v2 02/13] media: sony-starvis2: Reorder link frequencies to remove lookup Dave Stevenson
2026-10-13 15:17 ` [PATCH v2 03/13] media: sony-starvis2: Always program the sensor in window mode Dave Stevenson
2026-10-13 15:17 ` [PATCH v2 04/13] media: sony-starvis2: Parameterise the configuration to allow for other models Dave Stevenson
2026-10-13 15:35 ` sashiko-bot [this message]
2026-10-13 15:17 ` [PATCH v2 05/13] media: sony-starvis2: Rework 2 lane support for higher link freqs Dave Stevenson
2026-10-13 15:17 ` [PATCH v2 06/13] media: sony-starvis2: Allow runtime control of link frequency Dave Stevenson
2026-10-13 15:33 ` sashiko-bot
2026-10-13 15:17 ` [PATCH v2 07/13] media: sony-starvis2: Correct the minimum exposure Dave Stevenson
2026-10-13 15:17 ` [PATCH v2 08/13] media: dt-bindings: sony,imx678: Add other Starvis 2 family members Dave Stevenson
2026-10-13 15:17 ` [PATCH v2 09/13] media: sony-starvis2: Add support for IMX662 Dave Stevenson
2026-10-13 15:17 ` [PATCH v2 10/13] media: sony-starvis2: Add support for IMX675 Dave Stevenson
2026-10-13 15:17 ` [PATCH v2 11/13] media: sony-starvis2: Add support for IMX832 Dave Stevenson
2026-10-13 15:17 ` [PATCH v2 12/13] media: sony-starvis2: Only update bits for window mode Dave Stevenson
2026-10-13 15:17 ` [PATCH v2 13/13] media: sony-starvis2: Add support for IMX585 Dave Stevenson
2026-10-13 15:29 ` 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-170022@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=dave.stevenson@raspberrypi.com \
--cc=devicetree@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox