Re: [PATCH 0/7] clk: qcom: gcc: Do not turn off PCIe GDSCs during gdsc_disable()

From: Krishna Chaitanya Chundru
Date: Fri Jan 02 2026 - 08:19:42 EST




On 1/2/2026 5:09 PM, Konrad Dybcio wrote:
On 1/2/26 12:36 PM, Krishna Chaitanya Chundru wrote:

On 1/2/2026 5:04 PM, Konrad Dybcio wrote:
On 1/2/26 10:43 AM, Krishna Chaitanya Chundru wrote:
With PWRSTS_OFF_ON, PCIe GDSCs are turned off during gdsc_disable(). This
can happen during scenarios such as system suspend and breaks the resume
of PCIe controllers from suspend.
Isn't turning the GDSCs off what we want though? At least during system
suspend?
If we are keeping link in D3cold it makes sense, but currently we are not keeping in D3cold
so we don't expect them to get off.
Since we seem to be tackling that in parallel, it seems to make sense
that adding a mechanism to let the PCIe driver select "on" vs "ret" vs
"off" could be useful for us
At least I am not aware of such API where we can tell genpd not to turn off gdsc
at runtime if we are keeping the device in D3cold state.
But anyway the PCIe gdsc supports Retention, in that case adding this flag here makes
more sense as it represents HW.
sm8450,sm8650 also had similar problem which are fixed by mani[1].
FWIW I recall I could turn off the GDSCs on at least makena with the old
suspend patches and the controllers would come back to life afterwards
In the suspend patches, we are keeping link in D3cold, so turning off gdsc will not have any effect.
But if some reason we skipped D3cold like in S2idle case then gdsc should not be off, in that case
in resume PCIe link will be broken.

Link [1]: clk: qcom: gcc-sm8650: Do not turn off PCIe GDSCs during gdsc_disable() - kernel/git/torvalds/linux.git - Linux kernel source tree <https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/drivers/clk/qcom/gcc-sm8650.c?id=a57465766a91c6e173876f9cbb424340e214313f>
- Krishna Chaitanya.
Konrad