diff options
author | Imre Deak | 2016-04-18 13:48:21 +0200 |
---|---|---|
committer | Imre Deak | 2016-04-19 11:33:48 +0200 |
commit | f74ed08d55a059a20dc1e513edc51c18dfaf2add (patch) | |
tree | 3dc05c647eae7669f66089bb37d996e0a07ae22e /drivers/gpu/drm/i915/i915_drv.c | |
parent | drm/i915/ddi: Fix eDP VDD handling during booting and suspend/resume (diff) | |
download | kernel-qcow2-linux-f74ed08d55a059a20dc1e513edc51c18dfaf2add.tar.gz kernel-qcow2-linux-f74ed08d55a059a20dc1e513edc51c18dfaf2add.tar.xz kernel-qcow2-linux-f74ed08d55a059a20dc1e513edc51c18dfaf2add.zip |
drm/i915/gen9: Fix runtime PM refcounting in case DMC firmware isn't loaded
While we disable runtime PM and with that display power well support if
the DMC firmware isn't loaded, we still want to disable power wells
during system suspend and driver unload. So drop/reacquire the
corresponding power refcount during suspend/resume and driver unloading.
This also means we have to check if DMC is not loaded and skip enabling
DC states in the power well code.
v2:
- Reuse intel_csr_ucode_suspend() in intel_csr_ucode_fini() instead of
opencoding the former. (Chris)
- Add docbook comment to the public resume and suspend functions.
CC: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: http://patchwork.freedesktop.org/patch/msgid/1460980101-14713-1-git-send-email-imre.deak@intel.com
Diffstat (limited to 'drivers/gpu/drm/i915/i915_drv.c')
-rw-r--r-- | drivers/gpu/drm/i915/i915_drv.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c index 735df5595b34..1b449f96d2c1 100644 --- a/drivers/gpu/drm/i915/i915_drv.c +++ b/drivers/gpu/drm/i915/i915_drv.c @@ -640,8 +640,7 @@ static int i915_drm_suspend(struct drm_device *dev) intel_display_set_init_power(dev_priv, false); - if (HAS_CSR(dev_priv)) - flush_work(&dev_priv->csr.work); + intel_csr_ucode_suspend(dev_priv); out: enable_rpm_wakeref_asserts(dev_priv); @@ -733,6 +732,8 @@ static int i915_drm_resume(struct drm_device *dev) disable_rpm_wakeref_asserts(dev_priv); + intel_csr_ucode_resume(dev_priv); + mutex_lock(&dev->struct_mutex); i915_gem_restore_gtt_mappings(dev); mutex_unlock(&dev->struct_mutex); |