summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/i915
diff options
context:
space:
mode:
authorMichal Wajdeczko <michal.wajdeczko@intel.com>2019-07-19 15:33:22 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2019-07-19 17:15:40 +0100
commit5cad0ddf4b78559221a123c627df291cbe4d3ccd (patch)
tree60f0c00b3ad5d080cdf842cc50fbd62e3f254279 /drivers/gpu/drm/i915
parent6b5f3cb1aa20e196d35aba21fbf363d3736ff4d5 (diff)
drm/i915/gtt: Don't try to clear failed empty pd allocation
When __gen8_ppgtt_alloc fails without allocating anything we should not try to call __gen8_ppgtt_clear as there is nothing to clear and underlying code will complain with: [ 157.861645] gen8_pd_range:881 GEM_BUG_ON(start >= end) Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Link: https://patchwork.freedesktop.org/patch/msgid/20190719153322.10464-1-michal.wajdeczko@intel.com
Diffstat (limited to 'drivers/gpu/drm/i915')
-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 031bcd22f5e6..0930455824b4 100644
--- a/drivers/gpu/drm/i915/i915_gem_gtt.c
+++ b/drivers/gpu/drm/i915/i915_gem_gtt.c
@@ -1116,7 +1116,7 @@ static int gen8_ppgtt_alloc(struct i915_address_space *vm,
err = __gen8_ppgtt_alloc(vm, i915_vm_to_ppgtt(vm)->pd,
&start, start + length, vm->top);
- if (unlikely(err))
+ if (unlikely(err && from != start))
__gen8_ppgtt_clear(vm, i915_vm_to_ppgtt(vm)->pd,
from, start, vm->top);