On Fri, 14 Jun 2019 at 08:10, Chris Wilson <[email protected]> wrote:
>
> Throughout the code base we internally track vma (objects bound into
> a particular GTT), with the objects themselves being the common backing
> storage. By making the vma itself reference counted we can start
> operating on the vma concurrently, moving work into async threads.
>
> Just the conversion to making sure we keep track of the vma reference
> counts is not particularly pleasant.
> ---

[snip]

> @@ -2060,6 +2057,7 @@ static struct i915_vma *pd_vma_create(struct gen6_ppgtt 
> *ppgtt, int size)
>         if (!vma)
>                 return ERR_PTR(-ENOMEM);
>
> +       kref_init(&vma->ref);
>         i915_active_init(&vma->active, NULL, NULL);
>
>         vma->vm = &ggtt->vm;

Just a first pass.  Do we need i915_vm_get(&ggtt->vm); so we match the
i915_vm_put() in __i915_vma_release()?
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to