Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 233ebf57 authored by Chris Wilson's avatar Chris Wilson
Browse files

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: default avatarChris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: default avatarJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170323101944.21627-7-chris@chris-wilson.co.uk
parent 6e3955a5
Loading
Loading
Loading
Loading
+3 −6
Original line number Original line Diff line number Diff line
@@ -1459,17 +1459,14 @@ static int ironlake_drpc_info(struct seq_file *m)


static int i915_forcewake_domains(struct seq_file *m, void *data)
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;
	struct intel_uncore_forcewake_domain *fw_domain;
	unsigned int tmp;
	unsigned int tmp;


	spin_lock_irq(&dev_priv->uncore.lock);
	for_each_fw_domain(fw_domain, i915, tmp)
	for_each_fw_domain(fw_domain, dev_priv, tmp) {
		seq_printf(m, "%s.wake_count = %u\n",
		seq_printf(m, "%s.wake_count = %u\n",
			   intel_uncore_forcewake_domain_to_str(fw_domain->id),
			   intel_uncore_forcewake_domain_to_str(fw_domain->id),
			   fw_domain->wake_count);
			   READ_ONCE(fw_domain->wake_count));
	}
	spin_unlock_irq(&dev_priv->uncore.lock);


	return 0;
	return 0;
}
}