From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Vetter Subject: Re: [PATCH 24/43] drm/i915/bdw: GEN-specific logical ring emit batchbuffer start Date: Mon, 11 Aug 2014 23:12:10 +0200 Message-ID: <20140811211210.GD10500@phenom.ffwll.local> References: <1406217891-8912-1-git-send-email-thomas.daniel@intel.com> <1406217891-8912-25-git-send-email-thomas.daniel@intel.com> <20140811210939.GC10500@phenom.ffwll.local> 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 3331D89824 for ; Mon, 11 Aug 2014 14:11:58 -0700 (PDT) Received: by mail-wi0-f174.google.com with SMTP id d1so4922648wiv.1 for ; Mon, 11 Aug 2014 14:11:57 -0700 (PDT) Content-Disposition: inline In-Reply-To: <20140811210939.GC10500@phenom.ffwll.local> 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 Mon, Aug 11, 2014 at 11:09:39PM +0200, Daniel Vetter wrote: > On Thu, Jul 24, 2014 at 05:04:32PM +0100, Thomas Daniel wrote: > > From: Oscar Mateo > > > > Dispatch_execbuffer's evil twin. > > > > Signed-off-by: Oscar Mateo > > --- > > drivers/gpu/drm/i915/intel_lrc.c | 28 ++++++++++++++++++++++++++++ > > drivers/gpu/drm/i915/intel_ringbuffer.h | 2 ++ > > 2 files changed, 30 insertions(+) > > > > diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c > > index a6dcb3a..55ee8dd 100644 > > --- a/drivers/gpu/drm/i915/intel_lrc.c > > +++ b/drivers/gpu/drm/i915/intel_lrc.c > > @@ -384,6 +384,29 @@ static int gen8_init_render_ring(struct intel_engine_cs *ring) > > return ret; > > } > > > > +static int gen8_emit_bb_start(struct intel_ringbuffer *ringbuf, > > + u64 offset, unsigned flags) > > +{ > > + struct intel_engine_cs *ring = ringbuf->ring; > > + struct drm_i915_private *dev_priv = ring->dev->dev_private; > > + bool ppgtt = dev_priv->mm.aliasing_ppgtt != NULL && > > The aliasing ppgtt check here is fairly decent bullocks, especially since > full ppgtt is a requirement for execlists. I've ditched it since a series > from myself will otherwise break this patch. > -Daniel > > > + !(flags & I915_DISPATCH_SECURE); > > + int ret; > > + > > + ret = intel_logical_ring_begin(ringbuf, 4); > > + if (ret) > > + return ret; > > + > > + /* FIXME(BDW): Address space and security selectors. */ > > + intel_logical_ring_emit(ringbuf, MI_BATCH_BUFFER_START_GEN8 | (ppgtt<<8)); Also please follow up with a patch to replace the magic 8 here with a proper define. Usual approach is to build this up with an u32 cmd_flags or so. Patch should obviously also rectify the legacy ring stuff. -Daniel -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch