From: Chris Wilson Date: Tue, 5 Jun 2018 16:06:23 +0000 (+0100) Subject: drm/i915/error: Fixup inactive/active counting X-Git-Tag: v4.19-rc1~138^2~39^2~4 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=cd68e04cf56a38029940a33cbc834b4ab15b2bdb;p=thirdparty%2Fkernel%2Flinux.git 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: Chris Wilson Cc: Joonas Lahtinen Cc: Mika Kuoppala Cc: Matthew Auld Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20180605160623.30163-1-chris@chris-wilson.co.uk --- diff --git a/drivers/gpu/drm/i915/i915_gpu_error.c b/drivers/gpu/drm/i915/i915_gpu_error.c index 47721437a4c58..6702776303bfd 100644 --- a/drivers/gpu/drm/i915/i915_gpu_error.c +++ b/drivers/gpu/drm/i915/i915_gpu_error.c @@ -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;