drm/i915: Track ggtt fence reservations under its own mutex
We can reduce the locking for fence registers from the dev->struct_mutex to a local mutex. We could introduce a mutex for the sole purpose of tracking the fence acquisition, except there is a little bit of overlap with the fault tracking, so use the i915_ggtt.mutex as it covers both. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com> Reviewed-by: Matthew Auld <matthew.auld@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20190822060914.2671-1-chris@chris-wilson.co.uk
This commit is contained in:
@@ -652,10 +652,11 @@ static int i915_gem_fence_regs_info(struct seq_file *m, void *data)
|
||||
|
||||
rcu_read_lock();
|
||||
for (i = 0; i < i915->ggtt.num_fences; i++) {
|
||||
struct i915_vma *vma = i915->ggtt.fence_regs[i].vma;
|
||||
struct i915_fence_reg *reg = &i915->ggtt.fence_regs[i];
|
||||
struct i915_vma *vma = reg->vma;
|
||||
|
||||
seq_printf(m, "Fence %d, pin count = %d, object = ",
|
||||
i, i915->ggtt.fence_regs[i].pin_count);
|
||||
i, atomic_read(®->pin_count));
|
||||
if (!vma)
|
||||
seq_puts(m, "unused");
|
||||
else
|
||||
|
Reference in New Issue
Block a user