Skip to content

drm/msm: Enable CLX (Current Limit Extension) on A840 and Adreno X2-85 (Glymur) - #1525

Open
hdhoke_QCOM (hdhoke) wants to merge 5 commits into
qualcomm-linux:qcom-7.3from
hdhoke:clx-on-7.3-v2
Open

hdhoke_QCOM (hdhoke) wants to merge 5 commits into
qualcomm-linux:qcom-7.3from
hdhoke:clx-on-7.3-v2

Conversation

@hdhoke

@hdhoke hdhoke_QCOM (hdhoke) commented Nov 24, 2026 •

Copy link
Copy Markdown

This enables the Current Limit Extension (CLX) feature on Adreno A840 and
Adreno X2-85 (Glymur), and fixes two issues that CLX depends on.

Changes

  • drm/msm/a6xx: Add HFI support for CLX feature. Passes the recommended CLX
    and IFF/PCLX limit tables to the GMU over HFI. Per-GPU configuration is
    read from the catalog.
  • drm/msm/a6xx: Enable CLX feature on A840. Adds the A840 CLX domain table
    and IFF/PCLX limits table to the catalog.
  • drm/msm/a8xx: Enable CLX feature on Adreno X2-85. Adds the CLX domain
    table and IFF/PCLX limits tables for X2-85 in the Glymur chipset.
  • drm/msm/a6xx: Request CLX enable from secure world. Sets
    QCOM_SCM_GPU_CLX_EN_REQ in the GPU init SCM request on GPUs with a CLX
    table. The CLX tables sent over HFI are not effective without it.
  • pmdomain: qcom: rpmhpd: don't clamp gfx and gmxc before sync_state.
    Until sync_state, rpmhpd clamps every vote to the highest corner. The GPU
    clock controller's probe pins the GFX and GMXC rails at the top corner
    this way. On Glymur the GMU then fails its CLX DCVS calibration and the
    first GPU init fails. This change leaves gfx and gmxc out of the clamp.

Validation: Changes were validated on Glymur CRD and no regression was observed.

Backport:
qualcomm-linux/kernel-topics#2311
qualcomm-linux/kernel-topics#2315

CRs-fixed: 4728628

akhilpo-qcom and others added 5 commits November 24, 2026 16:33
Add support for Current Limit Extension (CLX) feature found on a few A8x
GPUs. This feature is required to limit the peak current consumption to
avoid HW spec violation on GX/MX rails.

Add the necessary HFI interface support to pass the recommended CLX and
IFF/PCLX limits tables to the GMU. Per-GPU configuration is consumed
from the catalog entries.

Link: https://lore.kernel.org/lkml/20260516-a8xx-clx-support-v1-1-62508bf651ac@oss.qualcomm.com/
Signed-off-by: Akhil P Oommen <akhilpo@oss.qualcomm.com>
Signed-off-by: Harsh Dhoke <hdhoke@qti.qualcomm.com>
Add the A840 CLX domain table and the IFF/PCLX limits table to the
catalog. With the HFI plumbing in place, this enables the Current Limit
Extension (CLX) feature on Adreno 840.

Link: https://lore.kernel.org/lkml/20260516-a8xx-clx-support-v1-2-62508bf651ac@oss.qualcomm.com/
Signed-off-by: Akhil P Oommen <akhilpo@oss.qualcomm.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Signed-off-by: Harsh Dhoke <hdhoke@qti.qualcomm.com>
Add the CLX domain table and the IFF/PCLX limits tables to the catalog to
enable CLX feature support on Adreno X2-85 GPU present in the Glymur
chipset.

Link: https://lore.kernel.org/lkml/20260516-a8xx-clx-support-v1-3-62508bf651ac@oss.qualcomm.com/
Signed-off-by: Akhil P Oommen <akhilpo@oss.qualcomm.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Signed-off-by: Harsh Dhoke <hdhoke@qti.qualcomm.com>
The CLX (Current Limit Extension) feature also requires the secure
world to enable it via the GPU init regs SCM call. Without the
QCOM_SCM_GPU_CLX_EN_REQ flag, the CLX tables sent to the GMU over HFI
are not effective.

Set QCOM_SCM_GPU_CLX_EN_REQ in the SCM request on GPUs that have a CLX
table in their catalog entry.

