Re: [PATCH v2] drm/i915: Fix pages pin counting around swizzle quirk

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

 



On Fri, Nov 04, 2016 at 01:43:34PM +0200, Joonas Lahtinen wrote:
> On pe, 2016-11-04 at 10:30 +0000, Chris Wilson wrote:
> > @@ -3711,6 +3711,13 @@ i915_get_ggtt_vma_pages(struct i915_vma *vma)
> >  {
> >  	int ret = 0;
> >  
> > +	/* The vma->pages are only valid within the lifespan of the borrowed
> > +	 * obj->mm.pages. When the obj->mm.pages sg_table is regenerated, so
> > +	 * must be the vma->pages. A simple rule is that vma->pages must only
> > +	 * be accessed when the obj->mm.pages are pinned.
> > +	 */
> > +	GEM_BUG_ON(!i915_gem_object_has_pinned_pages(vma->obj));
> > +
> >  	if (vma->pages)
> >  		return 0;
> 
> My confusion was vma == obj for the moment, but I think the comment is
> still good. The barriers are much more sensible now, too.
> 
> Reviewed-by: Joonas Lahtinen <joonas.lahtinen@xxxxxxxxxxxxxxx>

* fingers crossed that's the last we see of this quirk.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux