Commit a156e64d authored by Chris Wilson's avatar Chris Wilson

drm/i915: Show PCI power state under debugfs/i915_runtime_pm_status

As the current PCI power state is an essential feature of runtime pm,
include it in the debugfs/i915_runtime_pm_status.

v2: Use pci_power_name()
Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Cc: Imre Deak <imre.deak@intel.com>
Reviewed-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1459689261-7920-2-git-send-email-chris@chris-wilson.co.uk
parent 188c1ab7
...@@ -2694,10 +2694,8 @@ static int i915_runtime_pm_status(struct seq_file *m, void *unused) ...@@ -2694,10 +2694,8 @@ static int i915_runtime_pm_status(struct seq_file *m, void *unused)
struct drm_device *dev = node->minor->dev; struct drm_device *dev = node->minor->dev;
struct drm_i915_private *dev_priv = dev->dev_private; struct drm_i915_private *dev_priv = dev->dev_private;
if (!HAS_RUNTIME_PM(dev)) { if (!HAS_RUNTIME_PM(dev_priv))
seq_puts(m, "not supported\n"); seq_puts(m, "Runtime power management not supported\n");
return 0;
}
seq_printf(m, "GPU idle: %s\n", yesno(!dev_priv->mm.busy)); seq_printf(m, "GPU idle: %s\n", yesno(!dev_priv->mm.busy));
seq_printf(m, "IRQs disabled: %s\n", seq_printf(m, "IRQs disabled: %s\n",
...@@ -2708,6 +2706,9 @@ static int i915_runtime_pm_status(struct seq_file *m, void *unused) ...@@ -2708,6 +2706,9 @@ static int i915_runtime_pm_status(struct seq_file *m, void *unused)
#else #else
seq_printf(m, "Device Power Management (CONFIG_PM) disabled\n"); seq_printf(m, "Device Power Management (CONFIG_PM) disabled\n");
#endif #endif
seq_printf(m, "PCI device power state: %s [%d]\n",
pci_power_name(dev_priv->dev->pdev->current_state),
dev_priv->dev->pdev->current_state);
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment