[Intel-gfx] [PATCH] enable BLT acceleate on gen6

Chris Wilson chris at chris-wilson.co.uk
Fri Oct 29 21:13:53 CEST 2010


On Fri, 29 Oct 2010 13:18:32 +0800, Zou Nan hai <nanhai.zou at intel.com> 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 <nanhai.zou at intel.com>
> ---
> 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



More information about the Intel-gfx mailing list