diff options
author | Daniel Stone <daniels@collabora.com> | 2015-11-20 15:55:34 +0000 |
---|---|---|
committer | Imre Deak <imre.deak@intel.com> | 2015-11-23 17:09:34 +0200 |
commit | 11c86db8f052fec64804c19519a8d35958ed8aef (patch) | |
tree | 1753fb0cc2faf8c6f2768cc290a218314f244cd0 /drivers/gpu/drm/i915/intel_runtime_pm.c | |
parent | 9895ad03c871893f6acd66a3b6210db0c1ba5933 (diff) | |
download | lwn-11c86db8f052fec64804c19519a8d35958ed8aef.tar.gz lwn-11c86db8f052fec64804c19519a8d35958ed8aef.zip |
drm/i915/pm: Print offending domain in refcount failure
If we experience a refcounting failure in a power domain/well (unref'ing at
least one too many times), log the name of the offending domain or well.
Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Acked-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1448034934-11926-2-git-send-email-daniels@collabora.com
Diffstat (limited to 'drivers/gpu/drm/i915/intel_runtime_pm.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_runtime_pm.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/gpu/drm/i915/intel_runtime_pm.c b/drivers/gpu/drm/i915/intel_runtime_pm.c index ec38409242d5..3fa43af94946 100644 --- a/drivers/gpu/drm/i915/intel_runtime_pm.c +++ b/drivers/gpu/drm/i915/intel_runtime_pm.c @@ -1499,11 +1499,15 @@ void intel_display_power_put(struct drm_i915_private *dev_priv, mutex_lock(&power_domains->lock); - WARN_ON(!power_domains->domain_use_count[domain]); + WARN(!power_domains->domain_use_count[domain], + "Use count on domain %s is already zero\n", + intel_display_power_domain_str(domain)); power_domains->domain_use_count[domain]--; for_each_power_well_rev(i, power_well, BIT(domain), power_domains) { - WARN_ON(!power_well->count); + WARN(!power_well->count, + "Use count on power well %s is already zero", + power_well->name); if (!--power_well->count) intel_power_well_disable(dev_priv, power_well); |