[Intel-gfx] [PATCH 1/2] drm/i915/gtt: Avoid calling non-existent allocate_va_range
Chris Wilson
chris at chris-wilson.co.uk
Sat Apr 28 21:04:31 UTC 2018
Quoting Chris Wilson (2018-04-28 21:04:23)
> On hsw and older, we do not need to allocate the ppgtt on the fly and so
> ppgtt->allocate_va_range() is NULL. Fixup ppgtt_bind_vma not to call it,
> in that case!
>
> Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
> ---
> drivers/gpu/drm/i915/i915_gem_gtt.c | 35 +++++++++++++++++++----------
> 1 file changed, 23 insertions(+), 12 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c
> index 21d72f695adb..b454f3489767 100644
> --- a/drivers/gpu/drm/i915/i915_gem_gtt.c
> +++ b/drivers/gpu/drm/i915/i915_gem_gtt.c
> @@ -189,19 +189,30 @@ int intel_sanitize_enable_ppgtt(struct drm_i915_private *dev_priv,
> return 1;
> }
>
> -static int ppgtt_bind_vma(struct i915_vma *vma,
> - enum i915_cache_level cache_level,
> - u32 unused)
> +static int gen8_ppgtt_bind_vma(struct i915_vma *vma,
> + enum i915_cache_level cache_level,
> + u32 unused)
> {
> - u32 pte_flags;
> int ret;
>
> - if (!(vma->flags & I915_VMA_LOCAL_BIND)) {
> - ret = vma->vm->allocate_va_range(vma->vm, vma->node.start,
> - vma->size);
> - if (ret)
> - return ret;
> - }
> + GEM_BUG_ON(vma->flags & I915_VMA_LOCAL_BIND);
I keep forgetting about PIN_UPDATE. Hopefully this fails in igt and not
just the selftests.
-Chris
More information about the Intel-gfx
mailing list