[Intel-gfx] [PATCH] drm/i915: Use chipset-specific irq installers

Chris Wilson chris at chris-wilson.co.uk
Tue Jun 28 20:01:07 CEST 2011


On Tue, 28 Jun 2011 10:48:57 -0700, Ben Widawsky <ben at bwidawsk.net> wrote:
> I'm not totally thrilled with the name. It would make more sense to me
> if you had something like:
> if (!is_irq_enabled(ring)) {
> 	DRM_ERROR(...);
> 	dev->driver->irq_preinstall(ring->dev);
> 	dev->driver->irq_postinstall(ring->dev);
> }
> 
> This allows allows for error checking at other points without changing
> state.
> 
> I'm very nitpicky when it comes to the work assert :p

*g* I was just following the idiom Jesse started with his
assert_plane_enabled() and friends. :)

You're right that expressed as a predicate function with a separate fixup
routine this would be more useful, but more so is idiomatic programming...

Feel free to supplement the code with more error checking! :)
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre



More information about the Intel-gfx mailing list