From: Taniya Das <taniya.das@oss.qualcomm.com>
To: Bjorn Andersson <andersson@kernel.org>,
Michael Turquette <mturquette@baylibre.com>,
Stephen Boyd <sboyd@kernel.org>,
Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>,
Abel Vesa <abel.vesa@oss.qualcomm.com>,
Rob Clark <robin.clark@oss.qualcomm.com>,
Sean Paul <sean@poorly.run>,
Konrad Dybcio <konradybcio@kernel.org>,
Akhil P Oommen <akhilpo@oss.qualcomm.com>,
Dmitry Baryshkov <lumag@kernel.org>,
Abhinav Kumar <abhinav.kumar@linux.dev>,
Jessica Zhang <jesszhan0024@gmail.com>,
Marijn Suijten <marijn.suijten@somainline.org>,
David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>
Cc: Ajit Pandey <ajit.pandey@oss.qualcomm.com>,
Imran Shaik <imran.shaik@oss.qualcomm.com>,
Jagadeesh Kona <jagadeesh.kona@oss.qualcomm.com>,
linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org,
linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
freedreno@lists.freedesktop.org,
Taniya Das <taniya.das@oss.qualcomm.com>,
Pengyu Luo <mitltlatltl@gmail.com>,
Alexander Koskovich <akoskovich@pm.me>
Subject: [PATCH 0/6] qcom: Refactor GPU GX GDSC handling and IFPC behavior on A8x GPUs
Date: Tue, 07 Apr 2026 15:00:50 +0530 [thread overview]
Message-ID: <20260407-gfx-clk-fixes-v1-0-4bb5583a5054@oss.qualcomm.com> (raw)
This series fixes two closely related issues around GX GDSC ownership and
rail control on A8x GPUs, where recent hardware changes and runtime PM
interactions violate GMU and IFPC(Inter Frame Power Collapse) architectural
expectations.
Problem statement 1: Incorrect GX GDSC disable by OS
----------------------------------------------------
GX GDSC is a special GPU power domain that must be exclusively controlled
by GMU firmware during normal operation. The OS is expected to force‑
disable GX GDSC only during GPU/GMU recovery.
However, when GX GDSC is managed through the generic GenPD runtime PM
framework, it can be unintentionally disabled by the OS during system
resume (resume_noirq/complete phases) or runtime PM suspend paths. This
can race with GMU firmware usage and result in warnings such as:
gx_clkctl_gx_gdsc status stuck at 'on'
and failures in gdsc_toggle_logic(), leading to broken GPU suspend/resume
behaviour.
Solution:
Introduce a custom disable callback for GX GDSC that prevents the OS from
touching GX GDSC hardware during normal runtime PM and system PM flows.
The callback relies on GenPD’s synced_poweroff flag, which is asserted by
the GMU driver only during recovery, explicitly allowing GX GDSC to be
disabled by the OS in that case.
This ensures strict GX GDSC ownership by GMU while still supporting
recovery use cases.
Problem statement 2: Unintended GX/GMxC rail votes from APPS RSC
--------------------------------------------------------------
On A8x platforms, GX GDSC has been moved to a dedicated GXCLKCTL block
under the GX power domain. Due to the current runtime PM device links
between supplier and consumer, when GMU device is moved to RPM_ACTIVE
state, GXCLKCTL device will also be moved to RPM_ACTIVE and result in
GX/GMxC rail votes from the OS.
This behavior conflicts with IFPC and Adreno architecture requirements,
which mandate that GMU firmware must be the sole voter of these
collapsible rails on behalf of the GPU. Linux is expected to intervene
only during GPU/GMU recovery.
Solution:
The runtime PM of GXCLKCTL can be disabled post the GX CLKCTL is runtime
suspended in probe, so the runtime PM requests of GMU device are not propagated
to its supplier GXCLKCTL. To avoid incomplete runtime suspend during probe on
clock controllers using runtime PM, ensure pm_runtime_put_sync() is used so that
runtime PM suspend completes before returning from probe.
This along with GMU driver change to vote on GX GDSC only during GMU recovery will
prevent the votes on GX/GMXC rails from APPS RSC during normal GMU operation.
Patch overview:
--------------
1. clk: qcom: gdsc: Add custom disable callback for GX GDSC
- Prevents unintended GX GDSC disable outside recovery.
2. clk: qcom: gxclkctl: Use custom disable callback for gx_gdsc
- Applies the custom behavior to GXCLKCTL and fixes runtime PM warnings.
3. clk: qcom: common: ensure runtime PM suspend completes on probe
- Guarantees synchronous runtime suspend during probe.
4. clk: qcom: gxclkctl: Remove GX/GMxC rail votes to align with IFPC
- Eliminates unintended APPS RSC rail votes, restoring GMU ownership.
5. drm/msm/a8xx: Make a8xx_recover IFPC safe
- Makes the A8xx recovery path IFPC‑aware by checking GX power‑domain
state before accessing GX MMIO, matching a6xx behavior.
6. drm/msm/a6xx: Limit GXPD votes to recovery in A8x
- Removes GXPD voting from normal GMU runtime PM and restricts it to
recovery using the synced_poweroff mechanism.
Together, these changes restore strict GMU ownership of GX GDSC and GPU
rails, align Linux behavior with IFPC architecture, resolves reported
runtime warnings and failures, and enable correct power collapse of
GX/GMxC on A8x GPUs.
Signed-off-by: Taniya Das <taniya.das@oss.qualcomm.com>
---
Akhil P Oommen (2):
drm/msm/a8xx: Make a8xx_recover IFPC safe
drm/msm/a6xx: Limit GXPD votes to recovery in A8x
Jagadeesh Kona (1):
clk: qcom: gdsc: Add custom disable callback for GX GDSC
Taniya Das (3):
clk: qcom: gxclkctl: Use custom disable callback for gx_gdsc
clk: qcom: common: ensure runtime PM suspend completes on probe
clk: qcom: gxclkctl: Remove GX/GMxC rail votes to align with IFPC
drivers/clk/qcom/common.c | 2 +-
drivers/clk/qcom/gdsc.c | 22 ++++++++++++
drivers/clk/qcom/gdsc.h | 1 +
drivers/clk/qcom/gxclkctl-kaanapali.c | 12 ++++++-
drivers/gpu/drm/msm/adreno/a6xx_gmu.c | 64 +++++++++++++++++++++++++++++------
drivers/gpu/drm/msm/adreno/a8xx_gpu.c | 15 +++++---
6 files changed, 99 insertions(+), 17 deletions(-)
---
base-commit: 2febe6e6ee6e34c7754eff3c4d81aa7b0dcb7979
change-id: 20260406-gfx-clk-fixes-24a492bb7676
Best regards,
--
Taniya Das <taniya.das@oss.qualcomm.com>
next reply other threads:[~2026-04-07 9:31 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-07 9:30 Taniya Das [this message]
2026-04-07 9:30 ` [PATCH 1/6] clk: qcom: gdsc: Add custom disable callback for GX GDSC Taniya Das
2026-04-07 10:56 ` Konrad Dybcio
2026-04-08 7:26 ` Taniya Das
2026-04-12 3:46 ` Claude review: " Claude Code Review Bot
2026-04-07 9:30 ` [PATCH 2/6] clk: qcom: gxclkctl: Use custom disable callback for gx_gdsc Taniya Das
2026-04-07 10:56 ` Konrad Dybcio
2026-04-12 3:46 ` Claude review: " Claude Code Review Bot
2026-04-07 9:30 ` [PATCH 3/6] clk: qcom: common: ensure runtime PM suspend completes on probe Taniya Das
2026-04-07 10:58 ` Konrad Dybcio
2026-04-08 7:26 ` Taniya Das
2026-04-12 3:46 ` Claude review: " Claude Code Review Bot
2026-04-07 9:30 ` [PATCH 4/6] clk: qcom: gxclkctl: Remove GX/GMxC rail votes to align with IFPC Taniya Das
2026-04-07 11:29 ` Konrad Dybcio
2026-04-08 7:25 ` Taniya Das
2026-04-12 3:46 ` Claude review: " Claude Code Review Bot
2026-04-07 9:30 ` [PATCH 5/6] drm/msm/a8xx: Make a8xx_recover IFPC safe Taniya Das
2026-04-07 11:00 ` Konrad Dybcio
2026-04-12 3:46 ` Claude review: " Claude Code Review Bot
2026-04-07 9:30 ` [PATCH 6/6] drm/msm/a6xx: Limit GXPD votes to recovery in A8x Taniya Das
2026-04-07 11:01 ` Konrad Dybcio
2026-04-07 19:16 ` Akhil P Oommen
2026-04-12 3:46 ` Claude review: " Claude Code Review Bot
2026-04-12 3:46 ` Claude review: qcom: Refactor GPU GX GDSC handling and IFPC behavior on A8x GPUs Claude Code Review Bot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260407-gfx-clk-fixes-v1-0-4bb5583a5054@oss.qualcomm.com \
--to=taniya.das@oss.qualcomm.com \
--cc=abel.vesa@oss.qualcomm.com \
--cc=abhinav.kumar@linux.dev \
--cc=airlied@gmail.com \
--cc=ajit.pandey@oss.qualcomm.com \
--cc=akhilpo@oss.qualcomm.com \
--cc=akoskovich@pm.me \
--cc=andersson@kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=freedreno@lists.freedesktop.org \
--cc=imran.shaik@oss.qualcomm.com \
--cc=jagadeesh.kona@oss.qualcomm.com \
--cc=jesszhan0024@gmail.com \
--cc=konrad.dybcio@oss.qualcomm.com \
--cc=konradybcio@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lumag@kernel.org \
--cc=marijn.suijten@somainline.org \
--cc=mitltlatltl@gmail.com \
--cc=mturquette@baylibre.com \
--cc=robin.clark@oss.qualcomm.com \
--cc=sboyd@kernel.org \
--cc=sean@poorly.run \
--cc=simona@ffwll.ch \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox