All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Taniya Das" <taniya.das@oss.qualcomm.com>
Cc: devicetree@vger.kernel.org, robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH 6/6] clk: qcom: gpucc: Add Nord graphics clock controller support
Date: Tue, 23 Jun 2026 11:06:27 +0000	[thread overview]
Message-ID: <20260623110628.86E001F00A3A@smtp.kernel.org> (raw)
In-Reply-To: <20260623-nords_mm_v1-v1-6-860c84539804@oss.qualcomm.com>

Thank you for your contribution! Sashiko AI review found 3 potential issue(s) to consider:
- [High] Incorrect frequency table reused for gpu_2_cc_hub_clk_src.
- [High] Missing resets in gpu_cc_nord_resets leading to potential PLL corruption, and missing AHB divider in GPU2CC.
- [Medium] Mismatched clock halt_check flags between GPUCC and GPU2CC controllers.
--

commit b571fd2818fe3ed8089ed7cac4ad63964b0b6f76
Author: Taniya Das <taniya.das@oss.qualcomm.com>

clk: qcom: gpucc: Add Nord graphics clock controller support

Add support for the GPU clock controllers (GPUCC) on the Qualcomm
Nord platform. The platform includes two GPU clock controller instances,
GPUCC and GPU2CC, which provide clocks required for the graphics subsystem.

> diff --git a/drivers/clk/qcom/gpu2cc-nord.c b/drivers/clk/qcom/gpu2cc-nord.c
> new file mode 100644
> index 0000000000000..d1baf019704c4
> --- /dev/null
> +++ b/drivers/clk/qcom/gpu2cc-nord.c
[ ... ]
> +static struct clk_rcg2 gpu_2_cc_hub_clk_src = {
> +	.cmd_rcgr = 0x91a8,
> +	.mnd_width = 0,
> +	.hid_width = 5,
> +	.parent_map = gpu_2_cc_parent_map_2,
> +	.freq_tbl = ftbl_gpu_2_cc_ff_clk_src,

[Severity: High]
Is it intentional to use ftbl_gpu_2_cc_ff_clk_src for the hub clock
frequency table?

Could this cause incorrect frequency configurations, such as using the
ff clock's frequency settings instead of a dedicated hub frequency table?

> +	.hw_clk_ctrl = true,
> +	.clkr.hw.init = &(const struct clk_init_data) {
[ ... ]
> +static struct clk_branch gpu_2_cc_ahb_clk = {
> +	.halt_reg = 0x90cc,
> +	.halt_check = BRANCH_HALT_VOTED,

[Severity: Medium]
Does this halt_check mismatch with the equivalent clock in gpucc?

This branch uses BRANCH_HALT_VOTED, but looking at gpu_cc_ahb_clk in
gpucc-nord.c, it uses BRANCH_HALT_DELAY.

Could an incorrect halt check cause the common clock framework to improperly
wait for clock status changes during enable/disable operations?

> +	.clkr = {
> +		.enable_reg = 0x90cc,
> +		.enable_mask = BIT(0),
> +		.hw.init = &(const struct clk_init_data) {
> +			.name = "gpu_2_cc_ahb_clk",
> +			.parent_hws = (const struct clk_hw*[]) {
> +				&gpu_2_cc_hub_clk_src.clkr.hw,

[Severity: High]
Are we missing the hub divider block in the parent chain here?

The parent is set directly to gpu_2_cc_hub_clk_src, whereas the equivalent
gpu_cc_ahb_clk in gpucc-nord.c is parented to a gpu_cc_hub_div_clk_src
divider block.

> +			},
> +			.num_parents = 1,
> +			.flags = CLK_SET_RATE_PARENT,
> +			.ops = &clk_branch2_ops,
> +		},
> +	},
> +};
[ ... ]
> diff --git a/drivers/clk/qcom/gpucc-nord.c b/drivers/clk/qcom/gpucc-nord.c
> new file mode 100644
> index 0000000000000..407cf7e5ad437
> --- /dev/null
> +++ b/drivers/clk/qcom/gpucc-nord.c
[ ... ]
> +static const struct qcom_reset_map gpu_cc_nord_resets[] = {
> +	[GPU_CC_ACD_BCR] = { 0x92f8 },
> +	[GPU_CC_CB_BCR] = { 0x9340 },
> +	[GPU_CC_CX_BCR] = { 0x90e4 },
> +	[GPU_CC_FAST_HUB_BCR] = { 0x9384 },
> +	[GPU_CC_GFX3D_AON_BCR] = { 0x91ac },
> +	[GPU_CC_GX_BCR] = { 0x9058 },
> +	[GPU_CC_XO_BCR] = { 0x9000 },
> +};

[Severity: High]
Are we missing entries for GPU_CC_FF_BCR and GPU_CC_GMU_BCR in this list?

Since qcom_reset_map uses sparse static array initialization, any
uninitialized IDs below the maximum enum value will default to 0x0.

If a client attempts to assert these missing resets, could it inadvertently
write to offset 0x0 and corrupt the gpu_cc_pll0 state?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260623-nords_mm_v1-v1-0-860c84539804@oss.qualcomm.com?part=6

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

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-23 10:54 [PATCH 0/6] clk: qcom: Add Nord multimedia clock controller support Taniya Das
2026-06-23 10:54 ` [PATCH 1/6] clk: qcom: gcc-nord: mark PCIe link clocks as critical Taniya Das
2026-06-23 10:54 ` [PATCH 2/6] clk: qcom: negcc-nord: keep GPU2 CFG clock enabled via critical CBCR Taniya Das
2026-06-23 10:54 ` [PATCH 3/6] dt-bindings: clock: qcom: Document Nord display clock controller Taniya Das
2026-06-23 10:54 ` [PATCH 4/6] clk: qcom: Add Nord display clock controller support Taniya Das
2026-06-23 10:54 ` [PATCH 5/6] dt-bindings: clock: qcom: Document Nord GPU clock controllers Taniya Das
2026-06-23 10:54 ` [PATCH 6/6] clk: qcom: gpucc: Add Nord graphics clock controller support Taniya Das
2026-06-23 11:06   ` sashiko-bot [this message]

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=20260623110628.86E001F00A3A@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=robh@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=taniya.das@oss.qualcomm.com \
    /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.