[Intel-gfx] [PATCH v2] drm/i915: Fix pages pin counting around swizzle quirk
Joonas Lahtinen
joonas.lahtinen at linux.intel.com
Fri Nov 4 11:43:34 UTC 2016
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 at linux.intel.com>
Regards, Joonas
--
Joonas Lahtinen
Open Source Technology Center
Intel Corporation
More information about the Intel-gfx
mailing list