From: sashiko-bot@kernel.org
To: "David Heidelberg via B4 Relay" <devnull+david.ixit.cz@kernel.org>
Cc: linux-media@vger.kernel.org
Subject: Re: [PATCH v6 5/8] media: qcom: camss: csiphy-3ph: Add Gen2 v1.1 MIPI CSI-2 C-PHY init
Date: Wed, 03 Jun 2026 00:26:54 +0000 [thread overview]
Message-ID: <20260603002655.4729D1F00893@smtp.kernel.org> (raw)
In-Reply-To: <20260603-qcom-cphy-v6-5-e50de0b557a8@ixit.cz>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] The patch introduces the use of `CSIPHY_SETTLE_CNT_HIGHER_BYTE` in `lane_regs_sdm845_3ph`, but the driver lacks support for it in `csiphy_gen2_config_lanes()`, creating a brittle hidden fallback.
--
commit 58f98987d0e532a5cd22b2d977566527a7e3b7b9
Author: David Heidelberg <david@ixit.cz>
media: qcom: camss: csiphy-3ph: Add Gen2 v1.1 MIPI CSI-2 C-PHY init
Add a PHY configuration sequence for the sdm845 which uses a Qualcomm
Gen 2 version 1.1 CSI-2 PHY. The PHY can be configured as two phase or
three phase in C-PHY or D-PHY mode. This configuration supports three-phase
C-PHY mode.
> 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 938c365eb352f..13d7372bd225d 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
[ ... ]
> @@ -220,6 +228,72 @@ csiphy_lane_regs lane_regs_sdm845[] = {
> {0x0664, 0x7F, 0x00, CSIPHY_DEFAULT_PARAMS},
> };
>
> +/* GEN2 1.0 3PH */
> +/* 3 entries: 3 lanes (C-PHY) */
> +static const struct
> +csiphy_lane_regs lane_regs_sdm845_3ph[] = {
> + {CSIPHY_LN1_CSI_3PH_CTRLn_ADDR(23), 0x43, 0x00, CSIPHY_DEFAULT_PARAMS},
> + {CSIPHY_LN1_CSI_3PH_CTRLn_ADDR(26), 0xa0, 0x00, CSIPHY_DEFAULT_PARAMS},
> + {CSIPHY_LN1_CSI_3PH_CTRLn_ADDR(27), 0x25, 0x00, CSIPHY_DEFAULT_PARAMS},
> + {CSIPHY_LN1_CSI_3PH_CTRLn_ADDR(1), 0x06, 0x00, CSIPHY_DEFAULT_PARAMS},
> + {CSIPHY_LN1_CSI_3PH_CTRLn_ADDR(3), 0x12, 0x00, CSIPHY_SETTLE_CNT_LOWER_BYTE},
> + {CSIPHY_LN1_CSI_3PH_CTRLn_ADDR(2), 0x00, 0x00, CSIPHY_SETTLE_CNT_HIGHER_BYTE},
[Severity: Low]
Does the driver actually support writing the higher byte of the settle count
here?
Looking at csiphy_gen2_config_lanes() in this file, the switch statement
doesn't handle CSIPHY_SETTLE_CNT_HIGHER_BYTE:
switch (r->csiphy_param_type) {
case CSIPHY_SETTLE_CNT_LOWER_BYTE:
val = settle_cnt & 0xff;
break;
case CSIPHY_SKEW_CAL:
/* TODO: support application of skew from dt flag */
continue;
case CSIPHY_DNP_PARAMS:
continue;
default:
val = r->reg_data;
break;
}
Since the case is missing, it falls through to the default case and writes
the hardcoded 0x00 value from the array instead of actively evaluating the
higher byte of the calculated settle count.
This happens to work right now because csiphy_settle_cnt_calc() returns a u8,
so the higher byte would always be zero anyway, but it renders the
CSIPHY_SETTLE_CNT_HIGHER_BYTE tag meaningless.
> + {CSIPHY_LN1_CSI_3PH_CTRLn_ADDR(5), 0x20, 0x00, CSIPHY_DEFAULT_PARAMS},
> + {CSIPHY_LN1_CSI_3PH_CTRLn_ADDR(20), 0x00, 0x00, CSIPHY_DEFAULT_PARAMS},
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260603-qcom-cphy-v6-0-e50de0b557a8@ixit.cz?part=5
next prev parent reply other threads:[~2026-06-03 0:26 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-02 23:30 [PATCH v6 0/8] media: camss: Add support for C-PHY configuration on Qualcomm platforms David Heidelberg via B4 Relay
2026-06-02 23:30 ` David Heidelberg
2026-06-02 23:30 ` [PATCH v6 1/8] media: qcom: camss: csiphy: Introduce PHY configuration David Heidelberg via B4 Relay
2026-06-02 23:30 ` David Heidelberg
2026-06-03 21:34 ` Frank Li
2026-06-02 23:30 ` [PATCH v6 2/8] media: qcom: camss: csiphy-3ph: Use odd bits for configuring C-PHY lanes David Heidelberg via B4 Relay
2026-06-02 23:30 ` David Heidelberg
2026-06-02 23:55 ` sashiko-bot
2026-06-03 21:42 ` Frank Li
2026-06-03 21:57 ` Bryan O'Donoghue
2026-06-04 12:08 ` David Heidelberg
2026-06-02 23:30 ` [PATCH v6 3/8] media: qcom: camss: Prepare CSID for C-PHY support David Heidelberg via B4 Relay
2026-06-02 23:30 ` David Heidelberg
2026-06-03 0:03 ` sashiko-bot
2026-06-03 21:47 ` Frank Li
2026-06-04 12:34 ` David Heidelberg
2026-06-04 19:07 ` Frank Li
2026-06-05 8:50 ` Bryan O'Donoghue
2026-06-02 23:30 ` [PATCH v6 4/8] media: qcom: camss: Initialize lanes after lane configuration is available David Heidelberg via B4 Relay
2026-06-02 23:30 ` David Heidelberg
2026-06-03 0:13 ` sashiko-bot
2026-06-03 21:49 ` Frank Li
2026-06-02 23:30 ` [PATCH v6 5/8] media: qcom: camss: csiphy-3ph: Add Gen2 v1.1 MIPI CSI-2 C-PHY init David Heidelberg via B4 Relay
2026-06-02 23:30 ` David Heidelberg
2026-06-03 0:26 ` sashiko-bot [this message]
2026-06-03 21:53 ` Frank Li
2026-06-05 10:25 ` Bryan O'Donoghue
2026-06-05 14:47 ` Michael Srba
2026-06-05 22:20 ` Bryan O'Donoghue
2026-06-02 23:30 ` [PATCH v6 6/8] media: qcom: camss: csiphy-3ph: Update " David Heidelberg via B4 Relay
2026-06-02 23:30 ` David Heidelberg
2026-06-02 23:30 ` [PATCH v6 7/8] media: qcom: camss: Account for C-PHY when calculating link frequency David Heidelberg via B4 Relay
2026-06-02 23:30 ` David Heidelberg
2026-06-03 0:53 ` sashiko-bot
2026-06-02 23:30 ` [PATCH v6 8/8] media: qcom: camss: Enable C-PHY where available David Heidelberg via B4 Relay
2026-06-02 23:30 ` David Heidelberg
2026-06-03 21:54 ` Frank Li
2026-06-03 10:03 ` [PATCH v6 0/8] media: camss: Add support for C-PHY configuration on Qualcomm platforms Bryan O'Donoghue
2026-06-03 10:17 ` David Heidelberg
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=20260603002655.4729D1F00893@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=devnull+david.ixit.cz@kernel.org \
--cc=linux-media@vger.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.