From patchwork Fri Dec 11 14:34:13 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michel Thierry X-Patchwork-Id: 7830401 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 8A0829F1C2 for ; Fri, 11 Dec 2015 14:34:19 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id BAB6E20532 for ; Fri, 11 Dec 2015 14:34:18 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 635642045B for ; Fri, 11 Dec 2015 14:34:17 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 7E569720D5; Fri, 11 Dec 2015 06:34:16 -0800 (PST) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by gabe.freedesktop.org (Postfix) with ESMTP id 13C53720D5 for ; Fri, 11 Dec 2015 06:34:14 -0800 (PST) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga102.jf.intel.com with ESMTP; 11 Dec 2015 06:34:14 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,414,1444719600"; d="scan'208";a="839253399" Received: from michelth-linux2.isw.intel.com ([10.102.226.102]) by orsmga001.jf.intel.com with ESMTP; 11 Dec 2015 06:34:13 -0800 From: Michel Thierry To: intel-gfx@lists.freedesktop.org Date: Fri, 11 Dec 2015 14:34:13 +0000 Message-Id: <1449844453-33974-1-git-send-email-michel.thierry@intel.com> X-Mailer: git-send-email 2.6.3 Subject: [Intel-gfx] [PATCH] drm/i915: Allow objects to go back above 4GB in the address range 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 We detected if objects should be moved to the lower parts when 48-bit support flag was not set, but not the other way around. This handles the case in which an object was allocated in the 32-bit address range, but it has been marked as safe to move above it, which theoretically would help to keep the lower addresses available for objects which really need to be there. Cc: Daniele Ceraolo Spurio Signed-off-by: Michel Thierry --- drivers/gpu/drm/i915/i915_gem_execbuffer.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/gpu/drm/i915/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/i915_gem_execbuffer.c index 8df5b96..a83916e 100644 --- a/drivers/gpu/drm/i915/i915_gem_execbuffer.c +++ b/drivers/gpu/drm/i915/i915_gem_execbuffer.c @@ -696,6 +696,11 @@ eb_vma_misplaced(struct i915_vma *vma) (vma->node.start + vma->node.size - 1) >> 32) return true; + /* keep the lower addresses free of unnecessary objects */ + if ((entry->flags & EXEC_OBJECT_SUPPORTS_48B_ADDRESS) && + !((vma->node.start + vma->node.size - 1) >> 32)) + return true; + return false; }