On Tue, 28 Jun 2011 10:48:57 -0700, Ben Widawsky <[email protected]> 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
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to