[Intel-gfx] [PATCH] drm/i915: fix user irq miss in BSD ring on g4x

Keith Packard keithp at keithp.com
Fri May 13 17:07:57 CEST 2011


On Tue,  3 May 2011 12:42:24 +0800, "Feng, Boqun" <boqun.feng at intel.com> wrote:
> On g4x, user interrupt in BSD ring is missed.
> g4x and ironlake share the same bsd_ring, but their interrupt control
> interfaces are different. On g4x i915_enable_irq and i915_disable_irq
> are used to enable/disable irq,and user interrupt flag in BSD ring on
> g4x is I915_BSD_USER_INTERRUPT.
> The ring_get_irq and ring_put_irq use ironlake style interrupt control
> interface. So rather than use them, expand their code and add an if-else
> statement about the device version.

Please don't open-code ring_get_irq here. I'd suggest a cleaner fix
would be to either just conditionally call ring_get_irq, or to stick the
BSD interrupt value in dev_priv where you can get it:

        if (IS_G4X(dev))
                ring_get_irq(ring, I915_BSD_USER_INTERRUPT);
        else
                ring_get_irq(ring, GT_BSD_USER_INTERRUPT);

or
        ring_get_irq(ring, dev_priv->bsd_user_interrupt);

-- 
keith.packard at intel.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/intel-gfx/attachments/20110513/31ad8a34/attachment.sig>


More information about the Intel-gfx mailing list