Commit 11c86db8 authored by Daniel Stone's avatar Daniel Stone Committed by Imre Deak

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: default avatarDaniel Stone <daniels@collabora.com>
Reviewed-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Acked-by: default avatarJani Nikula <jani.nikula@intel.com>
Signed-off-by: default avatarImre Deak <imre.deak@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1448034934-11926-2-git-send-email-daniels@collabora.com
parent 9895ad03
...@@ -1499,11 +1499,15 @@ void intel_display_power_put(struct drm_i915_private *dev_priv, ...@@ -1499,11 +1499,15 @@ void intel_display_power_put(struct drm_i915_private *dev_priv,
mutex_lock(&power_domains->lock); 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]--; power_domains->domain_use_count[domain]--;
for_each_power_well_rev(i, power_well, BIT(domain), power_domains) { 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) if (!--power_well->count)
intel_power_well_disable(dev_priv, power_well); intel_power_well_disable(dev_priv, power_well);
......
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