From: Chris Wilson <chris@chris-wilson.co.uk>
To: Ben Widawsky <ben@bwidawsk.net>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915: Use chipset-specific irq installers
Date: Tue, 28 Jun 2011 19:01:07 +0100 [thread overview]
Message-ID: <1309284064_35257@CP5-2952> (raw)
In-Reply-To: <20110628174857.GA3022@snipes.kumite>
On Tue, 28 Jun 2011 10:48:57 -0700, Ben Widawsky <ben@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
prev parent reply other threads:[~2011-06-28 18:01 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-28 10:48 [PATCH] drm/i915: Use chipset-specific irq installers Chris Wilson
2011-06-28 17:48 ` Ben Widawsky
2011-06-28 17:56 ` Keith Packard
2011-06-28 18:01 ` Chris Wilson [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1309284064_35257@CP5-2952 \
--to=chris@chris-wilson.co.uk \
--cc=ben@bwidawsk.net \
--cc=intel-gfx@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.