Link: https://lore.kernel.org/lkml/20261024-assorted-fixes-oct-v1-7-2977f974ddb7@oss.qualcomm.com/
Signed-off-by: Akhil P Oommen <akhilpo@oss.qualcomm.com>
Signed-off-by: Harsh Dhoke <hdhoke@qti.qualcomm.com>
…c_state

Until rpmhpd's sync_state every vote is clamped to the highest corner,
so that hardware the bootloader left running keeps the rail level it
needs until its driver takes over.  Nothing the bootloader leaves behind
runs on the GPU rails, but the clamp hits them anyway: the GPU clock
controller's probe runtime-resumes and suspends its GFX and GMXC
domains, and from then on both rails are pinned at their highest corner
until sync_state.

On Glymur gfx.lvl has 14 levels and the clamp holds the rail at the top
one, 0x1d0, while the GMU's own performance table ends at level 11,
0x1c4.  With the GPU driver and firmware built in, the GMU boots long
before sync_state, and its CLX DCVS calibration does not survive a gfx
rail held that high: the firmware gives up with HFI_F2H_MSG_ERROR
0x007306c7 (ResMgrCalibrateDcvsLvl), the first HFI_H2F_MSG_GX_BW_PERF_VOTE
times out and the first GPU init fails.  On the Lenovo Yoga Slim 7x
Gen 11 this means the compositor cannot start at first login.  Pinning
gfx at level 11 or 12 instead fails the same way, level 10 and below
boot fine, and pinning gmxc alone has no effect.

Leave gfx and gmxc out of the clamp: they have no bootloader-configured
consumer to protect, and the GMU votes them through its own RSC.

Link: https://lore.kernel.org/lkml/20261021080517.2161-1-okerixx@gmail.com/
Acked-by: Akhil P Oommen <akhilpo@oss.qualcomm.com>
Signed-off-by: Oleg Keri <okerixx@gmail.com>
Signed-off-by: Harsh Dhoke <hdhoke@qti.qualcomm.com>
@qcomlnxci

Copy link
Copy Markdown

Test results

Workflow run: 45399016746 attempt 1

Known failures configured: 0

Target Pass Non-pass Total
kbdev-glymur-crd-multimedia 31 5 36

Test Matrix

Test Case kbdev-glymur-crd-multimedia
LAVA result ✅ Results
Audio_Card_Registration ✅ Pass
BT_FW_KMD_Service ✅ Pass
BT_ON_OFF ✅ Pass
BT_SCAN ✅ Pass
CPUFreq_Validation ✅ Pass
CPU_affinity ✅ Pass
DSP_AudioPD ✅ Pass
Ethernet_Basic_Validation ⚠️ skip
Freq_Scaling ✅ Pass
GIC ✅ Pass
IPA ✅ Pass
Interrupts ✅ Pass
KVM_Driver ✅ Pass
KVM_EL2_DTB ✅ Pass
KVM_Infra ✅ Pass
OpenCV ✅ Pass
PCIe ✅ Pass
Probe_Failure_Check ❌ Fail
RMNET ✅ Pass
UFS_Validation ⚠️ skip
USBHost ✅ Pass
WiFi_Firmware_Driver ✅ Pass
WiFi_OnOff ✅ Pass
adsp_remoteproc ✅ Pass
cdsp_remoteproc ✅ Pass
gpdsp_remoteproc ⚠️ skip
hotplug ✅ Pass
irq ✅ Pass
kaslr ✅ Pass
pinctrl ✅ Pass
qcom_hwrng ✅ Pass
rngtest ✅ Pass
shmbridge ✅ Pass
smmu ❌ Fail
watchdog ✅ Pass
wpss_remoteproc ✅ Pass
Failure summary

Unexpected failures

  • kbdev-glymur-crd-multimedia: gpdsp_remoteproc => skip.
  • kbdev-glymur-crd-multimedia: Probe_Failure_Check => fail.
  • kbdev-glymur-crd-multimedia: smmu => fail.
  • kbdev-glymur-crd-multimedia: UFS_Validation => skip.
  • kbdev-glymur-crd-multimedia: Ethernet_Basic_Validation => skip.

