diff options
author | Imre Deak <imre.deak@intel.com> | 2013-11-25 17:15:35 +0200 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2013-11-26 20:08:29 +0100 |
commit | 1da51581b00b3fc3ac72156e2a69c6bab71f7794 (patch) | |
tree | 954f32c347417ae21ddb1fbd6783475be4f1a1ba /drivers/gpu/drm/i915/i915_drv.h | |
parent | 1c2256df26f697bcd20016c271ddc8fd44653919 (diff) | |
download | lwn-1da51581b00b3fc3ac72156e2a69c6bab71f7794.tar.gz lwn-1da51581b00b3fc3ac72156e2a69c6bab71f7794.zip |
drm/i915: add a debugfs entry for power domain info
Add a debugfs entry showing the use-count for all power domains of each
power well.
v3: address comments from Paulo:
- simplify power_domain_str() by using a switch table
- move power_well::domain_count to power_domains
- WARN_ON decrementing a 0 refcount
Signed-off-by: Imre Deak <imre.deak@intel.com>
Reviewed-by: Paulo Zanoni <paulo.zanoni@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_drv.h')
-rw-r--r-- | drivers/gpu/drm/i915/i915_drv.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h index 0f7bc14208a3..49dfac9028e3 100644 --- a/drivers/gpu/drm/i915/i915_drv.h +++ b/drivers/gpu/drm/i915/i915_drv.h @@ -971,6 +971,9 @@ struct i915_power_domains { int power_well_count; struct mutex lock; +#if IS_ENABLED(CONFIG_DEBUG_FS) + int domain_use_count[POWER_DOMAIN_NUM]; +#endif struct i915_power_well *power_wells; }; |