Commit e5aac87e authored by Chris Wilson's avatar Chris Wilson

drm/i915: Include power-management state in gpu error dump

Useful for double checking that the device is powered up when it hung,
include both the status of the power management and our rpm wakelock.
Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170302151544.16915-1-chris@chris-wilson.co.ukReviewed-by: default avatarMika Kuoppala <mika.kuoppala@linux.intel.com>
parent f73b5674
...@@ -935,6 +935,8 @@ struct i915_gpu_state { ...@@ -935,6 +935,8 @@ struct i915_gpu_state {
char error_msg[128]; char error_msg[128];
bool simulated; bool simulated;
bool awake; bool awake;
bool wakelock;
bool suspended;
int iommu; int iommu;
u32 reset_count; u32 reset_count;
u32 suspend_count; u32 suspend_count;
......
...@@ -633,6 +633,8 @@ int i915_error_state_to_str(struct drm_i915_error_state_buf *m, ...@@ -633,6 +633,8 @@ int i915_error_state_to_str(struct drm_i915_error_state_buf *m,
} }
err_printf(m, "GT awake: %s\n", yesno(error->awake)); err_printf(m, "GT awake: %s\n", yesno(error->awake));
err_printf(m, "RPM wakelock: %s\n", yesno(error->wakelock));
err_printf(m, "PM suspended: %s\n", yesno(error->suspended));
err_printf(m, "EIR: 0x%08x\n", error->eir); err_printf(m, "EIR: 0x%08x\n", error->eir);
err_printf(m, "IER: 0x%08x\n", error->ier); err_printf(m, "IER: 0x%08x\n", error->ier);
for (i = 0; i < error->ngtier; i++) for (i = 0; i < error->ngtier; i++)
...@@ -1617,6 +1619,8 @@ static void i915_capture_gen_state(struct drm_i915_private *dev_priv, ...@@ -1617,6 +1619,8 @@ static void i915_capture_gen_state(struct drm_i915_private *dev_priv,
struct i915_gpu_state *error) struct i915_gpu_state *error)
{ {
error->awake = dev_priv->gt.awake; error->awake = dev_priv->gt.awake;
error->wakelock = atomic_read(&dev_priv->pm.wakeref_count);
error->suspended = dev_priv->pm.suspended;
error->iommu = -1; error->iommu = -1;
#ifdef CONFIG_INTEL_IOMMU #ifdef CONFIG_INTEL_IOMMU
......
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