[Intel-gfx] [PATCH 3/6] drm/i915: Use the common register access functions for NOTRACE variants

Chris Wilson chris at chris-wilson.co.uk
Fri Jul 12 22:51:08 CEST 2013


On Fri, Jul 12, 2013 at 01:34:09PM -0700, Ben Widawsky wrote:
> On Fri, Jul 12, 2013 at 03:02:33PM +0100, Chris Wilson wrote:
> >  #define __i915_write(x, y) \
> > -void i915_write##x(struct drm_i915_private *dev_priv, u32 reg, u##x val) { \
> > +void i915_write##x(struct drm_i915_private *dev_priv, u32 reg, u##x val, bool trace) { \
> >  	u32 __fifo_ret = 0; \
> > -	trace_i915_reg_rw(true, reg, val, sizeof(val)); \
> > +	if (trace) trace_i915_reg_rw(true, reg, val, sizeof(val)); \
> >  	if (NEEDS_FORCE_WAKE((dev_priv), (reg))) { \
> >  		__fifo_ret = __gen6_gt_wait_for_fifo(dev_priv); \
> >  	} \
> 
> 
> if (unlikely(trace))? taking a hit on the tracing case seems like what
> you want... but I never know the status of such compiler flags.

It would be likely, I guess. But it is not obvious, so leave it out. Later
on we replace it with the preferred form for conditional tracepoints.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre



More information about the Intel-gfx mailing list