Re: [PATCH 29/39] drm/i915: Make i915_vma track its own kref

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Quoting Matthew Auld (2019-06-14 12:15:27)
> On Fri, 14 Jun 2019 at 08:10, Chris Wilson <chris@xxxxxxxxxxxxxxxxxx> 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()?

Yup. That would have an interesting explosion at some point. Tempted to
leave it to make sure CI does explode :)

Now that I mention it... I think I'll will leave a comment with the fix.
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux