Skip to content

Nord GPU_0 and OPTEE support on 7.3 LTS - #1554

Open
asherawa wants to merge 18 commits into
qualcomm-linux:qcom-7.3-esfrom
asherawa:qcom-7.3-es
Open

asherawa wants to merge 18 commits into
qualcomm-linux:qcom-7.3-esfrom
asherawa:qcom-7.3-es

Conversation

@asherawa

Copy link
Copy Markdown

Summary

Adds Adreno 753 (Nord) GPU support and makes the Adreno
driver work on platforms whose secure-world firmware does not implement all
GPU SCM calls. It describes the GPU CX SMMU aperture region,
and disables the GPU zap shader in the EL2 overlay.

Few commits in this PR differ from the upstream patches because of the
code difference between 7.3 branch and 7.4rc3 branch

Two missing SCM calls currently leave the GPU unusable:

  • GPU init regs (qcom_scm_gpu_init_regs()): on A750, A753 and A8xx,
    a6xx_gmu_secure_init() fails when this call is missing, so GMU resume
    aborts and the GPU never come up. The call is now skipped, with a
    one-time message, when it isn't available. The fuse register is still
    read back, so fuse-dependent features such as ray tracing are reported
    correctly if an earlier boot stage programmed it.

  • SMMU aperture (qcom_scm_set_gpu_smmu_aperture()): when this call is
    missing, the CX SMMU aperture is never configured and the command
    processor can't switch pagetables. The driver now programs the aperture
    itself from a per-GPU register list, if the DT describes the aperture
    region: GC to context bank 0, LPAC to context bank 1 on A753, and the
    other apertures disabled.

Platforms whose secure world provides these calls keep using them, and
platforms whose DT doesn't describe the aperture region are unaffected.

Lore

Nord GPU v2:
https://lore.kernel.org/r/20261118-nord-gpu1-v2-0-8d6d9908b7c5@oss.qualcomm.com
SCM fallback v1:
https://lore.kernel.org/r/20261118-adreno-scm-fallback-v1-0-e99cdbf3121d@oss.qualcomm.com

asherawa and others added 18 commits November 26, 2026 11:21
…753 GPU"

This reverts commit 95f9f50.

Signed-off-by: Aditya Sherawat <asherawa@qti.qualcomm.com>
This reverts commit cd07c61.

Signed-off-by: Aditya Sherawat <asherawa@qti.qualcomm.com>
…nodes"

This reverts commit f7cc625.

Signed-off-by: Aditya Sherawat <asherawa@qti.qualcomm.com>
This reverts commit 099da42.

Signed-off-by: Aditya Sherawat <asherawa@qti.qualcomm.com>
This reverts commit c205c03.

Signed-off-by: Aditya Sherawat <asherawa@qti.qualcomm.com>
This reverts commit 72d4bad.

Signed-off-by: Aditya Sherawat <asherawa@qti.qualcomm.com>
Adreno 753 is the primary GPU in the Qualcomm Nord SoC and belongs to
the A7xx Gen3 family. It is derived from A750 and shares the same
IP-level configuration: protected registers, pwrup/IFPC register lists,
GBIF CX registers, gmu_cgc_mode, 3MB GMEM, bus BCMs and preemption
record size. The differences visible to the KMD are the chip id
(0x43051701), the GMU chip id (0x70d0000) and the gen71300 SQE and GMU
firmware.

The Nord primary GPU is the same as A750 but has a different chip id,
so it needs its own catalog entry. Add a new catalog entry for this
GPU and an adreno_is_a753() helper. HW clock gating is not working at
the moment, so it is kept disabled for now.

Link: https://lore.kernel.org/r/20261118-nord-gpu1-v2-1-8d6d9908b7c5@oss.qualcomm.com
Signed-off-by: Shivam Rawat <shivrawa@qti.qualcomm.com>
Tested-by: Shawn Guo <shengchao.guo@oss.qualcomm.com>
Signed-off-by: Akhil P Oommen <akhilpo@oss.qualcomm.com>
Signed-off-by: Aditya Sherawat <asherawa@qti.qualcomm.com>
Adreno 753 is the primary GPU in the Qualcomm Nord SoC and belongs to the
A7xx Gen3 family. It is very similar to A750 and has the same register
layout.

Document the qcom,adreno-43051701 GPU compatible and add a separate
constraint block for the qcom,adreno-gmu-753.1 GMU describing its
registers and clocks.

Link: https://lore.kernel.org/r/20261118-nord-gpu1-v2-2-8d6d9908b7c5@oss.qualcomm.com
Signed-off-by: Shivam Rawat <shivrawa@qti.qualcomm.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Signed-off-by: Akhil P Oommen <akhilpo@oss.qualcomm.com>
Signed-off-by: Aditya Sherawat <asherawa@qti.qualcomm.com>
Nord SoC integrates an Adreno 753 GPU as its primary GPU, belonging to
the A7xx Gen3 family, along with its Graphics Management Unit (GMU).

