aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <[email protected]>2018-06-08 18:32:21 +0100
committerChris Wilson <[email protected]>2018-06-08 19:29:24 +0100
commitb4e2727df2713a5aea9de6364f7a943147ceef92 (patch)
treefbd0639965832add87c4dac0a1f4e7ded864d38c
parent672b3c4bc3d157078c00146c2d20bdd3aeec38e6 (diff)
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 <[email protected]> Signed-off-by: Chris Wilson <[email protected]> Cc: Joonas Lahtinen <[email protected]> Cc: Mika Kuoppala <[email protected]> Cc: Matthew Auld <[email protected]> Reviewed-by: Matthew Auld <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
-rw-r--r--drivers/gpu/drm/i915/i915_gem_gtt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c
index 912d6c4ba336..ae3b24095d04 100644
--- a/drivers/gpu/drm/i915/i915_gem_gtt.c
+++ b/drivers/gpu/drm/i915/i915_gem_gtt.c
@@ -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;
}