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

Commit cd68e04c authored by Chris Wilson's avatar Chris Wilson
Browse files

drm/i915/error: Fixup inactive/active counting



The inactive counter was over the active list, and vice versa.
Fortuitously this should not cause a problem in practice as they shared
the same array and clamped the number of entries they would write.

Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Cc: Matthew Auld <matthew.william.auld@gmail.com>
Reviewed-by: default avatarMatthew Auld <matthew.william.auld@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180605160623.30163-1-chris@chris-wilson.co.uk
parent 70be8b3d
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1570,11 +1570,11 @@ static void capture_pinned_buffers(struct i915_gpu_state *error)
	int count_inactive, count_active;

	count_inactive = 0;
	list_for_each_entry(vma, &vm->active_list, vm_link)
	list_for_each_entry(vma, &vm->inactive_list, vm_link)
		count_inactive++;

	count_active = 0;
	list_for_each_entry(vma, &vm->inactive_list, vm_link)
	list_for_each_entry(vma, &vm->active_list, vm_link)
		count_active++;

	bo = NULL;