Add the GPU and GMU nodes together with their OPP tables. The GPU sits
behind adreno_smmu_0 and uses the gen71300 zap shader, while the GMU is
clocked and powered from GPUCC.

Following the existing Nord split, the SoC-invariant properties (reg,
interrupts, iommus, zap-shader) live in nord.dtsi with both nodes
disabled, while nord-embedded.dtsi adds the clocks, power domains,
interconnects and OPP tables that are only managed by the OS on the
Embedded (non-GearVM) variant.

Link: https://lore.kernel.org/r/20261118-nord-gpu1-v2-3-8d6d9908b7c5@oss.qualcomm.com
Signed-off-by: Shivam Rawat <shivrawa@qti.qualcomm.com>
Signed-off-by: Akhil P Oommen <akhilpo@oss.qualcomm.com>
Reviewed-by: Abel Vesa <abel.vesa@oss.qualcomm.com>
Signed-off-by: Aditya Sherawat <asherawa@qti.qualcomm.com>
Unlike the CPU, the GPU does not throttle its speed automatically when
it reaches high temperatures.

Set up GPU cooling on Nord by throttling the Adreno 753 GPU when it
reaches 105°C. Label the passive trip points of the GPU thermal zones,
map them to the GPU as a cooling device, and add a passive polling
delay so the thermal framework can monitor the zones while throttling.

The thermal zones and the GPU node are both described in nord.dtsi, so
do it there. On the GearVM variant the GPU node stays disabled, no
cooling device gets registered for it, and the maps are simply left
unbound.

Link: https://lore.kernel.org/r/20261118-nord-gpu1-v2-4-8d6d9908b7c5@oss.qualcomm.com
Signed-off-by: Aastha Pandey <aastha.pandey@oss.qualcomm.com>
Signed-off-by: Akhil P Oommen <akhilpo@oss.qualcomm.com>
Reviewed-by: Abel Vesa <abel.vesa@oss.qualcomm.com>
Signed-off-by: Aditya Sherawat <asherawa@qti.qualcomm.com>
Enable the Adreno 753 GPU on the Nord RRD board and provide the
firmware path for its zap shader.

Link: https://lore.kernel.org/r/20261118-nord-gpu1-v2-5-8d6d9908b7c5@oss.qualcomm.com
Signed-off-by: Shivam Rawat <shivrawa@qti.qualcomm.com>
Signed-off-by: Akhil P Oommen <akhilpo@oss.qualcomm.com>
Signed-off-by: Aditya Sherawat <asherawa@qti.qualcomm.com>
Enable the Adreno 753 GPU on the Nord Ride Embedded board and provide
the firmware path for its zap shader.

Signed-off-by: Shawn Guo <shengchao.guo@oss.qualcomm.com>
Signed-off-by: Puranam V G Tejaswi <puranam.tejaswi@oss.qualcomm.com>
Upstream-Status: Pending
Signed-off-by: Aditya Sherawat <asherawa@qti.qualcomm.com>
Add the CX SMMU aperture register region to the A753 GPU node.

Link: https://lore.kernel.org/r/20261118-adreno-scm-fallback-v1-5-e99cdbf3121d@oss.qualcomm.com
Signed-off-by: Puranam V G Tejaswi <puranam.tejaswi@oss.qualcomm.com>
Reviewed-by: Abel Vesa <abel.vesa@oss.qualcomm.com>
Reviewed-by: Akhil P Oommen <akhilpo@oss.qualcomm.com>
Signed-off-by: Aditya Sherawat <asherawa@qti.qualcomm.com>
…node

In EL2 the zap shader is not loaded by the kernel, so disable the
gpu_0_zap_shader node in the EL2 overlay.

Signed-off-by: Shivam Rawat <shivrawa@qti.qualcomm.com>
Signed-off-by: Puranam V G Tejaswi <puranam.tejaswi@oss.qualcomm.com>
Signed-off-by: Aditya Sherawat <asherawa@qti.qualcomm.com>
The Adreno driver asks the secure world to initialize some GPU registers
through qcom_scm_gpu_init_regs(), and fails to power up the GPU if this
call fails.

Not every secure world implements this call. When it is missing, the
call fails in the same way as a real error, so the driver cannot tell
the two cases apart.

Add qcom_scm_gpu_init_regs_is_available(), similar to
qcom_scm_set_gpu_smmu_aperture_is_available(), so that the driver can
check whether the secure world supports the call before making it.

Link: https://lore.kernel.org/r/20261118-adreno-scm-fallback-v1-1-e99cdbf3121d@oss.qualcomm.com
Signed-off-by: Puranam V G Tejaswi <puranam.tejaswi@oss.qualcomm.com>
Signed-off-by: Aditya Sherawat <asherawa@qti.qualcomm.com>
…M call is absent

On A750, A753 and A8xx, a6xx_gmu_secure_init() asks the secure world to
program CX_MISC_SW_FUSE_VALUE through qcom_scm_gpu_init_regs(), and
aborts the GMU resume if that call fails.

