drm/i915: Remove struct_mutex guard for debugfs/opregion
authorChris Wilson <chris@chris-wilson.co.uk>
Fri, 4 Oct 2019 13:40:12 +0000 (14:40 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Fri, 4 Oct 2019 14:39:40 +0000 (15:39 +0100)
Having a struct_mutex around the read of a BIOS blob serves no purpose.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20191004134015.13204-18-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/i915_debugfs.c

index 77933b23070ef457d1584b3cf6efa364269a8392..298a3e879e6537279c8de9f2d090531b1e31248b 100644 (file)
@@ -1500,21 +1500,11 @@ static int i915_ring_freq_table(struct seq_file *m, void *unused)
 
 static int i915_opregion(struct seq_file *m, void *unused)
 {
-       struct drm_i915_private *dev_priv = node_to_i915(m->private);
-       struct drm_device *dev = &dev_priv->drm;
-       struct intel_opregion *opregion = &dev_priv->opregion;
-       int ret;
-
-       ret = mutex_lock_interruptible(&dev->struct_mutex);
-       if (ret)
-               goto out;
+       struct intel_opregion *opregion = &node_to_i915(m->private)->opregion;
 
        if (opregion->header)
                seq_write(m, opregion->header, OPREGION_SIZE);
 
-       mutex_unlock(&dev->struct_mutex);
-
-out:
        return 0;
 }