mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/6] drm/msm/adreno: Handle unavailable GPU SCM calls
@ 2026-11-18 13:08 Puranam V G Tejaswi
  2026-11-18 13:08 ` [PATCH 1/6] firmware: qcom: scm: Add qcom_scm_gpu_init_regs_is_available() Puranam V G Tejaswi
                   ` (5 more replies)
  0 siblings, 6 replies; 13+ messages in thread
From: Puranam V G Tejaswi @ 2026-11-18 13:08 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Abel Vesa, Rob Clark, Sean Paul,
	Akhil P Oommen, Dmitry Baryshkov, Abhinav Kumar, Jessica Zhang,
	Marijn Suijten, David Airlie, Simona Vetter, Maarten Lankhorst,
	Maxime Ripard, Thomas Zimmermann, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley
  Cc: linux-arm-msm, dri-devel, freedreno, devicetree, linux-kernel,
	Puranam V G Tejaswi

Some Qualcomm platforms run secure-world firmware that does not
implement all GPU-related SCM calls. Two missing calls can leave the GPU
unusable, in different ways.

On A750, A753 and A8xx GPUs, a6xx_gmu_secure_init() asks the secure world
to program GPU initialization registers. If qcom_scm_gpu_init_regs() is
not implemented, the call fails and GMU resume aborts, so the GPU never
comes up. Separately, adreno_hw_init() relies on
qcom_scm_set_gpu_smmu_aperture() to configure the CX SMMU aperture. When
that call is unavailable, the aperture is left unconfigured and the GPU
command processor cannot switch pagetables.

The first two patches add an availability query for the GPU init-regs
call and skip it, with a one-time message, when the secure world does
not provide it. GMU resume can then continue. The kernel cannot program
the protected fuse register itself, but it still reads the register
back, so fuse-dependent features such as ray tracing are reported
correctly if an earlier boot stage programmed it, and stay disabled
otherwise.

The remaining patches provide a software fallback for the SMMU aperture.
They describe an optional aperture region in DT and add per-GPU register
lists for programming it when the SCM call is unavailable. The fallback
points the GC aperture at context bank 0, points the LPAC aperture at
context bank 1 on A753, and disables the other apertures. When the secure
world supports the SCM call, the existing SCM path is still used, and
platforms whose DT does not describe the aperture region are unaffected.
DT entries are added for Nord and Shikra.

Patch 1 is for Bjorn. Patches 2-4 are for Rob Clark; patch 2 uses the
new SCM helper from patch 1. Patches 5 and 6 are for Bjorn.

This series is based on next-20261116 and the Nord GPU v2 series [1].
Patch 4 needs the A753 catalog entry from that series, and patch 5 needs
its Nord GPU node.

[1] https://lore.kernel.org/r/20261118-nord-gpu1-v2-0-8d6d9908b7c5@oss.qualcomm.com

Signed-off-by: Puranam V G Tejaswi <puranam.tejaswi@oss.qualcomm.com>
---
Puranam V G Tejaswi (6):
      firmware: qcom: scm: Add qcom_scm_gpu_init_regs_is_available()
      drm/msm/a6xx: Don't fail GMU resume if the GPU init regs SCM call is absent
      dt-bindings: display/msm: gpu: Document the CX SMMU aperture region
      drm/msm/adreno: Program the SMMU aperture when the secure world can't
      arm64: dts: qcom: nord: Describe the GPU CX SMMU aperture
      arm64: dts: qcom: shikra: Describe the GPU CX SMMU aperture

 .../devicetree/bindings/display/msm/gpu.yaml       |  3 +-
 arch/arm64/boot/dts/qcom/nord.dtsi                 |  6 ++--
 arch/arm64/boot/dts/qcom/shikra.dtsi               |  6 ++--
 drivers/firmware/qcom/qcom_scm.c                   |  7 ++++
 drivers/gpu/drm/msm/adreno/a6xx_catalog.c          |  9 ++++++
 drivers/gpu/drm/msm/adreno/a6xx_gmu.c              | 27 ++++++++++------
 drivers/gpu/drm/msm/adreno/a7xx_catalog.c          | 10 ++++++
 drivers/gpu/drm/msm/adreno/adreno_gpu.c            | 37 ++++++++++++++++++++++
 drivers/gpu/drm/msm/adreno/adreno_gpu.h            | 21 ++++++++++++
 include/linux/firmware/qcom/qcom_scm.h             |  1 +
 10 files changed, 113 insertions(+), 14 deletions(-)
---
base-commit: 749a4de370409464cf8501ec5b2451df45c84eb4
change-id: 20261118-adreno-scm-fallback-8cb94180f48a
prerequisite-message-id: <20261118-nord-gpu1-v2-0-8d6d9908b7c5@oss.qualcomm.com>
prerequisite-patch-id: c05f94606aaf87c23ee9f615c2c003fc6a76ee58
prerequisite-patch-id: af5ae392810d6e5e6faea17f4de1f2d067894d37
prerequisite-patch-id: 9b506be1f9a910d8da57d14d42d45ab2a2a52fde
prerequisite-patch-id: 5c8cbb1bd55d50d3f816c0ddf9c2edf7c7ec4195
prerequisite-patch-id: 01f6f94a2887d2217b5e27b84638f8ee375070ee

Best regards,
--  
Puranam V G Tejaswi <puranam.tejaswi@oss.qualcomm.com>


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2026-11-18 18:50 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-18 13:08 [PATCH 0/6] drm/msm/adreno: Handle unavailable GPU SCM calls Puranam V G Tejaswi
2026-11-18 13:08 ` [PATCH 1/6] firmware: qcom: scm: Add qcom_scm_gpu_init_regs_is_available() Puranam V G Tejaswi
2026-11-18 18:42   ` Akhil P Oommen
2026-11-18 13:08 ` [PATCH 2/6] drm/msm/a6xx: Don't fail GMU resume if the GPU init regs SCM call is absent Puranam V G Tejaswi
2026-11-18 18:44   ` Akhil P Oommen
2026-11-18 13:08 ` [PATCH 3/6] dt-bindings: display/msm: gpu: Document the CX SMMU aperture region Puranam V G Tejaswi
2026-11-18 18:45   ` Akhil P Oommen
2026-11-18 13:08 ` [PATCH 4/6] drm/msm/adreno: Program the SMMU aperture when the secure world can't Puranam V G Tejaswi
2026-11-18 18:48   ` Akhil P Oommen
2026-11-18 13:08 ` [PATCH 5/6] arm64: dts: qcom: nord: Describe the GPU CX SMMU aperture Puranam V G Tejaswi
2026-11-18 18:48   ` Akhil P Oommen
2026-11-18 13:08 ` [PATCH 6/6] arm64: dts: qcom: shikra: " Puranam V G Tejaswi
2026-11-18 18:50   ` Akhil P Oommen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®