[Intel-gfx] [PATCH 1/2] drm/i915: Track & check calls to intel(_logical)_ring_{begin, advance}

Daniel Vetter daniel at ffwll.ch
Wed Dec 10 07:44:55 PST 2014


On Wed, Dec 10, 2014 at 03:07:08PM +0000, Dave Gordon wrote:
> @@ -401,11 +406,59 @@ static inline void intel_ring_emit(struct intel_engine_cs *ring,
>  	iowrite32(data, ringbuf->virtual_start + ringbuf->tail);
>  	ringbuf->tail += 4;
>  }
> +
> +static inline void __intel_ringbuffer_begin(struct intel_ringbuffer *ringbuf,
> +					    int num_dwords)
> +{
> +	int nbytes = num_dwords * sizeof(uint32_t);
> +#if	1	/* DEBUG CODE */

No #ifdef's in code please, they tend to be either just go stale or just
obfuscate the code.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch


More information about the Intel-gfx mailing list