Some platforms have a secure world that does not implement this call.
The call fails every time and the GPU never powers up. The fuse
register is still protected from the kernel, so the driver cannot
program it directly either.

If the secure world does not support the call, skip it, but still read
the fuse register back. An earlier boot stage may have programmed it,
and the features it enables, such as raytracing, are then reported
correctly. If nothing programmed it, they stay disabled. Log once when
the call is skipped.

Link: https://lore.kernel.org/r/20261118-adreno-scm-fallback-v1-2-e99cdbf3121d@oss.qualcomm.com
Signed-off-by: Puranam V G Tejaswi <puranam.tejaswi@oss.qualcomm.com>
Signed-off-by: Aditya Sherawat <asherawa@qti.qualcomm.com>
…e region

The CX SMMU aperture is a register block in the GPU. It holds the
location of the GPU SMMU context banks that the CP uses for pagetable
switching.

On some GPUs the block lies outside the existing GPU register regions.
Add it as an optional aperture region, so the driver can program it on
platforms where the secure world does not.

Link: https://lore.kernel.org/r/20261118-adreno-scm-fallback-v1-3-e99cdbf3121d@oss.qualcomm.com
Signed-off-by: Puranam V G Tejaswi <puranam.tejaswi@oss.qualcomm.com>
Signed-off-by: Aditya Sherawat <asherawa@qti.qualcomm.com>
…orld can't

The CP switches pagetables by writing the GPU SMMU context bank
registers itself. It reaches them through the CX SMMU aperture, a
register block in the GPU, which has to point at context bank 0. The
secure world normally owns this block and programs it when
adreno_hw_init() calls qcom_scm_set_gpu_smmu_aperture().

Some platforms have a secure world that does not implement this. Nothing
programs the aperture on these platforms, so the CP cannot switch
pagetables.

If the SCM call is not supported, program the aperture from
adreno_hw_init() instead. Point the GC aperture at context bank 0 and,
on GPUs with LPAC, the LPAC aperture at context bank 1, the same way
the secure world does. Disable the other apertures. The SCM call is
still used whenever it is supported.

The values depend on where context bank 0 sits in the GPU register
space, which differs between GPUs, so they come from a register list in
the GPU catalog. The aperture region comes from DT. If DT describes the
region but it cannot be mapped, fail probe. Add the lists for A702,
whose entry Shikra's GPU also uses, and for A753.

Link: https://lore.kernel.org/r/20261118-adreno-scm-fallback-v1-4-e99cdbf3121d@oss.qualcomm.com
Signed-off-by: Puranam V G Tejaswi <puranam.tejaswi@oss.qualcomm.com>
Signed-off-by: Aditya Sherawat <asherawa@qti.qualcomm.com>

@apateriy-qcom apateriy-qcom left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please get this tested end to end.

@qcomlnxci

Copy link
Copy Markdown

Test results

Workflow run: 45812754908 attempt 1

Known failures configured: 0

Target Pass Non-pass Total
kbdev-nord-rrd-multimedia - ⛔ Not submitted -

Test Matrix

Test Case kbdev-nord-rrd-multimedia
LAVA result ⛔ Not submitted
Failure summary

Unexpected failures

  • kbdev-nord-rrd-multimedia did not produce a LAVA result artifact.

Result: blocked because unexpected failures were found.

@qlijarvis

Copy link
Copy Markdown

🔨 Build Failure Analysis — PR #1554

PR: #1554
Build run: https://github.com/qualcomm-linux/kernel-config/actions/runs/45812754908

Verdict

This is NOT a build failure. All kernel builds (base, RT, and flat) completed successfully. The workflow failed due to a test infrastructure issue: LAVA job submission timed out when connecting to lava-oss.qualcomm.com. No compilation errors were introduced by this PR.

Build Status:

  • ✅ Base kernel build: SUCCESS
  • ✅ RT kernel build: SUCCESS
  • ✅ Flat build (nord-rrd): SUCCESS
  • ❌ LAVA test submission: FAILED (network timeout - infrastructure issue)

Root Cause: Network connectivity timeout to LAVA server during test job submission, not a code compilation issue.

📎 Detailed analysis: Full report

@qlijarvis

Copy link
Copy Markdown

🔨 Build Failure Analysis — PR #1554

PR: #1554
Build run: https://github.com/qualcomm-linux/kernel-config/actions/runs/45812754908

# Error File:Line PR-introduced? Root Cause
N/A No compilation errors found N/A N/A All kernel builds completed successfully

Verdict

This is NOT a build failure. All kernel compilation jobs (standard build, RT build, and flat build) completed successfully. The workflow failed due to a test infrastructure issue: LAVA job submission timed out when connecting to lava-oss.qualcomm.com. This is an external infrastructure problem unrelated to the PR code changes.

📎 Detailed analysis: Full report

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants