All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH v2] drm/i915: Fix pages pin counting around swizzle quirk
Date: Fri, 04 Nov 2016 13:43:34 +0200	[thread overview]
Message-ID: <1478259814.2866.9.camel@linux.intel.com> (raw)
In-Reply-To: <20161104103001.27643-1-chris@chris-wilson.co.uk>

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@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	other threads:[~2016-11-04 11:43 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-02  9:43 [PATCH] drm/i915: Fix pages pin counting around swizzle quirk Chris Wilson
2016-11-02 11:16 ` ✓ Fi.CI.BAT: success for " Patchwork
2016-11-03  9:42 ` [PATCH] " Chris Wilson
2016-11-04  8:50 ` Joonas Lahtinen
2016-11-04  9:36   ` Chris Wilson
2016-11-04 10:26     ` Chris Wilson
2016-11-04 10:29 ` [PATCH v2] get-fences-locked Chris Wilson
2016-11-04 11:31   ` Joonas Lahtinen
2016-11-04 10:30 ` [PATCH v2] drm/i915: Fix pages pin counting around swizzle quirk Chris Wilson
2016-11-04 11:43   ` Joonas Lahtinen [this message]
2016-11-04 11:57     ` Chris Wilson
2016-11-04 11:15 ` ✓ Fi.CI.BAT: success for drm/i915: Fix pages pin counting around swizzle quirk (rev3) Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1478259814.2866.9.camel@linux.intel.com \
    --to=joonas.lahtinen@linux.intel.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.