From patchwork Fri Feb 17 14:14:55 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Chris Wilson X-Patchwork-Id: 9579885 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id C4605600C5 for ; Fri, 17 Feb 2017 14:15:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B5110286DF for ; Fri, 17 Feb 2017 14:15:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A8D74286E1; Fri, 17 Feb 2017 14:15:02 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 3FB54286DF for ; Fri, 17 Feb 2017 14:15:02 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 7C2FE6E310; Fri, 17 Feb 2017 14:15:01 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-wr0-x244.google.com (mail-wr0-x244.google.com [IPv6:2a00:1450:400c:c0c::244]) by gabe.freedesktop.org (Postfix) with ESMTPS id 56ABB6E310 for ; Fri, 17 Feb 2017 14:14:59 +0000 (UTC) Received: by mail-wr0-x244.google.com with SMTP id c4so5432404wrd.1 for ; Fri, 17 Feb 2017 06:14:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=lkMwsksWxnVkrLiKrXPlxWSKPmgt2avqeV5b1zp16a0=; b=hXqMPVzy/9DCz4/qqFn76LFUUBTxAs277OAzTRqNe35yh7Dzg1b2UF07N9kz66OaMO dBTxi2DE32VKTVU3GQ16cIg79JE2rrwoskyqHNiD+BhwKniKUk69etZHBiSEydhGK+Vz 9uF7Lf36TnBVK2Zr1ceQw6sV3lIU5kPD0wqGnEM7YLJkcrn6Ud8McTsj6YU8PAx6IXeJ ZA7Gaq8ye7EDay9dOhENlIiko61lRMbjAjB4pq/65MGtI//2vquOCTS9JjljabE9eirl V7G8JTzzsChQIVUcF7rdt3Bdhh5pPab/XGijI2J8FOKUvmg7w++2RVj7zuz3QUxo5qng 7+tg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=lkMwsksWxnVkrLiKrXPlxWSKPmgt2avqeV5b1zp16a0=; b=Z/tMY+oA94bTKNvcAeDOM7KuULn1UPmZmaZdDiPussN5LUGY7jRG+qyODY4ycTt7Xk itlRFleBPQjd6hQxhC90ITbTfV4hhN5KDOND++px/gQOM5HRwR6MWO5r19zJD9Jy7GEo f7BUIPFB5Y9+oqV9yyO3T2ClivpsWHL3DBN6zGWXUVYer3fAICytKf8RoR/YJ1SVLx3f BGp3YGyw2RadKER5LrKJO9cx7bWTmHPv/L0FMJSZFvp8syb1ziO30aqfUG1/fsYjNr81 8YK+QzNxQLYI7EDBJ10U/QdchnbEunB30XJI2guqa4fvzjT1a5rg8FJBHIGdApmW86Uf iEYQ== X-Gm-Message-State: AMke39k1DwETE8nRv+EArNbR+a2LufyddfbWr50Zjf6M7Bbu2sM3uJ4Z7UO/9bkS14141A== X-Received: by 10.223.163.136 with SMTP id l8mr7347582wrb.42.1487340897934; Fri, 17 Feb 2017 06:14:57 -0800 (PST) Received: from haswell.alporthouse.com ([78.156.65.138]) by smtp.gmail.com with ESMTPSA id n18sm12992115wra.64.2017.02.17.06.14.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 17 Feb 2017 06:14:57 -0800 (PST) From: Chris Wilson To: intel-gfx@lists.freedesktop.org Date: Fri, 17 Feb 2017 14:14:55 +0000 Message-Id: <20170217141455.19877-1-chris@chris-wilson.co.uk> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170217135909.14596-1-chris@chris-wilson.co.uk> References: <20170217135909.14596-1-chris@chris-wilson.co.uk> MIME-Version: 1.0 Cc: Mika Kuoppala Subject: [Intel-gfx] [PATCH v2] drm/i915: Only apply legacy PDE overflow detection to 3lvl machines 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: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP Prevent the overflow check from firing on machines with the full 4lvl page tables, that are not restricted to GEN8_LEGACY_PDES. v2: Also fix the off-by-one in the compare Fixes: 894ccebee2b0 ("drm/i915: Micro-optimise gen8_ppgtt_insert_entries()") Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: Ville Syrjälä Reviewed-by: Mika Kuoppala --- drivers/gpu/drm/i915/i915_gem_gtt.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c index 1f281554e4c9..b0ccc9b6c1c5 100644 --- a/drivers/gpu/drm/i915/i915_gem_gtt.c +++ b/drivers/gpu/drm/i915/i915_gem_gtt.c @@ -854,7 +854,8 @@ gen8_ppgtt_insert_pte_entries(struct i915_hw_ppgtt *ppgtt, break; } - GEM_BUG_ON(pdpe > GEN8_LEGACY_PDPES); + GEM_BUG_ON(!i915_vm_is_48bit(&ppgtt->base) && + pdpe >= GEN8_LEGACY_PDPES); pd = pdp->page_directory[pdpe]; pde = 0; }