Result: blocked because unexpected failures were found.

@qlijarvis

Copy link
Copy Markdown

LAVA Failed Case Triage Summary

PR: #1525

Job 290717 | SoC glymur-qli-crd

LAVA job: https://lava-oss.qualcomm.com/scheduler/job/290717

Failed test cases in LAVA job 290717 (SoC: glymur-qli-crd).

  Case 1: Probe_Failure_Check
  1. Failed case: Probe_Failure_Check
  2. Root cause: The test detected three pre-existing, non-blocking probe/firmware errors during boot: (1) cfg80211 regulatory.db firmware file missing from rootfs (error -2/ENOENT), and (2) wsa_macro audio codec register access errors (-5/EIO) at 0x5dc on two codec instances (6c90000 and 6cb0000). These are not introduced by the PR (which only modifies GPU CLX feature) and do not prevent functional operation—WiFi and Audio tests passed.
  3. Possible fix: These are pre-existing platform configuration issues, not regressions from PR drm/msm: Enable CLX (Current Limit Extension) on A840 and Adreno X2-85 (Glymur) #1525. For regulatory.db: add the wireless-regdb package to the rootfs or disable CONFIG_CFG80211_REQUIRE_SIGNED_REGDB if regulatory enforcement is not needed. For wsa_macro errors: verify codec power sequencing and clock configuration in the device tree for the WSA macro codec instances; the register 0x5dc access failure suggests the codec may not be fully powered/clocked during early probe.
  4. Detail analysis attachment: failed_case_job290717_1_detailed.md
  Case 2: ** smmu (test validation failure — not a kernel crash)
  1. Failed case: ** smmu (test validation failure — not a kernel crash)
  2. Root cause: ** The video codec device aa00000.video-codec is not attached to an IOMMU group on glymur-crd, causing the SMMU test to fail its critical master validation check, but the device is functional (probed successfully and firmware loaded).
  3. Possible fix: Add the missing iommus property to the video codec device tree node in arch/arm64/boot/dts/qcom/glymur.dtsi to attach it to an IOMMU group, or update the SMMU test script to exclude video codec from the critical master check on glymur-crd if IOMMU attachment is not required for this SoC.
  4. Detail analysis attachment: failed_case_job290717_2_detailed.md
  Case 3: 0_qcom-next-ci-premerge-tests
  1. Failed case: 0_qcom-next-ci-premerge-tests
  2. Root cause: LAVA test definition marked as failed due to two genuine test failures: (1) Probe_Failure_Check detected kernel probe errors (regulatory.db firmware load failure, ASoC component register access errors on wsa_macro codecs), and (2) smmu test detected video codec device (aa00000.video-codec) missing IOMMU group attachment. These are pre-existing platform issues unrelated to the PR changes (GPU CLX feature and rpmhpd gfx/gmxc clamp fix).
  3. Possible fix: The test failures are not PR-introduced regressions. (1) Probe_Failure_Check failures are benign: regulatory.db is optional and ASoC errors are non-fatal initialization warnings. (2) smmu failure indicates the video codec driver's device tree node is missing the iommus property for glymur-qli-crd. Add iommus = <&apps_smmu 0x2180 0x0>; to the aa00000.video-codec DT node in arch/arm64/boot/dts/qcom/glymur.dtsi to resolve the IOMMU attachment issue.
  4. Detail analysis attachment: failed_case_job290717_3_detailed.md

@qswat-orbit-external

Copy link
Copy Markdown

Merge Check Failed: No Component Found

Configuration Error: No component found for branch 'qcom-7.3'.

There is no component associated with the provided branch in Polaris. Please verify the branch configuration.

Branch: qcom-7.3

2 similar comments
@qswat-orbit-external

Copy link
Copy Markdown

Merge Check Failed: No Component Found

Configuration Error: No component found for branch 'qcom-7.3'.

There is no component associated with the provided branch in Polaris. Please verify the branch configuration.

Branch: qcom-7.3

@qswat-orbit-external

Copy link
Copy Markdown

Merge Check Failed: No Component Found

Configuration Error: No component found for branch 'qcom-7.3'.

There is no component associated with the provided branch in Polaris. Please verify the branch configuration.

Branch: qcom-7.3

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.

5 participants