drm/msm/a6xx: Fall back to MX when GMxC has no levels
Subsystems (4)
PATCH v2 1/1 drm/msm/a6xx: Fall back to MX when GMxC has no levels
The command DB of Molokai (SM8845) lists the gmxc.lvl resource without any level. Since a6xx_gmu_rpmh_read_arc() trims the trailing zero levels, reading it now fails with -EINVAL, so the GX votes are never built and the GMU of the Adreno 829 hangs on the first GX vote:
Message HFI_H2F_MSG_GX_BW_PERF_VOTE id 8 timed out waiting for response Timeout waiting for GMU OOB set GPU_SET: 0x4
gpu hw init failed: -110
Before, the empty list made the GX votes use the lowest GMxC corner and the GPU worked. Read gmxc.lvl the same way when choosing the secondary rail, so that a GMxC without levels is treated like a missing one and the GX votes use MX.
---
Found while bringing up the Adreno 829 of the Motorola Signature (Qualcomm Molokai, SM8845) on next-20261113: the GMU firmware loads but never answers the first GX vote. Bisecting the arc vote rework points at commit b5269bf0e1ad: the Molokai command DB lists gmxc.lvl without any level, which the new helper rejects, so the GX votes are never built.
Tested on the Motorola Signature: the GMU answers, the GPU comes up and Phosh renders on it.
I used an LLM (Claude) to help write this patch and its commit message.
I reviewed it, bisected the regression on the device and tested the
result there.
---
Changes in v2:
- Drop the Assisted-by trailers and the LLM notes from the commit
messages, the LLM use is stated in this cover letter.
- Link to v1: https://patch.msgid.link/[email protected]
--- drivers/gpu/drm/msm/adreno/a6xx_gmu.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
drivers/gpu/drm/msm/adreno/a6xx_gmu.c +6 -2
@@ -1889,13 +1889,17 @@ static int a6xx_gmu_rpmh_votes_init(struct a6xx_gmu *gmu)struct msm_gpu *gpu = &adreno_gpu->base;const char *sec_id;const u16 *gmxc; +size_t gmxc_count;int ret; - gmxc =cmd_db_read_aux_data ("gmxc.lvl" ,NULL ); + gmxc =a6xx_gmu_rpmh_read_arc ("gmxc.lvl" , &gmxc_count);if (gmxc ==ERR_PTR (-EPROBE_DEFER ))return -EPROBE_DEFER ; -/* If GMxC is present, prefer that as secondary rail for GX votes */ +/* +* If GMxC is present, prefer that as secondary rail for GX votes. Some +* SoCs list it in the command DB without any level, use MX there. +*/ sec_id =IS_ERR_OR_NULL (gmxc) ?"mx.lvl" :"gmxc.lvl" ;/* Build the GX votes */
---
base-commit: d024361c631b3f020a26c07d683e5103404b0fbf
change-id: 20261116-msm-gmxc-fallback-b59be82e6c2d
Best regards,
Signature · 1 line
Venkat Yadlapati <[email protected]>