Re: [PATCH v3 3/6] arm64: dts: qcom: kodiak: Add GEM_NOC interconnect for adreno SMMU

From: Bibek Kumar Patro

Date: Sun Nov 15 2026 - 04:46:04 EST


On Nov 13, Val Packett wrote:
Hi,

On 7/17/26 8:40 AM, Bibek Kumar Patro wrote:


On 7/8/2026 8:56 PM, Bjorn Andersson wrote:
On Wed, Jul 08, 2026 at 03:31:07PM +0530, Bibek Kumar Patro wrote:


On 7/7/2026 10:14 PM, Dmitry Baryshkov wrote:
On Tue, Jul 07, 2026 at 06:37:24PM +0530, Bibek Kumar Patro wrote:


On 7/6/2026 11:12 PM, Dmitry Baryshkov wrote:
On Mon, Jul 06, 2026 at 10:26:36PM +0530, Bibek Kumar Patro wrote:
On Kodiak platforms, the Adreno SMMU requires a bandwidth vote on
the GEM_NOC path (MASTER_GPU_TCU -> SLAVE_EBI1) before its registers
are accessible. Without this vote, the SMMU may become unreachable,
leading to intermittent probe failures and runtime issues.

Add the required interconnect to ensure reliable register access.

Signed-off-by: Bibek Kumar Patro <bibek.patro@xxxxxxxxxxxxxxxx>
---
    arch/arm64/boot/dts/qcom/kodiak.dtsi | 2 ++
    1 file changed, 2 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/kodiak.dtsi b/arch/arm64/boot/dts/qcom/kodiak.dtsi
index 90e50c245c0c..721526f023dd 100644
--- a/arch/arm64/boot/dts/qcom/kodiak.dtsi
+++ b/arch/arm64/boot/dts/qcom/kodiak.dtsi
@@ -3389,6 +3389,8 @@ adreno_smmu: iommu@3da0000 {
                power-domains = <&gpucc GPU_CC_CX_GDSC>;
                dma-coherent;
+            interconnects = <&gem_noc MASTER_GPU_TCU QCOM_ICC_TAG_ALWAYS
+                     &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>;

Why is it ALWAYS? Would it be better to declare it as ACTIVE_ONLY and

Added QCOM_ICC_TAG_ALWAYS, to hold the vote in SLEEP bucket as well
preventing gem_noc going to sleep when icc_set_bw is being called.

_why_?


Now when i think of where we implemented the hooks, ALWAYS is not needed. We
should keep it ACTIVE_ONLY since we are already voting it
back in resume pah. I'll fix it in next revision.


The path is between the SMMU and DDR, so clearly it has to do with the
TCU's ability to fetch things from DDR.


Yes as you rightly mentioned, this series is helping to resolve the race in TCU DDR clink

ACTIVE_ONLY states that the vote should only be applied when the
application subsystem (CPUSS) is not in low-power mode (CPU is active).

So, are you saying that in all cases that cpuidle might select such
low-power state the GPU TCU is "stopped", and does not need to perform
any memory transactions?


I rechecked the architectural block diagram, GPU TCU is
independent of the CPUSS, unlike system TCU.

This means CPUSS can be powered down while the GPU TCU remains voted up. While this series was intended to avoid a DDR voting race between the
GPU TCU and its clients, using ACTIVE_ONLY could have possibly
introduced a race between CPUSS and the GPU TCU itself.

Thanks for catching this in my reply Bjorn.

ACTIVE_ONLY would have been suitable for system TCU (apps_smmu)
for which the interconnect field is anyways not needed, but
unsuitable for GPU TCU.


To me these two are orthogonal and TAG_ALWAYS is logically correct, but
perhaps there's some practical dependency that I'm missing?


We can ignore my acknowledgment [1] on previous response, Dmitry.
ALWAYS TAG is correct here instead of ACTIVE_ONLY in the interconnect field for adreno SMMU.


This series seems to help with a really annoying bug on Kodiak phones like sm7325-motorola-dubai where often boot would hang when initializing the display panel (so it took a few reboots to successfully boot the device).

And indeed it only helps with the ALWAYS tag..

I've had this patch applied for a while (without even realizing that it fixed that!! thought the issue was gone because of something else) and today I went around kodiak.dtsi trying to remove unnecessary ALWAYS votes… first boot after changing this tag to ACTIVE_ONLY and boom, hang.


Tested-by: Val Packett <val@xxxxxxxxxxxx> # sm7325-motorola-dubai

(for patch 2 i.e. the driver code as well)


Thanks Val for reporting your issue scenarios and providing a
Tested-by tag — this issue has been tough to reproduce consistently in our test setups.

As I understand your scenario, without the patch:

arm_smmu_runtime_resume() enables clocks and immediately calls
arm_smmu_device_reset() to write SMMU registers. At that point there
is no GEM_NOC voter — the GMU may not be active yet and therefore holds
no vote on GEM_NOC either — leading to the observed hang.

With the patch, the sequence in arm_smmu_runtime_resume() becomes:

1. impl->runtime_resume() -> icc_set_bw(icc_path, 0, 1)
(SMMU holds its own GEM_NOC vote)
2. clk_bulk_enable() -> clocks on
3. arm_smmu_device_reset() -> register writes, GEM_NOC is live

And the reverse in arm_smmu_runtime_suspend():

1. clk_bulk_disable() -> clocks off
2. impl->runtime_suspend() -> icc_set_bw(icc_path, 0, 0)
(vote released after clocks are off)
I'll address all v3 comments and send out v4 shortly with your
Tested-by tag. Patch 2 will have minor structural changes (no functional
difference), so your tag can be carried as-is.

Thanks & regards,
Bibek


Thanks,
~val