Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

clk: qcom: gdsc: Enable supply reglator in GPU GX handler

The GX GDSC is modelled to aid the GMU in powering down the GPU in the
event that the GPU crashes, so that it can be restarted again. But in
the event that the power-domain is supplied through a dedicated
regulator (in contrast to being a subdomin of another power-domain),
something needs to turn that regulator on, both to make sure things are
powered and to match the operation in gdsc_disable().

Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Signed-off-by: Bjorn Andersson <quic_bjorande@quicinc.com>
Link: https://lore.kernel.org/r/20240125-sa8295p-gpu-v4-2-7011c2a63037@quicinc.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>

authored by

Bjorn Andersson and committed by
Bjorn Andersson
9187ebb9 e60b95d2

+10 -2
+10 -2
drivers/clk/qcom/gdsc.c
··· 557 557 */ 558 558 int gdsc_gx_do_nothing_enable(struct generic_pm_domain *domain) 559 559 { 560 - /* Do nothing but give genpd the impression that we were successful */ 561 - return 0; 560 + struct gdsc *sc = domain_to_gdsc(domain); 561 + int ret = 0; 562 + 563 + /* Enable the parent supply, when controlled through the regulator framework. */ 564 + if (sc->rsupply) 565 + ret = regulator_enable(sc->rsupply); 566 + 567 + /* Do nothing with the GDSC itself */ 568 + 569 + return ret; 562 570 } 563 571 EXPORT_SYMBOL_GPL(gdsc_gx_do_nothing_enable);