[Intel-gfx] [PATCH 1/5] drm/i915: implement WaIssueDummyWriteToWakupFromRC6

Chris Wilson chris at chris-wilson.co.uk
Thu Oct 18 13:17:39 CEST 2012


On Thu, 18 Oct 2012 11:49:50 +0200, Daniel Vetter <daniel.vetter at ffwll.ch> wrote:
>  #define __i915_read(x, y) \
>  u##x i915_read##x(struct drm_i915_private *dev_priv, u32 reg) { \
>  	u##x val = 0; \
> +	if (IS_GEN5(dev_priv->dev)) \
> +		ilk_dummy_write(dev_priv); \

IS_GEN5(dev_priv->dev) just makes me want to puke. At some point we must
go through and add an __INTEL_INFO(dev_priv) and so
  #define __IS_GEN5(dev_priv__) ((dev_priv__)->info->->gen == 5)
  #define IS_GEN5(dev) __IS_GEN5(to_drm_i915_private(dev))
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre



More information about the Intel-gfx mailing list