From: sashiko-bot@kernel.org
To: "Hangxiang Ma" <hangxiang.ma@oss.qualcomm.com>
Cc: linux-phy@lists.infradead.org, devicetree@vger.kernel.org,
robh@kernel.org, conor+dt@kernel.org, media-ci@linuxtv.org,
vkoul@kernel.org, neil.armstrong@linaro.org, olteanv@gmail.com
Subject: Re: [PATCH v23 11/15] media: qcom: camss: tpg: Add support for v2.4.0 TPG
Date: Wed, 28 Oct 2026 15:29:26 +0000 [thread overview]
Message-ID: <sashiko-outbox-188053@kernel.org> (raw)
In-Reply-To: <20261028-kaanapali-camss-v23-11-95f250b18612@oss.qualcomm.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] media: qcom: camss: uninitialized hw_version check in tpg_reset()
--
commit f50ae6ce8455f618cec0228f4b565ad64a56769a
Author: Hangxiang Ma <hangxiang.ma@oss.qualcomm.com>
media: qcom: camss: tpg: Add support for v2.4.0 TPG
This commit adds support for the v2.4.0 TPG hardware found on Kaanapali,
routing TPG output through the CSI2 TPG mux in CSID 1080 RX and handling
test-enable and reset via TPG_CTRL_CMD.
> diff --git a/drivers/media/platform/qcom/camss/camss-tpg-gen1.c b/drivers/media/platform/qcom/camss/camss-tpg-gen1.c
> index d29de5f93c18e..cabbb2638cf38 100644
> --- a/drivers/media/platform/qcom/camss/camss-tpg-gen1.c
> +++ b/drivers/media/platform/qcom/camss/camss-tpg-gen1.c
[ ... ]
> @@ -164,18 +167,26 @@ static int tpg_stream_on(struct tpg_device *tpg)
[ ... ]
> static int tpg_reset(struct tpg_device *tpg)
> {
> - writel(0, tpg->base + TPG_CTRL);
> - writel(1, tpg->base + TPG_CLEAR);
> + if (tpg->hw_version < TPG_HW_VER_2_4_0)
> + writel(0, tpg->base + TPG_CTRL);
> +
> + writel(TPG_CTRL_CMD_HW_RESET, tpg->base + TPG_CTRL_CMD);
>
> return 0;
> }
[Severity: Medium]
Is tpg->hw_version initialized when tpg_reset() runs for the first time?
In drivers/media/platform/qcom/camss/camss-tpg.c, tpg_set_power() calls
reset() before hw_version():
drivers/media/platform/qcom/camss/camss-tpg.c:tpg_set_power() {
if (on) {
...
tpg->res->hw_ops->reset(tpg);
tpg->res->hw_ops->hw_version(tpg);
}
}
Since tpg_hw_version() in drivers/media/platform/qcom/camss/camss-tpg-gen1.c
is where tpg->hw_version is populated from the TPG_HW_VERSION register,
tpg->hw_version is still 0 on the initial power-on. Won't this cause
tpg_reset() to evaluate 0 < TPG_HW_VER_2_4_0 as true and write 0 to TPG_CTRL
even on v2.4.0 hardware?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261028-kaanapali-camss-v23-0-95f250b18612@oss.qualcomm.com?part=11
WARNING: multiple messages have this Message-ID (diff)
From: sashiko-bot@kernel.org
To: "Hangxiang Ma" <hangxiang.ma@oss.qualcomm.com>
Cc: linux-phy@lists.infradead.org, devicetree@vger.kernel.org,
robh@kernel.org, conor+dt@kernel.org, media-ci@linuxtv.org,
vkoul@kernel.org, neil.armstrong@linaro.org, olteanv@gmail.com
Subject: Re: [PATCH v23 11/15] media: qcom: camss: tpg: Add support for v2.4.0 TPG
Date: Wed, 28 Oct 2026 15:29:26 +0000 [thread overview]
Message-ID: <sashiko-outbox-188053@kernel.org> (raw)
In-Reply-To: <20261028-kaanapali-camss-v23-11-95f250b18612@oss.qualcomm.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] media: qcom: camss: uninitialized hw_version check in tpg_reset()
--
commit f50ae6ce8455f618cec0228f4b565ad64a56769a
Author: Hangxiang Ma <hangxiang.ma@oss.qualcomm.com>
media: qcom: camss: tpg: Add support for v2.4.0 TPG
This commit adds support for the v2.4.0 TPG hardware found on Kaanapali,
routing TPG output through the CSI2 TPG mux in CSID 1080 RX and handling
test-enable and reset via TPG_CTRL_CMD.
> diff --git a/drivers/media/platform/qcom/camss/camss-tpg-gen1.c b/drivers/media/platform/qcom/camss/camss-tpg-gen1.c
> index d29de5f93c18e..cabbb2638cf38 100644
> --- a/drivers/media/platform/qcom/camss/camss-tpg-gen1.c
> +++ b/drivers/media/platform/qcom/camss/camss-tpg-gen1.c
[ ... ]
> @@ -164,18 +167,26 @@ static int tpg_stream_on(struct tpg_device *tpg)
[ ... ]
> static int tpg_reset(struct tpg_device *tpg)
> {
> - writel(0, tpg->base + TPG_CTRL);
> - writel(1, tpg->base + TPG_CLEAR);
> + if (tpg->hw_version < TPG_HW_VER_2_4_0)
> + writel(0, tpg->base + TPG_CTRL);
> +
> + writel(TPG_CTRL_CMD_HW_RESET, tpg->base + TPG_CTRL_CMD);
>
> return 0;
> }
[Severity: Medium]
Is tpg->hw_version initialized when tpg_reset() runs for the first time?
In drivers/media/platform/qcom/camss/camss-tpg.c, tpg_set_power() calls
reset() before hw_version():
drivers/media/platform/qcom/camss/camss-tpg.c:tpg_set_power() {
if (on) {
...
tpg->res->hw_ops->reset(tpg);
tpg->res->hw_ops->hw_version(tpg);
}
}
Since tpg_hw_version() in drivers/media/platform/qcom/camss/camss-tpg-gen1.c
is where tpg->hw_version is populated from the TPG_HW_VERSION register,
tpg->hw_version is still 0 on the initial power-on. Won't this cause
tpg_reset() to evaluate 0 < TPG_HW_VER_2_4_0 as true and write 0 to TPG_CTRL
even on v2.4.0 hardware?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261028-kaanapali-camss-v23-0-95f250b18612@oss.qualcomm.com?part=11
--
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy
next prev parent reply other threads:[~2026-10-28 15:29 UTC|newest]
Thread overview: 62+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-28 15:20 [PATCH v23 00/15] media: qcom: camss: Add Kaanapali support Hangxiang Ma
2026-10-28 15:20 ` Hangxiang Ma
2026-10-28 15:20 ` [PATCH v23 01/15] dt-bindings: phy: qcom,x1e80100-csi2-phy: Add Kaanapali CSI2 PHY Hangxiang Ma
2026-10-28 15:20 ` Hangxiang Ma
2026-10-28 15:20 ` [PATCH v23 02/15] phy: qcom-mipi-csi2: Parametrise the common status register offset Hangxiang Ma
2026-10-28 15:20 ` Hangxiang Ma
2026-10-28 15:27 ` Abel Vesa
2026-10-28 15:27 ` Abel Vesa
2026-10-28 15:20 ` [PATCH v23 03/15] phy: qcom-mipi-csi2: Add Kaanapali support Hangxiang Ma
2026-10-28 15:20 ` Hangxiang Ma
2026-10-28 15:26 ` Abel Vesa
2026-10-28 15:26 ` Abel Vesa
2026-10-28 15:20 ` [PATCH v23 04/15] media: qcom: camss: Add addr_update hooks and guard CSID reg_update Hangxiang Ma
2026-10-28 15:20 ` Hangxiang Ma
2026-10-28 15:29 ` Bryan O'Donoghue
2026-10-28 15:29 ` Bryan O'Donoghue
2026-10-28 16:36 ` Loic Poulain
2026-10-28 16:36 ` Loic Poulain
2026-10-28 15:20 ` [PATCH v23 05/15] media: dt-bindings: Add CAMSS device for Kaanapali Hangxiang Ma
2026-10-28 15:20 ` Hangxiang Ma
2026-10-28 15:20 ` [PATCH v23 06/15] media: qcom: camss: Add Kaanapali compatible Hangxiang Ma
2026-10-28 15:20 ` Hangxiang Ma
2026-10-28 15:20 ` [PATCH v23 07/15] media: qcom: camss: Add PM clock definitions for Kaanapali Hangxiang Ma
2026-10-28 15:20 ` Hangxiang Ma
2026-10-28 15:31 ` Bryan O'Donoghue
2026-10-28 15:31 ` Bryan O'Donoghue
2026-10-28 15:20 ` [PATCH v23 08/15] media: qcom: camss: csiphy: Add support for v2.4.0 two-phase CSIPHY Hangxiang Ma
2026-10-28 15:20 ` Hangxiang Ma
2026-10-28 15:31 ` sashiko-bot
2026-10-28 15:31 ` sashiko-bot
2026-10-28 15:20 ` [PATCH v23 09/15] media: qcom: camss: csid: Add support for CSID 1080 Hangxiang Ma
2026-10-28 15:20 ` Hangxiang Ma
2026-10-28 15:36 ` sashiko-bot
2026-10-28 15:36 ` sashiko-bot
2026-10-28 15:20 ` [PATCH v23 10/15] media: qcom: camss: vfe: Add support for VFE 1080 Hangxiang Ma
2026-10-28 15:20 ` Hangxiang Ma
2026-10-28 15:33 ` Bryan O'Donoghue
2026-10-28 15:33 ` Bryan O'Donoghue
2026-10-28 15:34 ` sashiko-bot
2026-10-28 15:34 ` sashiko-bot
2026-10-28 15:20 ` [PATCH v23 11/15] media: qcom: camss: tpg: Add support for v2.4.0 TPG Hangxiang Ma
2026-10-28 15:20 ` Hangxiang Ma
2026-10-28 15:29 ` sashiko-bot [this message]
2026-10-28 15:29 ` sashiko-bot
2026-10-28 15:36 ` Bryan O'Donoghue
2026-10-28 15:36 ` Bryan O'Donoghue
2026-10-28 15:20 ` [PATCH v23 12/15] arm64: dts: qcom: kaanapali: Add CAMSS and CSIPHY block definitions Hangxiang Ma
2026-10-28 15:20 ` Hangxiang Ma
2026-10-28 15:28 ` Abel Vesa
2026-10-28 15:28 ` Abel Vesa
2026-10-28 15:42 ` sashiko-bot
2026-10-28 15:42 ` sashiko-bot
2026-10-28 15:20 ` [PATCH v23 13/15] arm64: dts: qcom: kaanapali: Add CCI controller nodes Hangxiang Ma
2026-10-28 15:20 ` Hangxiang Ma
2026-10-28 15:28 ` Abel Vesa
2026-10-28 15:28 ` Abel Vesa
2026-10-28 15:20 ` [PATCH v23 14/15] arm64: dts: qcom: kaanapali: Add camera MCLK pinctrl Hangxiang Ma
2026-10-28 15:20 ` Hangxiang Ma
2026-10-28 15:20 ` [PATCH v23 15/15] arm64: dts: qcom: kaanapali-mtp-camera-s5kjn5: Add DT overlay Hangxiang Ma
2026-10-28 15:20 ` Hangxiang Ma
2026-10-28 15:29 ` Abel Vesa
2026-10-28 15:29 ` Abel Vesa
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-188053@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=hangxiang.ma@oss.qualcomm.com \
--cc=linux-phy@lists.infradead.org \
--cc=media-ci@linuxtv.org \
--cc=neil.armstrong@linaro.org \
--cc=olteanv@gmail.com \
--cc=robh@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=vkoul@kernel.org \
/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.