From 88a725f4b3187e6a601cc714941db82151c9dea7 Mon Sep 17 00:00:00 2001 From: Wyon Bi Date: Mon, 28 Feb 2022 09:17:21 +0800 Subject: [PATCH] drm/rockchip: dw-dp: Move resume handling to NOIRQ phase Fixes: b31df11baa3a ("drm/rockchip: dw-dp: force runtime PM suspend on system suspend") Signed-off-by: Wyon Bi Change-Id: Iaf5ceb65584cbe613c0e5c37c9586bfc235259e8 --- drivers/gpu/drm/rockchip/dw-dp.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/rockchip/dw-dp.c b/drivers/gpu/drm/rockchip/dw-dp.c index 8401a4225097..afe2780f767f 100644 --- a/drivers/gpu/drm/rockchip/dw-dp.c +++ b/drivers/gpu/drm/rockchip/dw-dp.c @@ -2628,6 +2628,8 @@ static int dw_dp_bind(struct device *dev, struct device *master, void *data) pm_runtime_enable(dp->dev); pm_runtime_get_sync(dp->dev); + enable_irq(dp->irq); + return 0; } @@ -2635,6 +2637,8 @@ static void dw_dp_unbind(struct device *dev, struct device *master, void *data) { struct dw_dp *dp = dev_get_drvdata(dev); + disable_irq(dp->irq); + pm_runtime_put(dp->dev); pm_runtime_disable(dp->dev); @@ -2835,8 +2839,6 @@ static int __maybe_unused dw_dp_runtime_suspend(struct device *dev) { struct dw_dp *dp = dev_get_drvdata(dev); - disable_irq(dp->irq); - clk_disable_unprepare(dp->aux_clk); clk_disable_unprepare(dp->apb_clk); clk_disable_unprepare(dp->hclk); @@ -2854,15 +2856,13 @@ static int __maybe_unused dw_dp_runtime_resume(struct device *dev) dw_dp_init(dp); - enable_irq(dp->irq); - return 0; } static const struct dev_pm_ops dw_dp_pm_ops = { SET_RUNTIME_PM_OPS(dw_dp_runtime_suspend, dw_dp_runtime_resume, NULL) - SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, - pm_runtime_force_resume) + SET_NOIRQ_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, + pm_runtime_force_resume) }; static const struct of_device_id dw_dp_of_match[] = {