All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Owain G. Ainsworth" <zerooa@googlemail.com>
To: intel-gfx@lists.freedesktop.org
Cc: "Owain G. Ainsworth" <oga@openbsd.org>
Subject: [PATCH 2/2] drm/i915: Remove the bind in mmap_gtt_ioctl
Date: Thu, 22 Apr 2010 22:38:42 +0100	[thread overview]
Message-ID: <1271972322-18780-2-git-send-email-oga@openbsd.org> (raw)
In-Reply-To: <1271972322-18780-1-git-send-email-oga@openbsd.org>

It really won't affect faulting speed at all, and in rare cases may do
more than we needed in the first place. If we do need to map and we
aren't bound it will take *just as long* when the mmap happens as it
would on the ioctl being called.

Discussed with danvet and jbarnes.

Signed-Off-By: Owain G. Ainsworth <oga@openbsd.org>
---
 drivers/gpu/drm/i915/i915_gem.c |   14 --------------
 1 files changed, 0 insertions(+), 14 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index a9da182..935cd83 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -1426,20 +1426,6 @@ i915_gem_mmap_gtt_ioctl(struct drm_device *dev, void *data,
 
 	args->offset = obj_priv->mmap_offset;
 
-	/*
-	 * Pull it into the GTT so that we have a page list (makes the
-	 * initial fault faster and any subsequent flushing possible).
-	 */
-	if (!obj_priv->agp_mem) {
-		ret = i915_gem_object_bind_to_gtt(obj, 0);
-		if (ret) {
-			drm_gem_object_unreference(obj);
-			mutex_unlock(&dev->struct_mutex);
-			return ret;
-		}
-		list_add_tail(&obj_priv->list, &dev_priv->mm.inactive_list);
-	}
-
 	drm_gem_object_unreference(obj);
 	mutex_unlock(&dev->struct_mutex);
 
-- 
1.6.5.7

  reply	other threads:[~2010-04-22 21:38 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-22 21:38 [PATCH 1/2] drm/i915: check execbuffer for validity earlier to save on work Owain G. Ainsworth
2010-04-22 21:38 ` Owain G. Ainsworth [this message]
2010-04-22 22:15   ` [PATCH 2/2] drm/i915: Remove the bind in mmap_gtt_ioctl Chris Wilson
2010-04-22 22:15 ` [PATCH 1/2] drm/i915: check execbuffer for validity earlier to save on work Chris Wilson

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=1271972322-18780-2-git-send-email-oga@openbsd.org \
    --to=zerooa@googlemail.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=oga@openbsd.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.