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.lahti...@linux.intel.com>

Regards, Joonas
-- 
Joonas Lahtinen
Open Source Technology Center
Intel Corporation
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to