From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Vetter Subject: Re: [PATCH 12/43] drm/i915/bdw: Don't write PDP in the legacy way when using LRCs Date: Mon, 11 Aug 2014 16:32:31 +0200 Message-ID: <20140811143231.GI10500@phenom.ffwll.local> References: <1406217891-8912-13-git-send-email-thomas.daniel@intel.com> <1407413860-5926-1-git-send-email-thomas.daniel@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-wi0-f174.google.com (mail-wi0-f174.google.com [209.85.212.174]) by gabe.freedesktop.org (Postfix) with ESMTP id E8ABD6E3EE for ; Mon, 11 Aug 2014 07:32:19 -0700 (PDT) Received: by mail-wi0-f174.google.com with SMTP id d1so4349381wiv.7 for ; Mon, 11 Aug 2014 07:32:19 -0700 (PDT) Content-Disposition: inline In-Reply-To: <1407413860-5926-1-git-send-email-thomas.daniel@intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: Thomas Daniel Cc: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Thu, Aug 07, 2014 at 01:17:40PM +0100, Thomas Daniel wrote: > From: Oscar Mateo > > This is mostly for correctness so that we know we are running the LR > context correctly (this is, the PDPs are contained inside the context > object). > > v2: Move the check to inside the enable PPGTT function. The switch > happens in two places: the legacy context switch (that we won't hit > when Execlists are enabled) and the PPGTT enable, which unfortunately > we need. This would look much nicer if the ppgtt->enable was part of > the ring init, where it logically belongs. > > v3: Move the check to the start of the enable PPGTT function. None > of the legacy PPGTT enabling is required when using LRCs as the > PPGTT is enabled in the context descriptor and the PDPs are written > in the LRC. > > Signed-off-by: Oscar Mateo > Signed-off-by: Thomas Daniel > --- > drivers/gpu/drm/i915/i915_gem_gtt.c | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c > index 5188936..cfbf272 100644 > --- a/drivers/gpu/drm/i915/i915_gem_gtt.c > +++ b/drivers/gpu/drm/i915/i915_gem_gtt.c > @@ -843,6 +843,11 @@ static int gen8_ppgtt_enable(struct i915_hw_ppgtt *ppgtt) > struct intel_engine_cs *ring; > int j, ret; > > + /* In the case of Execlists, we don't want to write the PDPs This comment is misleading since you now also disable the ppgtt enable bit setting. Not that the code disabled in v2 of this patch is for aliasing ppgtt mode only anyway, so irrelevant for execlist mode. Aside: A few patches from myself will clear this up a bit better. As-is this just looks confusing, so I'll punt for now. -Daniel > + * in the legacy way (they live inside the context now) */ > + if (i915.enable_execlists) > + return 0; > + > for_each_ring(ring, dev_priv, j) { > I915_WRITE(RING_MODE_GEN7(ring), > _MASKED_BIT_ENABLE(GFX_PPGTT_ENABLE)); > -- > 1.7.9.5 > > _______________________________________________ > Intel-gfx mailing list > Intel-gfx@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/intel-gfx -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch