On Wed, 11 Apr 2012 22:12:59 +0200
Daniel Vetter <daniel.vet...@ffwll.ch> wrote:

> Now that these are properly refactored this additional indirection
> doesn't really buy us anything but confusion. Hence inline them.
> 
> This duplicates the ironlake gt enable/disable code snippet, but we've
> already separate ilk from gen6+ gt irq in i915_irq.c, so I think this
> makes more sense.
> 
> Signed-Off-by: Daniel Vetter <daniel.vet...@ffwll.ch>

Bikeshed:
While doing all this, I think put/get irq is really terribly named. I
was a much bigger fan of the enable disable.

Also, you could use a bit of flow control to write to the correct IMR
register and not duplicate functions at all. You already do the
POSTING_READ so performance shouldn't matter.

Something like...

uint32_t imr = GEN(dev) >= 5 ? GTIMR: IMR;

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to