From patchwork Wed Apr 22 16:13:38 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michel Thierry X-Patchwork-Id: 6256861 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 59C27BF4A6 for ; Wed, 22 Apr 2015 16:13:41 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 929852010B for ; Wed, 22 Apr 2015 16:13:40 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id A3F9A200E8 for ; Wed, 22 Apr 2015 16:13:39 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E091C89E35; Wed, 22 Apr 2015 09:13:38 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by gabe.freedesktop.org (Postfix) with ESMTP id 56B7089E01 for ; Wed, 22 Apr 2015 09:13:37 -0700 (PDT) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga103.jf.intel.com with ESMTP; 22 Apr 2015 09:13:36 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.11,624,1422950400"; d="scan'208";a="684037506" Received: from michelth-linux.isw.intel.com ([10.102.226.66]) by orsmga001.jf.intel.com with ESMTP; 22 Apr 2015 09:13:36 -0700 From: Michel Thierry To: intel-gfx@lists.freedesktop.org Date: Wed, 22 Apr 2015 17:13:38 +0100 Message-Id: <1429719218-9700-1-git-send-email-michel.thierry@intel.com> X-Mailer: git-send-email 2.1.1 Cc: Daniel Vetter , Mika Kuoppala Subject: [Intel-gfx] [PATCH] drm/i915: Do not re-allocate vmas in aliasing ppgtt X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Aliasing ppgtt is fully allocated right after creation, thus shouldn't need to call allocate_va_range in i915_vma_bind. This duplication started after commit 5c5f645773b6d147bf68c350674dc3ef4f8de83d ("drm/i915: drm/i915: Unify aliasing ppgtt handling"), as aliasing ppgtt now also uses allocate_va_range. Cc: Daniel Vetter Cc: Mika Kuoppala Signed-off-by: Michel Thierry Tested-By: Intel Graphics QA PRTS (Patch Regression Test System Contact: shuang.he@intel.com) --- drivers/gpu/drm/i915/i915_gem_gtt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c index 7b13273..e8c0ab0 100644 --- a/drivers/gpu/drm/i915/i915_gem_gtt.c +++ b/drivers/gpu/drm/i915/i915_gem_gtt.c @@ -3242,7 +3242,7 @@ int i915_vma_bind(struct i915_vma *vma, enum i915_cache_level cache_level, { int ret; - if (vma->vm->allocate_va_range) { + if (vma->vm->allocate_va_range && USES_FULL_PPGTT(dev)) { trace_i915_va_alloc(vma->vm, vma->node.start, vma->node.size, VM_TO_TRACE_NAME(vma->vm));