diff options
| author | Archit Taneja <architt@codeaurora.org> | 2017-10-06 06:57:06 -0400 |
|---|---|---|
| committer | Rob Clark <robdclark@gmail.com> | 2017-10-12 12:59:46 -0400 |
| commit | a18a0ea0096833ecb52053b183fcf9709f7bafd8 (patch) | |
| tree | 5804f0ebbd69fb338679ca2c78cc18fc23d5e88a | |
| parent | c9811d0fa55929b182f62e0ee49b71b0bea6a936 (diff) | |
drm/msm/dsi: Use correct pm_runtime_put variant during host_init
The DSI runtime PM suspend/resume callbacks check whether
msm_host->cfg_hnd is non-NULL before trying to enable the bus clocks.
This is done to accommodate early calls to these functions that may
happen before the bus clocks are even initialized.
Calling pm_runtime_put_autosuspend() in dsi_host_init() can result in
racy behaviour since msm_host->cfg_hnd is set very soon after. If the
suspend callback happens too late, we end up trying to disable clocks
that were never enabled, resulting in a bunch of WARN_ON splats.
Use pm_runtime_put_sync() so that the suspend callback is called
immediately.
Reported-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>
Signed-off-by: Archit Taneja <architt@codeaurora.org>
Signed-off-by: Rob Clark <robdclark@gmail.com>
| -rw-r--r-- | drivers/gpu/drm/msm/dsi/dsi_host.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/msm/dsi/dsi_host.c b/drivers/gpu/drm/msm/dsi/dsi_host.c index dbb31a014419..deaf869374ea 100644 --- a/drivers/gpu/drm/msm/dsi/dsi_host.c +++ b/drivers/gpu/drm/msm/dsi/dsi_host.c | |||
| @@ -248,7 +248,7 @@ disable_clks: | |||
| 248 | clk_disable_unprepare(ahb_clk); | 248 | clk_disable_unprepare(ahb_clk); |
| 249 | disable_gdsc: | 249 | disable_gdsc: |
| 250 | regulator_disable(gdsc_reg); | 250 | regulator_disable(gdsc_reg); |
| 251 | pm_runtime_put_autosuspend(dev); | 251 | pm_runtime_put_sync(dev); |
| 252 | put_clk: | 252 | put_clk: |
| 253 | clk_put(ahb_clk); | 253 | clk_put(ahb_clk); |
| 254 | put_gdsc: | 254 | put_gdsc: |
