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

Daniel Vetter daniel.vetter at ffwll.ch
Thu Oct 18 13:21:12 CEST 2012


On Thu, Oct 18, 2012 at 1:17 PM, Chris Wilson <chris at chris-wilson.co.uk> wrote:
> 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))

We could also teach the drm setup and teardown code manners and embed
struct drm_device into our own device struct and call it a day. Would
kill all that pointless circular pointer chasing. Been on my todo
since ages, will probably stay there for a while ...
-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