From: Daniel Vetter <daniel.vetter@ffwll.ch>
To: Intel Graphics Development <intel-gfx@lists.freedesktop.org>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Subject: [PATCH 4/5] drm/i915: enable lazy global-gtt binding
Date: Wed, 15 Feb 2012 23:50:24 +0100 [thread overview]
Message-ID: <1329346225-14795-5-git-send-email-daniel.vetter@ffwll.ch> (raw)
In-Reply-To: <1329346225-14795-1-git-send-email-daniel.vetter@ffwll.ch>
Now that everything is in place, only bind to the global gtt
when actually required. Patch split-up suggested by Chris Wilson.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
drivers/gpu/drm/i915/i915_gem.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 5892dac..39b7eaf 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -2767,7 +2767,9 @@ i915_gem_object_bind_to_gtt(struct drm_i915_gem_object *obj,
goto search_free;
}
- i915_gem_gtt_bind_object(obj, obj->cache_level);
+
+ if (!dev_priv->mm.aliasing_ppgtt)
+ i915_gem_gtt_bind_object(obj, obj->cache_level);
list_add_tail(&obj->gtt_list, &dev_priv->mm.gtt_list);
list_add_tail(&obj->mm_list, &dev_priv->mm.inactive_list);
--
1.7.9
next prev parent reply other threads:[~2012-02-15 22:50 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-15 22:50 [PATCH 0/5] aliasing ppgtt, advanced things Daniel Vetter
2012-02-15 22:50 ` [PATCH 1/5] drm/i915: split out dma mapping from global gtt bind/unbind functions Daniel Vetter
2012-02-15 22:50 ` [PATCH 2/5] drm/i915: bind objects to the global gtt only when needed Daniel Vetter
2012-02-15 22:50 ` [PATCH 3/5] drm/i915: implement SNB workaround for lazy global gtt Daniel Vetter
2012-02-15 23:10 ` Chris Wilson
2012-02-15 23:25 ` Daniel Vetter
2012-03-20 20:57 ` Daniel Vetter
2012-02-15 22:50 ` Daniel Vetter [this message]
2012-02-15 22:50 ` [PATCH 5/5] drm/i915: add HAS_ALIASING_PPGTT parameter for userspace 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=1329346225-14795-5-git-send-email-daniel.vetter@ffwll.ch \
--to=daniel.vetter@ffwll.ch \
--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