mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00
drm/i915/gtt: Fix unwind length passed to gen6_ppgtt_clear_range
When we want to unwind an error when allocating the PD for gen6, we call gen6_ppgtt_clear_range() telling to clear upto the PD we've previously allocated. However, we passed it an incorrect length, passing it the endpoint instead. Fortunately, as the start was always 0, this has no impact today, but tomorrow we want to start using non-zero origins. Reported-by: Matthew Auld <matthew.william.auld@gmail.com> 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/20180608173221.10455-1-chris@chris-wilson.co.uk
This commit is contained in:
parent
672b3c4bc3
commit
b4e2727df2
1 changed files with 1 additions and 1 deletions
|
@ -1931,7 +1931,7 @@ static int gen6_alloc_va_range(struct i915_address_space *vm,
|
|||
return 0;
|
||||
|
||||
unwind_out:
|
||||
gen6_ppgtt_clear_range(vm, from, start);
|
||||
gen6_ppgtt_clear_range(vm, from, start - from);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue