On Thu, 29 Apr 2021 at 11:10, Maarten Lankhorst
<maarten.lankho...@linux.intel.com> wrote:
>
> This will allow us to explicitly pass the ww to pin_pages,
> when it starts taking it.
>
> This allows us to finally kill off the explicit passing of ww
> by retrieving it from the obj.
>
> Changes since v1:
> - Rename 'ret' to ptr, fix error handling of return ptr.
>
> Signed-off-by: Maarten Lankhorst <maarten.lankho...@linux.intel.com>

<snip>

> --- a/drivers/gpu/drm/i915/gt/intel_gtt.c
> +++ b/drivers/gpu/drm/i915/gt/intel_gtt.c
> @@ -65,7 +65,7 @@ int map_pt_dma_locked(struct i915_address_space *vm, struct 
> drm_i915_gem_object
>         void *vaddr;
>
>         type = i915_coherent_map_type(vm->i915, obj, true);
> -       vaddr = i915_gem_object_pin_map(obj, type);
> +       vaddr = i915_gem_object_pin_map(obj, NULL, type);

Don't we need to pass the ww here? For all our page-tables this is
both our allocate and map for the backing page(lmem or smem), so at
least for the locked variant here would it not make sense to pass the
ww from the vma_pin() etc, in case we need to evict stuff?

>         if (IS_ERR(vaddr))
>                 return PTR_ERR(vaddr);
>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to