From: "Owain G. Ainsworth" Subject: [PATCH 2/2] drm/i915: Remove the bind in mmap_gtt_ioctl Date: Thu, 22 Apr 2010 22:38:42 +0100 Message-ID: <1271972322-18780-2-git-send-email-oga@openbsd.org> References: <1271972322-18780-1-git-send-email-oga@openbsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-ww0-f49.google.com (mail-ww0-f49.google.com [74.125.82.49]) by gabe.freedesktop.org (Postfix) with ESMTP id 78F969E817 for ; Thu, 22 Apr 2010 14:38:54 -0700 (PDT) Received: by mail-ww0-f49.google.com with SMTP id 17so176209wwi.36 for ; Thu, 22 Apr 2010 14:38:54 -0700 (PDT) In-Reply-To: <1271972322-18780-1-git-send-email-oga@openbsd.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces@lists.freedesktop.org Errors-To: intel-gfx-bounces@lists.freedesktop.org To: intel-gfx@lists.freedesktop.org Cc: "Owain G. Ainsworth" List-Id: intel-gfx@lists.freedesktop.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 --- 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