From: Chris Wilson Subject: Re: [PATCH] enable BLT acceleate on gen6 Date: Fri, 29 Oct 2010 20:13:53 +0100 Message-ID: References: <1288329512-1721-1-git-send-email-nanhai.zou@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by gabe.freedesktop.org (Postfix) with ESMTP id A748A9E792 for ; Fri, 29 Oct 2010 12:13:56 -0700 (PDT) In-Reply-To: <1288329512-1721-1-git-send-email-nanhai.zou@intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org To: Zou Nan hai , intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Fri, 29 Oct 2010 13:18:32 +0800, Zou Nan hai wrote: > uxa: enable BLT command on gen6, > BLT command will goto BLT ring buffer > on gen6. Just spotted one little fix required, and a couple of other suggestions (as before). Splitting it up into 3 little patches would be best. > Signed-off-by:Zou Nan hai > --- > diff --git a/src/intel.h b/src/intel.h > index b74a061..26f4a18 100644 > --- a/src/intel.h > +++ b/src/intel.h > @@ -276,6 +276,10 @@ typedef struct intel_screen_private { > unsigned char *MMIOBase; > int cpp; > > +#define RENDER_BATCH 0 > +#define BLT_BATCH 1 #define RENDER_BATCH I915_EXEC_RENDER #define BLT_BATCH I915_EXEC_BLT > + if (ret == 0) { > + if (intel->current_batch == RENDER_BATCH) > + ret = dri_bo_exec(intel->batch_bo, intel->batch_used*4, > + NULL, 0, 0xffffffff); > + else > + ret = drm_intel_bo_mrb_exec(intel->batch_bo, > + intel->batch_used*4, > + NULL, 0, 0xffffffff, I915_EXEC_BLT); > + } if (ret == 0) ret = drm_intel_bo_mrb_exec(intel->batch_bo, intel->batch_used*4, NULL, 0, 0xffffffff, intel->current_batch); > +#define __BEGIN_BATCH(n,batch_idx) \ > do { \ > if (intel->batch_emitting != 0) \ > FatalError("%s: BEGIN_BATCH called without closing " \ > "ADVANCE_BATCH\n", __FUNCTION__); \ > assert(!intel->in_batch_atomic); \ > + if (intel->current_batch != batch_idx) \ > + intel_batch_submit(scrn, TRUE); \ intel_batch_submit(scrn, FALSE); \ -Chris -- Chris Wilson, Intel Open Source Technology Centre