Skip to content

Commit

Permalink
drm/i915: do adapter power state notification at runtime PM
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Paulo Zanoni authored and Daniel Vetter committed Dec 10, 2013
1 parent 8a18745 commit cd2e9e9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/gpu/drm/i915/i915_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -915,6 +915,7 @@ static int i915_runtime_suspend(struct device *device)
DRM_DEBUG_KMS("Suspending device\n");

dev_priv->pm.suspended = true;
intel_opregion_notify_adapter(dev, PCI_D3cold);

return 0;
}
Expand All @@ -929,6 +930,7 @@ static int i915_runtime_resume(struct device *device)

DRM_DEBUG_KMS("Resuming device\n");

intel_opregion_notify_adapter(dev, PCI_D0);
dev_priv->pm.suspended = false;

return 0;
Expand Down

0 comments on commit cd2e9e9

Please sign in to comment.