--- drivers/gpu/drm/i915/i915_drv.c | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c index dba03c026151..4f6de54c14fa 100644 --- a/drivers/gpu/drm/i915/i915_drv.c +++ b/drivers/gpu/drm/i915/i915_drv.c @@ -731,6 +731,10 @@ int i915_suspend_switcheroo(struct drm_device *dev, pm_message_t state) return i915_drm_suspend_late(dev, false); } +static void i915_drm_complete(struct drm_device *dev) +{ +} + static int i915_drm_resume(struct drm_device *dev) { struct drm_i915_private *dev_priv = dev->dev_private; @@ -905,7 +909,12 @@ int i915_resume_switcheroo(struct drm_device *dev) if (ret) return ret; - return i915_drm_resume(dev); + ret = i915_drm_resume(dev); + if (ret) + return ret; + + i915_drm_complete(dev); + return 0; } /** @@ -1115,6 +1124,16 @@ static int i915_pm_resume(struct device *dev) return i915_drm_resume(drm_dev); } +static void i915_pm_complete(struct device *dev) +{ + struct drm_device *drm_dev = dev_to_i915(dev)->dev; + + if (drm_dev->switch_power_state == DRM_SWITCH_POWER_OFF) + return; + + i915_drm_complete(drm_dev); +} + /* freeze: before creating the hibernation_image */ static int i915_pm_freeze(struct device *dev) { @@ -1696,6 +1715,7 @@ static const struct dev_pm_ops i915_pm_ops = { .suspend_late = i915_pm_suspend_late, .resume_early = i915_pm_resume_early, .resume = i915_pm_resume, + .complete = i915_pm_complete, /* * S4 event handlers -- 2.8.1 _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx