aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaulo Zanoni <paulo.r.zanoni@intel.com>2013-12-06 17:34:21 -0500
committerDaniel Vetter <daniel.vetter@ffwll.ch>2013-12-10 16:44:00 -0500
commitcd2e9e908a86c44c83026acd95520a2761f0d64c (patch)
treeb6e523191c53ad2d119df91c4eb5f36dda7d83f0
parent8a1874559f222efcae0c0c41b180f6e1af6b9d2e (diff)
drm/i915: do adapter power state notification at runtime PM
Now that we are actually setting the device to the D3 state, we should issue the notification. The opregion spec says we should send the message before the adapter is about to be placed in a lower power state, and after the adapter is placed in a higher power state. Jani originally wrote a similar patch for PC8, but then we discovered that we were not really changing the PCI D states when enabling/disabling PC8, so we had to postpone his patch. v2: - Improve commit message, explaining the expected state. v3: - Rebase. Cc: Jani Nikula <jani.nikula@intel.com> Credits-to: Jani Nikula <jani.nikula@intel.com> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@gmail.com> (v2) Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
-rw-r--r--drivers/gpu/drm/i915/i915_drv.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
index 7d2136170293..2137a33d5bb2 100644
--- a/drivers/gpu/drm/i915/i915_drv.c
+++ b/drivers/gpu/drm/i915/i915_drv.c
@@ -915,6 +915,7 @@ static int i915_runtime_suspend(struct device *device)
915 DRM_DEBUG_KMS("Suspending device\n"); 915 DRM_DEBUG_KMS("Suspending device\n");
916 916
917 dev_priv->pm.suspended = true; 917 dev_priv->pm.suspended = true;
918 intel_opregion_notify_adapter(dev, PCI_D3cold);
918 919
919 return 0; 920 return 0;
920} 921}
@@ -929,6 +930,7 @@ static int i915_runtime_resume(struct device *device)
929 930
930 DRM_DEBUG_KMS("Resuming device\n"); 931 DRM_DEBUG_KMS("Resuming device\n");
931 932
933 intel_opregion_notify_adapter(dev, PCI_D0);
932 dev_priv->pm.suspended = false; 934 dev_priv->pm.suspended = false;
933 935
934 return 0; 936 return 0;