rk3399: Power Domain infinite loop 'pd_gpu'
Chris Ruehl
chris.ruehl at gtsys.com.hk
Mon Nov 23 23:34:26 EST 2020
Hi All.
Just have a board boot from sd-card and hang after time out on
the ack for the power domain of the gpu subsystem
I looked into the pm_domain.c of the rk3399 where the error message
is reported and realized that the return code isn't handled at all
(vanilla v5.4.77).
this is just a preliminary reach out to you before I go and file
a bug and send official patch to the kernel guys.
The boot log and patch below.
[--shnip--]
[ 1.840491] 005: dwhdmi-rockchip ff940000.hdmi: Detected HDMI TX controller
v2.11a with HDCP (DWC HDMI 2.0 TX PHY)
[ 1.841127] 005: rockchip-drm display-subsystem: bound ff940000.hdmi (ops
dw_hdmi_rockchip_ops)
[ 1.841133] 005: [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[ 1.841135] 005: [drm] No driver support for vblank timestamp query.
[ 1.841160] 005: [drm] Cannot find any crtc or sizes
[ 1.841455] 005: [drm] Initialized rockchip 1.0.0 20140818 for
display-subsystem on minor 0
[ 1.851607] 005: rockchip-pm-domain
ff310000.power-management:power-controller: failed to get ack on domain
'pd_gpu', val=0x800789
[--shnap--]
Patch to escalate the error upstream.
not call rockchip_pmu_restore_qos() if the ACK timed out.
--- drivers/soc/rockchip/pm_domains.c.orig 2020-11-24 11:48:42.216855194 +0800
+++ drivers/soc/rockchip/pm_domains.c 2020-11-24 12:05:27.242044445 +0800
@@ -291,7 +291,7 @@
static int rockchip_pd_power(struct rockchip_pm_domain *pd, bool power_on)
{
struct rockchip_pmu *pmu = pd->pmu;
- int ret;
+ int ret = 0;
mutex_lock(&pmu->mutex);
@@ -307,23 +307,24 @@
rockchip_pmu_save_qos(pd);
/* if powering down, idle request to NIU first */
- rockchip_pmu_set_idle_request(pd, true);
+ ret = rockchip_pmu_set_idle_request(pd, true);
}
rockchip_do_pmu_set_power_domain(pd, power_on);
if (power_on) {
/* if powering up, leave idle mode */
- rockchip_pmu_set_idle_request(pd, false);
+ ret = rockchip_pmu_set_idle_request(pd, false);
- rockchip_pmu_restore_qos(pd);
+ if (ret==0)
+ rockchip_pmu_restore_qos(pd);
}
clk_bulk_disable(pd->num_clks, pd->clks);
}
mutex_unlock(&pmu->mutex);
- return 0;
+ return ret;
}
static int rockchip_pd_power_on(struct generic_pm_domain *domain)
--
GTSYS Limited RFID Technology
9/F, Unit E, R07, Kwai Shing Industrial Building Phase 2,
42-46 Tai Lin Pai Road, Kwai Chung, N.T., Hong Kong
Tel (852) 9079 9521
Disclaimer: https://www.gtsys.com.hk/email/classified.html
More information about the linux-arm-kernel
mailing list