From patchwork Wed Jun 25 22:45:33 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jesse Barnes X-Patchwork-Id: 4424731 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.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 7643E9F36A for ; Wed, 25 Jun 2014 22:45:04 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1FF2A2038C for ; Wed, 25 Jun 2014 22:45:02 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 22F102037F for ; Wed, 25 Jun 2014 22:45:01 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 9D0526E277; Wed, 25 Jun 2014 15:45:00 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-pb0-f42.google.com (mail-pb0-f42.google.com [209.85.160.42]) by gabe.freedesktop.org (Postfix) with ESMTP id E3E646E277 for ; Wed, 25 Jun 2014 15:44:59 -0700 (PDT) Received: by mail-pb0-f42.google.com with SMTP id ma3so2292155pbc.29 for ; Wed, 25 Jun 2014 15:44:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=date:from:to:subject:message-id:mime-version:content-type :content-transfer-encoding; bh=nYJvtg1e+E25jd/UHpqqjOSWGUvnRfs0t23lLy3R2BU=; b=QfPl3sY7otQFQX9RpJdUbNdblZUOS4IXN1/zP+ce9s8PRLIcE4TITfkX6jWXOjFLfe efzSzDraBEQlKS44hQVz+zL1kfM/wp31cDX339y0bRD8UAIzSZ3fyLadA2giKjpieofC vOFOzVo2XwP0jqcousU3GByNn6yR1aIMInImoEFwfAu96G3+0JbPph4A7SxNpm0RlFx/ wvldAksVJ9ZY8IkTP5kdjtyzgRyXZVZ4ffzN6ZsoIJfsl3+qYitW+NeOmsKPCjzKmRKX xVu053PBn1b1hNBUsJZT9ubgkezSvF6/XBwU2aawe4tiyO0nd5w2+ISGCozuadoE7eUv bWrw== X-Received: by 10.66.218.36 with SMTP id pd4mr15761193pac.141.1403736299634; Wed, 25 Jun 2014 15:44:59 -0700 (PDT) Received: from jbarnes-desktop (c-67-161-37-189.hsd1.ca.comcast.net. [67.161.37.189]) by mx.google.com with ESMTPSA id f2sm24519046pat.11.2014.06.25.15.44.58 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 25 Jun 2014 15:44:58 -0700 (PDT) Date: Wed, 25 Jun 2014 15:45:33 -0700 From: Jesse Barnes To: intel-gfx@lists.freedesktop.org Message-ID: <20140625154533.1691900c@jbarnes-desktop> X-Mailer: Claws Mail 3.8.0 (GTK+ 2.24.10; x86_64-pc-linux-gnu) Mime-Version: 1.0 Subject: [Intel-gfx] [PATCH] drm/i915: fix sanitize_enable_ppgtt for full PPGTT X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.15 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-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 Apparently trinary logic is hard. We were falling through all the forced cases and simply enabling aliasing PPGTT or not based on hardware, rather than full PPGTT if available. References: https://bugs.freedesktop.org/show_bug.cgi?id=80083 Signed-off-by: Jesse Barnes --- drivers/gpu/drm/i915/i915_gem_gtt.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c index a4153ee..86521a7 100644 --- a/drivers/gpu/drm/i915/i915_gem_gtt.c +++ b/drivers/gpu/drm/i915/i915_gem_gtt.c @@ -69,7 +69,13 @@ static int sanitize_enable_ppgtt(struct drm_device *dev, int enable_ppgtt) return 0; } - return HAS_ALIASING_PPGTT(dev) ? 1 : 0; + /* Fall through to auto-detect */ + if (HAS_PPGTT(dev)) + return 2; + else if (HAS_ALIASING_PPGTT(dev)) + return 1; + + return 0; }