diff options
author | Chris Wilson | 2018-06-05 18:06:23 +0200 |
---|---|---|
committer | Chris Wilson | 2018-06-05 20:23:33 +0200 |
commit | cd68e04cf56a38029940a33cbc834b4ab15b2bdb (patch) | |
tree | e9255daee805cba8d9c3394492c3abe539a16f9e /drivers/gpu/drm/i915/i915_gpu_error.c | |
parent | drm/i915/guc: Don't leak stage descriptor pool on init failure (diff) | |
download | kernel-qcow2-linux-cd68e04cf56a38029940a33cbc834b4ab15b2bdb.tar.gz kernel-qcow2-linux-cd68e04cf56a38029940a33cbc834b4ab15b2bdb.tar.xz kernel-qcow2-linux-cd68e04cf56a38029940a33cbc834b4ab15b2bdb.zip |
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 <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: Matthew Auld <matthew.william.auld@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180605160623.30163-1-chris@chris-wilson.co.uk
Diffstat (limited to 'drivers/gpu/drm/i915/i915_gpu_error.c')
-rw-r--r-- | drivers/gpu/drm/i915/i915_gpu_error.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/i915/i915_gpu_error.c b/drivers/gpu/drm/i915/i915_gpu_error.c index 47721437a4c5..6702776303bf 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; |