All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Andrew Gigena" <mail@andrewgigena.dev>
Cc: devicetree@vger.kernel.org, linux-phy@lists.infradead.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 v3 5/7] media: qcom: camss: Add support for SM8150
Date: Fri, 06 Nov 2026 18:53:25 +0000	[thread overview]
Message-ID: <sashiko-outbox-202114@kernel.org> (raw)
In-Reply-To: <20261106-sm8150-v7.4-rc1-camss-v3-5-0103e8a0bbcd@andrewgigena.dev>

Thank you for your contribution! Sashiko AI review found 2 potential
issues to consider:
- [Medium] media: qcom: camss: NULL deref and dead code in
  csiphy_res_sm8150
- [Medium] media: qcom: camss: CAMSS_8150 used in parent commit before
  definition
--

commit debc7cc0585d6af1f184ab66cdb3fb1863bba5d6
Author: Andrew Gigena <mail@andrewgigena.dev>

media: qcom: camss: Add support for SM8150

This commit adds CAMSS platform data, resource definitions, and version
handling to support the Qualcomm SM8150 SoC.

> diff --git a/drivers/media/platform/qcom/camss/camss-csiphy-3ph-1-0.c b/drivers/media/platform/qcom/camss/camss-csiphy-3ph-1-0.c
> index dac8d2ecf7995..5e7c2e67ae887 100644
> --- a/drivers/media/platform/qcom/camss/camss-csiphy-3ph-1-0.c
> +++ b/drivers/media/platform/qcom/camss/camss-csiphy-3ph-1-0.c
> @@ -1133,6 +1133,7 @@ static bool csiphy_is_gen2(u32 version)
>  	case CAMSS_6150:
>  	case CAMSS_6350:
>  	case CAMSS_7280:
> +	case CAMSS_8150:
>  	case CAMSS_8250:
>  	case CAMSS_8280XP:
>  	case CAMSS_8300:
> @@ -1235,6 +1236,7 @@ static int csiphy_init(struct csiphy_device *csiphy)
>  		regs->lane_regs = &lane_regs_sm8250[0];
>  		regs->lane_array_size = ARRAY_SIZE(lane_regs_sm8250);
>  		break;
> +	case CAMSS_8150:
>  	case CAMSS_8280XP:
>  		regs->lane_regs = &lane_regs_sc8280xp[0];
>  		regs->lane_array_size = ARRAY_SIZE(lane_regs_sc8280xp);
> diff --git a/drivers/media/platform/qcom/camss/camss.c b/drivers/media/platform/qcom/camss/camss.c
> index c54185c93a8a9..da4d2213fd3dc 100644
> --- a/drivers/media/platform/qcom/camss/camss.c
> +++ b/drivers/media/platform/qcom/camss/camss.c
> @@ -1940,6 +1940,223 @@ static const struct resources_icc icc_res_sm6350[] = {
>  	},
>  };
>  
> +static const struct camss_subdev_resources csiphy_res_sm8150[] = {
> +	/* CSIPHY0 - clocks/regs/supplies owned by PHY driver */
> +	{
> +		.csiphy = {
> +			.id = 0,
> +			.hw_ops = &csiphy_ops_3ph_1_0,
> +			.formats = &csiphy_formats_sdm845
> +		}
> +	},

[Severity: Medium]
Can csiphy_res_sm8150 cause a NULL pointer dereference in
platform_get_resource_byname() when no remote PHY endpoints are connected in
Device Tree?

camss_detect_legacy_phy() defaults camss->legacy_phy to true and only clears
it when it finds an endpoint whose remote parent node is named "phy". If the
CSIPHY ports are omitted in DT, camss_init_subdevices() takes the legacy path
and calls msm_csiphy_subdev_init_legacy(), which passes res->reg[0] (NULL
here) to devm_platform_ioremap_resource_byname().

Conversely, when camss->legacy_phy is false, msm_csiphy_subdev_init() and
csiphy_v4l2_ops never use csiphy->res->hw_ops, making .hw_ops =
&csiphy_ops_3ph_1_0 and the CAMSS_8150 additions in
camss-csiphy-3ph-1-0.c unreachable dead code.

[ ... ]

> diff --git a/drivers/media/platform/qcom/camss/camss.h b/drivers/media/platform/qcom/camss/camss.h
> index 7dc2fd9f03e0d..74d8cc2921be9 100644
> --- a/drivers/media/platform/qcom/camss/camss.h
> +++ b/drivers/media/platform/qcom/camss/camss.h
> @@ -89,6 +89,7 @@ enum camss_version {
>  	CAMSS_8x39,
>  	CAMSS_8x53,
>  	CAMSS_8x96,
> +	CAMSS_8150,
>  	CAMSS_8250,
>  	CAMSS_8280XP,
>  	CAMSS_8300,

[Severity: Medium]
Does defining CAMSS_8150 here break the build on the preceding commit
"media: qcom: camss: Match VFE lite clocks by name prefix"?

That earlier commit already adds case CAMSS_8150: in vfe_src_pad_code() and
vfe_bpl_align_rdi() in drivers/media/platform/qcom/camss/camss-vfe.c before
CAMSS_8150 is added to enum camss_version, causing an undeclared identifier
error during git bisect. Moving those two switch cases into this patch keeps
both commits buildable.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261106-sm8150-v7.4-rc1-camss-v3-0-0103e8a0bbcd@andrewgigena.dev?part=5

-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

WARNING: multiple messages have this Message-ID (diff)
From: sashiko-bot@kernel.org
To: "Andrew Gigena" <mail@andrewgigena.dev>
Cc: devicetree@vger.kernel.org, linux-phy@lists.infradead.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 v3 5/7] media: qcom: camss: Add support for SM8150
Date: Fri, 06 Nov 2026 18:53:25 +0000	[thread overview]
Message-ID: <sashiko-outbox-202114@kernel.org> (raw)
In-Reply-To: <20261106-sm8150-v7.4-rc1-camss-v3-5-0103e8a0bbcd@andrewgigena.dev>

Thank you for your contribution! Sashiko AI review found 2 potential
issues to consider:
- [Medium] media: qcom: camss: NULL deref and dead code in
  csiphy_res_sm8150
- [Medium] media: qcom: camss: CAMSS_8150 used in parent commit before
  definition
--

commit debc7cc0585d6af1f184ab66cdb3fb1863bba5d6
Author: Andrew Gigena <mail@andrewgigena.dev>

media: qcom: camss: Add support for SM8150

This commit adds CAMSS platform data, resource definitions, and version
handling to support the Qualcomm SM8150 SoC.

> diff --git a/drivers/media/platform/qcom/camss/camss-csiphy-3ph-1-0.c b/drivers/media/platform/qcom/camss/camss-csiphy-3ph-1-0.c
> index dac8d2ecf7995..5e7c2e67ae887 100644
> --- a/drivers/media/platform/qcom/camss/camss-csiphy-3ph-1-0.c
> +++ b/drivers/media/platform/qcom/camss/camss-csiphy-3ph-1-0.c
> @@ -1133,6 +1133,7 @@ static bool csiphy_is_gen2(u32 version)
>  	case CAMSS_6150:
>  	case CAMSS_6350:
>  	case CAMSS_7280:
> +	case CAMSS_8150:
>  	case CAMSS_8250:
>  	case CAMSS_8280XP:
>  	case CAMSS_8300:
> @@ -1235,6 +1236,7 @@ static int csiphy_init(struct csiphy_device *csiphy)
>  		regs->lane_regs = &lane_regs_sm8250[0];
>  		regs->lane_array_size = ARRAY_SIZE(lane_regs_sm8250);
>  		break;
> +	case CAMSS_8150:
>  	case CAMSS_8280XP:
>  		regs->lane_regs = &lane_regs_sc8280xp[0];
>  		regs->lane_array_size = ARRAY_SIZE(lane_regs_sc8280xp);
> diff --git a/drivers/media/platform/qcom/camss/camss.c b/drivers/media/platform/qcom/camss/camss.c
> index c54185c93a8a9..da4d2213fd3dc 100644
> --- a/drivers/media/platform/qcom/camss/camss.c
> +++ b/drivers/media/platform/qcom/camss/camss.c
> @@ -1940,6 +1940,223 @@ static const struct resources_icc icc_res_sm6350[] = {
>  	},
>  };
>  
> +static const struct camss_subdev_resources csiphy_res_sm8150[] = {
> +	/* CSIPHY0 - clocks/regs/supplies owned by PHY driver */
> +	{
> +		.csiphy = {
> +			.id = 0,
> +			.hw_ops = &csiphy_ops_3ph_1_0,
> +			.formats = &csiphy_formats_sdm845
> +		}
> +	},

[Severity: Medium]
Can csiphy_res_sm8150 cause a NULL pointer dereference in
platform_get_resource_byname() when no remote PHY endpoints are connected in
Device Tree?

camss_detect_legacy_phy() defaults camss->legacy_phy to true and only clears
it when it finds an endpoint whose remote parent node is named "phy". If the
CSIPHY ports are omitted in DT, camss_init_subdevices() takes the legacy path
and calls msm_csiphy_subdev_init_legacy(), which passes res->reg[0] (NULL
here) to devm_platform_ioremap_resource_byname().

Conversely, when camss->legacy_phy is false, msm_csiphy_subdev_init() and
csiphy_v4l2_ops never use csiphy->res->hw_ops, making .hw_ops =
&csiphy_ops_3ph_1_0 and the CAMSS_8150 additions in
camss-csiphy-3ph-1-0.c unreachable dead code.

[ ... ]

> diff --git a/drivers/media/platform/qcom/camss/camss.h b/drivers/media/platform/qcom/camss/camss.h
> index 7dc2fd9f03e0d..74d8cc2921be9 100644
> --- a/drivers/media/platform/qcom/camss/camss.h
> +++ b/drivers/media/platform/qcom/camss/camss.h
> @@ -89,6 +89,7 @@ enum camss_version {
>  	CAMSS_8x39,
>  	CAMSS_8x53,
>  	CAMSS_8x96,
> +	CAMSS_8150,
>  	CAMSS_8250,
>  	CAMSS_8280XP,
>  	CAMSS_8300,

[Severity: Medium]
Does defining CAMSS_8150 here break the build on the preceding commit
"media: qcom: camss: Match VFE lite clocks by name prefix"?

That earlier commit already adds case CAMSS_8150: in vfe_src_pad_code() and
vfe_bpl_align_rdi() in drivers/media/platform/qcom/camss/camss-vfe.c before
CAMSS_8150 is added to enum camss_version, causing an undeclared identifier
error during git bisect. Moving those two switch cases into this patch keeps
both commits buildable.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261106-sm8150-v7.4-rc1-camss-v3-0-0103e8a0bbcd@andrewgigena.dev?part=5

  reply	other threads:[~2026-11-06 18:53 UTC|newest]

Thread overview: 64+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-06 18:35 [PATCH v3 0/7] media: qcom: camss: Add SM8150 CAMSS support Andrew Gigena via B4 Relay
2026-11-06 18:35 ` Andrew Gigena
2026-11-06 18:35 ` Andrew Gigena via B4 Relay
2026-11-06 18:35 ` [PATCH v3 1/7] dt-bindings: i2c: qcom-cci: Document SM8150 compatible Andrew Gigena via B4 Relay
2026-11-06 18:35   ` Andrew Gigena
2026-11-06 18:35   ` Andrew Gigena via B4 Relay
2026-11-06 21:26   ` Vladimir Zapolskiy
2026-11-06 21:26     ` Vladimir Zapolskiy
2026-11-07 14:14   ` Wolfram Sang
2026-11-07 14:14     ` Wolfram Sang
2026-11-06 18:35 ` [PATCH v3 2/7] dt-bindings: media: qcom,sm8150-camss: Add SM8150 CAMSS Andrew Gigena via B4 Relay
2026-11-06 18:35   ` Andrew Gigena
2026-11-06 18:35   ` Andrew Gigena via B4 Relay
2026-11-06 21:38   ` Vladimir Zapolskiy
2026-11-06 21:38     ` Vladimir Zapolskiy
2026-11-10 23:46     ` Andrew Gigena
2026-11-10 23:46       ` Andrew Gigena
2026-11-09 10:44   ` Krzysztof Kozlowski
2026-11-09 10:44     ` Krzysztof Kozlowski
2026-11-10 15:43     ` Andrew Gigena
2026-11-10 15:43       ` Andrew Gigena
2026-11-06 18:35 ` [PATCH v3 3/7] dt-bindings: phy: qcom,sm8150-csi2-phy: Add SM8150 CSI2 PHY Andrew Gigena via B4 Relay
2026-11-06 18:35   ` Andrew Gigena
2026-11-06 18:35   ` Andrew Gigena via B4 Relay
2026-11-06 21:24   ` Vladimir Zapolskiy
2026-11-06 21:24     ` Vladimir Zapolskiy
2026-11-10 23:52     ` Andrew Gigena
2026-11-10 23:52       ` Andrew Gigena
2026-11-06 22:32   ` Bryan O'Donoghue
2026-11-06 22:32     ` Bryan O'Donoghue
2026-11-06 18:35 ` [PATCH v3 4/7] media: qcom: camss: Match VFE lite clocks by name prefix Andrew Gigena via B4 Relay
2026-11-06 18:35   ` Andrew Gigena
2026-11-06 18:35   ` Andrew Gigena via B4 Relay
2026-11-06 18:49   ` sashiko-bot
2026-11-06 18:49     ` sashiko-bot
2026-11-06 22:34   ` Bryan O'Donoghue
2026-11-06 22:34     ` Bryan O'Donoghue
2026-11-06 18:35 ` [PATCH v3 5/7] media: qcom: camss: Add support for SM8150 Andrew Gigena via B4 Relay
2026-11-06 18:35   ` Andrew Gigena
2026-11-06 18:35   ` Andrew Gigena via B4 Relay
2026-11-06 18:53   ` sashiko-bot [this message]
2026-11-06 18:53     ` sashiko-bot
2026-11-06 21:50   ` Vladimir Zapolskiy
2026-11-06 21:50     ` Vladimir Zapolskiy
2026-11-11  1:27     ` Andrew Gigena
2026-11-11  1:27       ` Andrew Gigena
2026-11-06 22:35   ` Bryan O'Donoghue
2026-11-06 22:35     ` Bryan O'Donoghue
2026-11-06 18:35 ` [PATCH v3 6/7] phy: qcom-mipi-csi2: Add SM8150 CSI2 DPHY support Andrew Gigena via B4 Relay
2026-11-06 18:35   ` Andrew Gigena
2026-11-06 18:35   ` Andrew Gigena via B4 Relay
2026-11-06 18:50   ` sashiko-bot
2026-11-06 18:50     ` sashiko-bot
2026-11-06 22:29   ` Bryan O'Donoghue
2026-11-06 22:29     ` Bryan O'Donoghue
2026-11-07 14:03     ` Bryan O'Donoghue
2026-11-07 14:03       ` Bryan O'Donoghue
2026-11-10 23:56       ` Andrew Gigena
2026-11-10 23:56         ` Andrew Gigena
2026-11-06 18:35 ` [PATCH v3 7/7] arm64: dts: qcom: sm8150: Add CAMSS and CCI nodes Andrew Gigena via B4 Relay
2026-11-06 18:35   ` Andrew Gigena
2026-11-06 18:35   ` Andrew Gigena via B4 Relay
2026-11-06 18:59   ` sashiko-bot
2026-11-06 18:59     ` 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-202114@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-phy@lists.infradead.org \
    --cc=mail@andrewgigena.dev \
    --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.