Message ID | 20240226072904.26861-1-marex@denx.de (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [v2] drm/lcdif: Do not disable clocks on already suspended hardware | expand |
On Monday, February 26, 2024 3:28 PM, Marek Vasut <marex@denx.de> wrote:
> 0, and would trigger a warning from clocks core about this condition.
s/clocks/clock/
Liu Ying
diff --git a/drivers/gpu/drm/mxsfb/lcdif_drv.c b/drivers/gpu/drm/mxsfb/lcdif_drv.c index 18de2f17e2491..6494e82707569 100644 --- a/drivers/gpu/drm/mxsfb/lcdif_drv.c +++ b/drivers/gpu/drm/mxsfb/lcdif_drv.c @@ -340,6 +340,9 @@ static int __maybe_unused lcdif_suspend(struct device *dev) if (ret) return ret; + if (pm_runtime_suspended(dev)) + return 0; + return lcdif_rpm_suspend(dev); } @@ -347,7 +350,8 @@ static int __maybe_unused lcdif_resume(struct device *dev) { struct drm_device *drm = dev_get_drvdata(dev); - lcdif_rpm_resume(dev); + if (!pm_runtime_suspended(dev)) + lcdif_rpm_resume(dev); return drm_mode_config_helper_resume(drm); }