From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ville =?iso-8859-1?Q?Syrj=E4l=E4?= Subject: Re: [PATCH] drm/i915: fix sanitize_enable_ppgtt for full PPGTT Date: Thu, 26 Jun 2014 17:59:48 +0300 Message-ID: <20140626145948.GD27580@intel.com> References: <20140625154533.1691900c@jbarnes-desktop> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by gabe.freedesktop.org (Postfix) with ESMTP id AB7EF6E0D4 for ; Thu, 26 Jun 2014 07:59:51 -0700 (PDT) Content-Disposition: inline In-Reply-To: <20140625154533.1691900c@jbarnes-desktop> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: Jesse Barnes Cc: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Wed, Jun 25, 2014 at 03:45:33PM -0700, Jesse Barnes wrote: > 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=3D80083 > 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/i= 915_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 *de= v, 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; I don't get it. This would just enable full ppgtt by default. But full ppgtt is still a bit broken so I don't think we want this. The dmesg in the bug shows that ppgtt was forced off by the PCI revision check, so that part seems to have worked. Looks like the tests doesn't expect the batches to be accepted by the kernel, but the cmd parser is bypassed when ppgtt is disabled, so the test fails. -- = Ville Syrj=E4l=E4 Intel OTC