diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2017-03-23 10:19:41 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2017-03-23 10:22:02 +0000 |
commit | d2dc94bce295e638a15e077cbaec410a74db86c6 (patch) | |
tree | af5395d75f8cc5e89ddb16fc5d336eebc5e94a08 /drivers/gpu/drm/i915/i915_debugfs.c | |
parent | cb3600db6e2d310532d250818d58ef83aef9ce90 (diff) | |
download | lwn-d2dc94bce295e638a15e077cbaec410a74db86c6.tar.gz lwn-d2dc94bce295e638a15e077cbaec410a74db86c6.zip |
drm/i915: Skip unused fw_domains
Use find-first-set bitop to quickly scan through the fw_domains mask and
skip iterating over unused domains.
v2: Move the WARN into the caller, to prevent compiler warnings in
normal builds.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Mika Kuoppala <mika.kuoppala@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170323101944.21627-4-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 | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c index 29bf11d8b620..fcac795d4396 100644 --- a/drivers/gpu/drm/i915/i915_debugfs.c +++ b/drivers/gpu/drm/i915/i915_debugfs.c @@ -1461,9 +1461,10 @@ static int i915_forcewake_domains(struct seq_file *m, void *data) { struct drm_i915_private *dev_priv = 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) { + for_each_fw_domain(fw_domain, dev_priv, tmp) { seq_printf(m, "%s.wake_count = %u\n", intel_uncore_forcewake_domain_to_str(fw_domain->id), fw_domain->wake_count); |