From: Daniel Vetter <daniel@ffwll.ch>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: intel-gfx@lists.freedesktop.org, Akash Goel <akash.goel@intel.com>
Subject: Re: [PATCH] drm/i915: Stop discarding GTT cache-domain on unbind vma
Date: Mon, 4 May 2015 16:14:41 +0200 [thread overview]
Message-ID: <20150504141441.GF30184@phenom.ffwll.local> (raw)
In-Reply-To: <1429790077-7412-1-git-send-email-chris@chris-wilson.co.uk>
On Thu, Apr 23, 2015 at 12:54:37PM +0100, Chris Wilson wrote:
> Since
>
> commit 43566dedde54f9729113f5f9fde77d53e75e61e9
> Author: Chris Wilson <chris@chris-wilson.co.uk>
> Date: Fri Jan 2 16:29:29 2015 +0530
>
> drm/i915: Broaden application of set-domain(GTT)
>
> we allowed objects to be in the GTT domain, but unbound. Therefore
> removing the GTT cache domain when removing the GGTT vma is no longer
> semantically correct.
>
> An unfortunate side-effect is we lose the wondrously named
> i915_gem_object_finish_gtt(), not to be confused with
> i915_gem_gtt_finish_object()!
What are we going to do without that bit of hilarity ...
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Akash Goel <akash.goel@intel.com>
> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Queued for -next (with the rebase conflict resolved because I don't have
your tree), thanks for the patch.
-Daniel
> ---
> drivers/gpu/drm/i915/i915_gem.c | 22 +++-------------------
> 1 file changed, 3 insertions(+), 19 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
> index 6ffc4a619849..1ea94aec41d1 100644
> --- a/drivers/gpu/drm/i915/i915_gem.c
> +++ b/drivers/gpu/drm/i915/i915_gem.c
> @@ -3171,23 +3171,6 @@ i915_gem_object_sync(struct drm_i915_gem_object *obj,
> return 0;
> }
>
> -static void i915_gem_object_finish_gtt(struct drm_i915_gem_object *obj)
> -{
> - /* Force a pagefault for domain tracking on next user access */
> - i915_gem_release_mmap(obj);
> -
> - if ((obj->base.read_domains & I915_GEM_DOMAIN_GTT) == 0)
> - return;
> -
> - /* Wait for any direct GTT access to complete */
> - mb();
> -
> - obj->base.read_domains &= ~I915_GEM_DOMAIN_GTT;
> - obj->base.write_domain &= ~I915_GEM_DOMAIN_GTT;
> -
> - trace_i915_gem_object_change_domain(obj);
> -}
> -
> int i915_vma_unbind(struct i915_vma *vma)
> {
> struct drm_i915_gem_object *obj = vma->obj;
> @@ -3219,12 +3202,13 @@ int i915_vma_unbind(struct i915_vma *vma)
> */
>
> if (vma->is_ggtt && vma->ggtt_view.type == I915_GGTT_VIEW_NORMAL) {
> - i915_gem_object_finish_gtt(obj);
> -
> /* release the fence reg _after_ flushing */
> ret = i915_gem_object_put_fence(obj);
> if (ret)
> return ret;
> +
> + /* Force a pagefault for domain tracking on next user access */
> + i915_gem_release_mmap(obj);
> }
>
> trace_i915_vma_unbind(vma);
> --
> 2.1.4
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2015-05-04 14:12 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-23 11:54 [PATCH] drm/i915: Stop discarding GTT cache-domain on unbind vma Chris Wilson
2015-05-04 14:14 ` Daniel Vetter [this message]
2015-05-04 14:21 ` Daniel Vetter
2015-05-04 14:26 ` Chris Wilson
-- strict thread matches above, loose matches on Subject: below --
2015-10-06 11:41 [PATCH 2/2] drm/i915: Drop i915_gem_obj_is_pinned() from set-cache-level Chris Wilson
2015-10-06 12:02 ` [PATCH] drm/i915: Stop discarding GTT cache-domain on unbind vma Chris Wilson
2015-10-06 12:40 ` Daniel Vetter
2015-10-06 12:46 ` Chris Wilson
2015-10-06 13:05 ` Daniel Vetter
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=20150504141441.GF30184@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=akash.goel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox