diff options
Diffstat (limited to 'drivers/char/drm/via_irq.c')
-rw-r--r-- | drivers/char/drm/via_irq.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/char/drm/via_irq.c b/drivers/char/drm/via_irq.c index 6152415644e9..c33d068cde19 100644 --- a/drivers/char/drm/via_irq.c +++ b/drivers/char/drm/via_irq.c | |||
@@ -196,9 +196,9 @@ via_driver_irq_wait(drm_device_t * dev, unsigned int irq, int force_sequence, | |||
196 | { | 196 | { |
197 | drm_via_private_t *dev_priv = (drm_via_private_t *) dev->dev_private; | 197 | drm_via_private_t *dev_priv = (drm_via_private_t *) dev->dev_private; |
198 | unsigned int cur_irq_sequence; | 198 | unsigned int cur_irq_sequence; |
199 | drm_via_irq_t *cur_irq = dev_priv->via_irqs; | 199 | drm_via_irq_t *cur_irq; |
200 | int ret = 0; | 200 | int ret = 0; |
201 | maskarray_t *masks = dev_priv->irq_masks; | 201 | maskarray_t *masks; |
202 | int real_irq; | 202 | int real_irq; |
203 | 203 | ||
204 | DRM_DEBUG("%s\n", __FUNCTION__); | 204 | DRM_DEBUG("%s\n", __FUNCTION__); |
@@ -221,8 +221,9 @@ via_driver_irq_wait(drm_device_t * dev, unsigned int irq, int force_sequence, | |||
221 | __FUNCTION__, irq); | 221 | __FUNCTION__, irq); |
222 | return DRM_ERR(EINVAL); | 222 | return DRM_ERR(EINVAL); |
223 | } | 223 | } |
224 | 224 | ||
225 | cur_irq += real_irq; | 225 | masks = dev_priv->irq_masks; |
226 | cur_irq = dev_priv->via_irqs + real_irq; | ||
226 | 227 | ||
227 | if (masks[real_irq][2] && !force_sequence) { | 228 | if (masks[real_irq][2] && !force_sequence) { |
228 | DRM_WAIT_ON(ret, cur_irq->irq_queue, 3 * DRM_HZ, | 229 | DRM_WAIT_ON(ret, cur_irq->irq_queue, 3 * DRM_HZ, |
@@ -247,11 +248,12 @@ void via_driver_irq_preinstall(drm_device_t * dev) | |||
247 | { | 248 | { |
248 | drm_via_private_t *dev_priv = (drm_via_private_t *) dev->dev_private; | 249 | drm_via_private_t *dev_priv = (drm_via_private_t *) dev->dev_private; |
249 | u32 status; | 250 | u32 status; |
250 | drm_via_irq_t *cur_irq = dev_priv->via_irqs; | 251 | drm_via_irq_t *cur_irq; |
251 | int i; | 252 | int i; |
252 | 253 | ||
253 | DRM_DEBUG("driver_irq_preinstall: dev_priv: %p\n", dev_priv); | 254 | DRM_DEBUG("driver_irq_preinstall: dev_priv: %p\n", dev_priv); |
254 | if (dev_priv) { | 255 | if (dev_priv) { |
256 | cur_irq = dev_priv->via_irqs; | ||
255 | 257 | ||
256 | dev_priv->irq_enable_mask = VIA_IRQ_VBLANK_ENABLE; | 258 | dev_priv->irq_enable_mask = VIA_IRQ_VBLANK_ENABLE; |
257 | dev_priv->irq_pending_mask = VIA_IRQ_VBLANK_PENDING; | 259 | dev_priv->irq_pending_mask = VIA_IRQ_VBLANK_PENDING; |