From: sashiko-bot@kernel.org
To: "Bryan O'Donoghue" <bryan.odonoghue@linaro.org>
Cc: olteanv@gmail.com, conor+dt@kernel.org, robh@kernel.org,
vkoul@kernel.org, devicetree@vger.kernel.org,
linux-phy@lists.infradead.org, linux-clk@vger.kernel.org,
media-ci@linuxtv.org, neil.armstrong@linaro.org
Subject: Re: [PATCH v20 5/6] media: qcom: camss: Add support for PHY API devices
Date: Fri, 18 Sep 2026 14:19:37 +0000 [thread overview]
Message-ID: <20260918141938.227071F00898@smtp.kernel.org> (raw)
In-Reply-To: <20260918-b4-linux-next-25-03-13-dtsi-x1e80100-camss-v20-5-dc244e124e71@linaro.org>
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [High] media: camss: incorrect data rate passed to PHY config
- [Medium] kconfig: select of non-existent symbol PHY_QCOM_MIPI_CSI2
--
commit 53c91247e8179ba522478e54bb98836c106cd0ee
Author: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
media: qcom: camss: Add support for PHY API devices
Add the ability to use a PHY pointer which interacts with the standard PHY
API.
> diff --git a/drivers/media/platform/qcom/camss/Kconfig b/drivers/media/platform/qcom/camss/Kconfig
> index 4eda48cb1adf0..1edc5e5a1829e 100644
> --- a/drivers/media/platform/qcom/camss/Kconfig
> +++ b/drivers/media/platform/qcom/camss/Kconfig
> @@ -7,3 +7,4 @@ config VIDEO_QCOM_CAMSS
> select VIDEO_V4L2_SUBDEV_API
> select VIDEOBUF2_DMA_SG
> select V4L2_FWNODE
> + select PHY_QCOM_MIPI_CSI2
[Severity: Medium]
Does this Kconfig symbol exist? I am unable to find PHY_QCOM_MIPI_CSI2 anywhere
in the kernel tree.
Selecting a non-existent symbol has no effect. This could lead to a silent
failure where the required PHY driver is not built, potentially leaving the
hardware non-functional when relying on this driver.
> diff --git a/drivers/media/platform/qcom/camss/camss-csiphy.c b/drivers/media/platform/qcom/camss/camss-csiphy.c
> index 539ac4888b608..aaed7d0309dd6 100644
> --- a/drivers/media/platform/qcom/camss/camss-csiphy.c
> +++ b/drivers/media/platform/qcom/camss/camss-csiphy.c
[ ... ]
> +static int csiphy_stream_on(struct csiphy_device *csiphy)
> +{
> + u8 bpp = csiphy_get_bpp(csiphy->res->formats->formats, csiphy->res->formats->nformats,
> + csiphy->fmt[MSM_CSIPHY_PAD_SINK].code);
> + struct csiphy_lanes_cfg *lncfg = &csiphy->cfg.csi2->lane_cfg;
> + struct phy_configure_opts_mipi_dphy *dphy_cfg;
> + union phy_configure_opts dphy_opts = { 0 };
> + struct device *dev = csiphy->camss->dev;
> + u8 num_lanes = lncfg->num_data;
> + s64 link_freq;
> + int ret;
> +
> + dphy_cfg = &dphy_opts.mipi_dphy;
> +
> + link_freq = camss_get_link_freq(&csiphy->subdev.entity, bpp, num_lanes);
> +
> + if (link_freq <= 0) {
> + dev_err(dev,
> + "Cannot get CSI2 transmitter's link frequency\n");
> + return -EINVAL;
> + }
> +
> + ret = phy_mipi_dphy_get_default_config_for_hsclk(link_freq, num_lanes,
> + dphy_cfg);
[Severity: High]
Are we passing the correct data rate here? The V4L2 camss_get_link_freq()
helper returns the MIPI D-PHY link frequency (the clock lane frequency in Hz).
However, the generic PHY framework's phy_mipi_dphy_get_default_config_for_hsclk()
function expects its hs_clk_rate argument to be the data rate per lane in bits
per second.
Since MIPI D-PHY uses Double Data Rate, the data rate is exactly twice the
clock frequency. Passing the clock frequency directly during csiphy_stream_on()
causes the calculated Unit Interval (UI) to be twice its correct value. This
will result in completely incorrect MIPI D-PHY timing parameters (hs_prepare,
hs_settle) and could cause physical layer synchronization failures with the
sensor.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260918-b4-linux-next-25-03-13-dtsi-x1e80100-camss-v20-0-dc244e124e71@linaro.org?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: "Bryan O'Donoghue" <bryan.odonoghue@linaro.org>
Cc: olteanv@gmail.com, conor+dt@kernel.org, robh@kernel.org,
vkoul@kernel.org, devicetree@vger.kernel.org,
linux-phy@lists.infradead.org, linux-clk@vger.kernel.org,
media-ci@linuxtv.org, neil.armstrong@linaro.org
Subject: Re: [PATCH v20 5/6] media: qcom: camss: Add support for PHY API devices
Date: Fri, 18 Sep 2026 14:19:37 +0000 [thread overview]
Message-ID: <20260918141938.227071F00898@smtp.kernel.org> (raw)
In-Reply-To: <20260918-b4-linux-next-25-03-13-dtsi-x1e80100-camss-v20-5-dc244e124e71@linaro.org>
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [High] media: camss: incorrect data rate passed to PHY config
- [Medium] kconfig: select of non-existent symbol PHY_QCOM_MIPI_CSI2
--
commit 53c91247e8179ba522478e54bb98836c106cd0ee
Author: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
media: qcom: camss: Add support for PHY API devices
Add the ability to use a PHY pointer which interacts with the standard PHY
API.
> diff --git a/drivers/media/platform/qcom/camss/Kconfig b/drivers/media/platform/qcom/camss/Kconfig
> index 4eda48cb1adf0..1edc5e5a1829e 100644
> --- a/drivers/media/platform/qcom/camss/Kconfig
> +++ b/drivers/media/platform/qcom/camss/Kconfig
> @@ -7,3 +7,4 @@ config VIDEO_QCOM_CAMSS
> select VIDEO_V4L2_SUBDEV_API
> select VIDEOBUF2_DMA_SG
> select V4L2_FWNODE
> + select PHY_QCOM_MIPI_CSI2
[Severity: Medium]
Does this Kconfig symbol exist? I am unable to find PHY_QCOM_MIPI_CSI2 anywhere
in the kernel tree.
Selecting a non-existent symbol has no effect. This could lead to a silent
failure where the required PHY driver is not built, potentially leaving the
hardware non-functional when relying on this driver.
> diff --git a/drivers/media/platform/qcom/camss/camss-csiphy.c b/drivers/media/platform/qcom/camss/camss-csiphy.c
> index 539ac4888b608..aaed7d0309dd6 100644
> --- a/drivers/media/platform/qcom/camss/camss-csiphy.c
> +++ b/drivers/media/platform/qcom/camss/camss-csiphy.c
[ ... ]
> +static int csiphy_stream_on(struct csiphy_device *csiphy)
> +{
> + u8 bpp = csiphy_get_bpp(csiphy->res->formats->formats, csiphy->res->formats->nformats,
> + csiphy->fmt[MSM_CSIPHY_PAD_SINK].code);
> + struct csiphy_lanes_cfg *lncfg = &csiphy->cfg.csi2->lane_cfg;
> + struct phy_configure_opts_mipi_dphy *dphy_cfg;
> + union phy_configure_opts dphy_opts = { 0 };
> + struct device *dev = csiphy->camss->dev;
> + u8 num_lanes = lncfg->num_data;
> + s64 link_freq;
> + int ret;
> +
> + dphy_cfg = &dphy_opts.mipi_dphy;
> +
> + link_freq = camss_get_link_freq(&csiphy->subdev.entity, bpp, num_lanes);
> +
> + if (link_freq <= 0) {
> + dev_err(dev,
> + "Cannot get CSI2 transmitter's link frequency\n");
> + return -EINVAL;
> + }
> +
> + ret = phy_mipi_dphy_get_default_config_for_hsclk(link_freq, num_lanes,
> + dphy_cfg);
[Severity: High]
Are we passing the correct data rate here? The V4L2 camss_get_link_freq()
helper returns the MIPI D-PHY link frequency (the clock lane frequency in Hz).
However, the generic PHY framework's phy_mipi_dphy_get_default_config_for_hsclk()
function expects its hs_clk_rate argument to be the data rate per lane in bits
per second.
Since MIPI D-PHY uses Double Data Rate, the data rate is exactly twice the
clock frequency. Passing the clock frequency directly during csiphy_stream_on()
causes the calculated Unit Interval (UI) to be twice its correct value. This
will result in completely incorrect MIPI D-PHY timing parameters (hs_prepare,
hs_settle) and could cause physical layer synchronization failures with the
sensor.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260918-b4-linux-next-25-03-13-dtsi-x1e80100-camss-v20-0-dc244e124e71@linaro.org?part=5
next prev parent reply other threads:[~2026-09-18 14:19 UTC|newest]
Thread overview: 52+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-18 13:56 [PATCH v20 0/6] Add phy_get_by_of_node and devm helper Bryan O'Donoghue
2026-09-18 13:56 ` Bryan O'Donoghue
2026-09-18 13:56 ` [PATCH v20 1/6] phy: core: Fix race-condition between _of_phy_get() and try_module_get() Bryan O'Donoghue
2026-09-18 13:56 ` Bryan O'Donoghue
2026-09-18 13:56 ` [PATCH v20 2/6] phy: core: Add phy_get_by_of_node() Bryan O'Donoghue
2026-09-18 13:56 ` Bryan O'Donoghue
2026-09-18 14:10 ` Neil Armstrong
2026-09-18 14:10 ` Neil Armstrong
2026-09-18 14:27 ` Bryan O'Donoghue
2026-09-18 14:27 ` Bryan O'Donoghue
2026-09-18 15:35 ` johannes.goede
2026-09-18 15:35 ` johannes.goede
2026-09-22 12:19 ` Neil Armstrong
2026-09-22 12:19 ` Neil Armstrong
2026-09-22 12:14 ` Neil Armstrong
2026-09-22 12:14 ` Neil Armstrong
2026-09-22 12:36 ` Manivannan Sadhasivam
2026-09-22 12:36 ` Manivannan Sadhasivam
2026-09-18 13:56 ` [PATCH v20 3/6] phy: core: Add devm_phy_get_by_of_node() Bryan O'Donoghue
2026-09-18 13:56 ` Bryan O'Donoghue
2026-09-18 14:10 ` Neil Armstrong
2026-09-18 14:10 ` Neil Armstrong
2026-09-18 13:56 ` [PATCH v20 4/6] phy: core: Add missing kerneldoc colon in two locations Bryan O'Donoghue
2026-09-18 13:56 ` Bryan O'Donoghue
2026-09-18 14:08 ` sashiko-bot
2026-09-18 14:08 ` sashiko-bot
2026-09-18 14:11 ` Neil Armstrong
2026-09-18 14:11 ` Neil Armstrong
2026-09-22 12:37 ` Manivannan Sadhasivam
2026-09-22 12:37 ` Manivannan Sadhasivam
2026-09-18 13:56 ` [PATCH v20 5/6] media: qcom: camss: Add support for PHY API devices Bryan O'Donoghue
2026-09-18 13:56 ` Bryan O'Donoghue
2026-09-18 14:19 ` sashiko-bot [this message]
2026-09-18 14:19 ` sashiko-bot
2026-09-18 14:48 ` Loic Poulain
2026-09-18 14:48 ` Loic Poulain
2026-09-22 9:15 ` Konrad Dybcio
2026-09-22 9:15 ` Konrad Dybcio
2026-09-22 9:32 ` Bryan O'Donoghue
2026-09-22 9:32 ` Bryan O'Donoghue
2026-09-25 16:40 ` Liviu Nicoara
2026-09-25 16:40 ` Liviu Nicoara
2026-09-27 8:40 ` johannes.goede
2026-09-27 8:40 ` johannes.goede
2026-09-27 15:32 ` Liviu Nicoara
2026-09-27 15:32 ` Liviu Nicoara
2026-09-18 13:56 ` [PATCH v20 6/6] media: qcom: camss: Use data-lanes starting at 1 for new CSIPHY mode Bryan O'Donoghue
2026-09-18 13:56 ` Bryan O'Donoghue
2026-09-25 16:41 ` Liviu Nicoara
2026-09-25 16:41 ` Liviu Nicoara
2026-09-23 12:35 ` (subset) [PATCH v20 0/6] Add phy_get_by_of_node and devm helper Vinod Koul
2026-09-23 12:35 ` Vinod Koul
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=20260918141938.227071F00898@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=bryan.odonoghue@linaro.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=linux-clk@vger.kernel.org \
--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.