Re: [PATCH 2/2] drm/i915: Consolidate gen8_emit_pipe_control

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Feb 15, 2017 at 04:06:34PM +0000, Tvrtko Ursulin wrote:
> +static inline u32 *gen8_emit_pipe_control(u32 *batch, u32 flags, u32 offset)
> +{
> +	static const u32 pc6[6] = { GFX_OP_PIPE_CONTROL(6), 0, 0, 0, 0, 0 };
> +
> +	memcpy(batch, pc6, sizeof(pc6));
> +
> +	batch[1] = flags;
> +	batch[2] = offset;
> +
> +	return batch + 6;

godbolt would seem to say it is best to use
static inline u32 *gen8_emit_pipe_control(u32 *batch, u32 flags, u32 offset)
{
	batch[0] = GFX_OP_PIPE_CONTROL(6);
	batch[1] = flags;
	batch[2] = offset;
	batch[3] = 0;
	batch[4] = 0;
	batch[5] = 0;

	return batch + 6;
}
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux