summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/i915_drv.c
diff options
context:
space:
mode:
authorImre Deak <imre.deak@intel.com>2014-04-14 20:24:29 +0300
committerDaniel Vetter <daniel.vetter@ffwll.ch>2014-05-05 09:08:57 +0200
commitc6df39b5ea6342323a42edfbeeca0a28c643d7ae (patch)
tree5b2c555b7209daaa8a4ecf387452c144b94f1824 /drivers/gpu/drm/i915/i915_drv.c
parentdc1d0136a48d7ad858b5158413def90b9d818503 (diff)
downloadop-kernel-dev-c6df39b5ea6342323a42edfbeeca0a28c643d7ae.zip
op-kernel-dev-c6df39b5ea6342323a42edfbeeca0a28c643d7ae.tar.gz
drm/i915: get a runtime PM ref for the deferred GT powersave enabling
At least on VLV but probably on other platforms too we depend on RC6 being enabled for RPM, so disable RPM until the delayed RC6 enabling completes. v2: - explain the reason for the _noresume version of RPM get (Daniel) - use the simpler 'if (schedule_work()) rpm_get();' instead of 'if (!cancel_work_sync()) rpm_get(); schedule_work();' Signed-off-by: Imre Deak <imre.deak@intel.com> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_drv.c')
-rw-r--r--drivers/gpu/drm/i915/i915_drv.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
index 5cbd79e..b8c9896 100644
--- a/drivers/gpu/drm/i915/i915_drv.c
+++ b/drivers/gpu/drm/i915/i915_drv.c
@@ -782,7 +782,7 @@ int i915_reset(struct drm_device *dev)
* previous concerns that it doesn't respond well to some forms
* of re-init after reset. */
if (INTEL_INFO(dev)->gen > 5)
- intel_enable_gt_powersave(dev);
+ intel_reset_gt_powersave(dev);
intel_hpd_init(dev);
} else {
@@ -951,6 +951,9 @@ static int intel_runtime_suspend(struct device *device)
struct drm_device *dev = pci_get_drvdata(pdev);
struct drm_i915_private *dev_priv = dev->dev_private;
+ if (WARN_ON_ONCE(!dev_priv->rps.enabled))
+ return -ENODEV;
+
WARN_ON(!HAS_RUNTIME_PM(dev));
assert_force_wake_inactive(dev_priv);
OpenPOWER on IntegriCloud