diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2017-03-23 10:19:44 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2017-03-23 10:22:05 +0000 |
commit | 233ebf5733d51cb7581b8d330799520d69484cc4 (patch) | |
tree | 5af901696b74a6b0c893d8ea8fd8d2f89b247848 /drivers/gpu/drm/i915/i915_debugfs.c | |
parent | 6e3955a5af1c3a0b7d9a50be327a71e9065c64ae (diff) | |
download | lwn-233ebf5733d51cb7581b8d330799520d69484cc4.tar.gz lwn-233ebf5733d51cb7581b8d330799520d69484cc4.zip |
drm/i915: Drop uncore spinlock for reading debugfs forcewake counters
The set of available structs is not protected by the spinlock, and for
the single read we can use READ_ONCE instead.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170323101944.21627-7-chris@chris-wilson.co.uk
Diffstat (limited to 'drivers/gpu/drm/i915/i915_debugfs.c')
-rw-r--r-- | drivers/gpu/drm/i915/i915_debugfs.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c index fcac795d4396..f30591f44d3a 100644 --- a/drivers/gpu/drm/i915/i915_debugfs.c +++ b/drivers/gpu/drm/i915/i915_debugfs.c @@ -1459,17 +1459,14 @@ static int ironlake_drpc_info(struct seq_file *m) static int i915_forcewake_domains(struct seq_file *m, void *data) { - struct drm_i915_private *dev_priv = node_to_i915(m->private); + struct drm_i915_private *i915 = node_to_i915(m->private); struct intel_uncore_forcewake_domain *fw_domain; unsigned int tmp; - spin_lock_irq(&dev_priv->uncore.lock); - for_each_fw_domain(fw_domain, dev_priv, tmp) { + for_each_fw_domain(fw_domain, i915, tmp) seq_printf(m, "%s.wake_count = %u\n", intel_uncore_forcewake_domain_to_str(fw_domain->id), - fw_domain->wake_count); - } - spin_unlock_irq(&dev_priv->uncore.lock); + READ_ONCE(fw_domain->wake_count)); return 0; } |