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 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>

Regards, Joonas
-- 
Joonas Lahtinen
Open Source Technology Center
Intel Corporation
_______________________________________________
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