aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/drm/via_dmablit.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char/drm/via_dmablit.c')
-rw-r--r--drivers/char/drm/via_dmablit.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/drivers/char/drm/via_dmablit.c b/drivers/char/drm/via_dmablit.c
index 2054d5773717..2881a06b6f55 100644
--- a/drivers/char/drm/via_dmablit.c
+++ b/drivers/char/drm/via_dmablit.c
@@ -376,10 +376,8 @@ via_dmablit_handler(drm_device_t *dev, int engine, int from_irq)
376 blitq->cur = cur; 376 blitq->cur = cur;
377 blitq->num_outstanding--; 377 blitq->num_outstanding--;
378 blitq->end = jiffies + DRM_HZ; 378 blitq->end = jiffies + DRM_HZ;
379 if (!timer_pending(&blitq->poll_timer)) { 379 if (!timer_pending(&blitq->poll_timer))
380 blitq->poll_timer.expires = jiffies+1; 380 mod_timer(&blitq->poll_timer, jiffies + 1);
381 add_timer(&blitq->poll_timer);
382 }
383 } else { 381 } else {
384 if (timer_pending(&blitq->poll_timer)) { 382 if (timer_pending(&blitq->poll_timer)) {
385 del_timer(&blitq->poll_timer); 383 del_timer(&blitq->poll_timer);
@@ -478,8 +476,7 @@ via_dmablit_timer(unsigned long data)
478 via_dmablit_handler(dev, engine, 0); 476 via_dmablit_handler(dev, engine, 0);
479 477
480 if (!timer_pending(&blitq->poll_timer)) { 478 if (!timer_pending(&blitq->poll_timer)) {
481 blitq->poll_timer.expires = jiffies+1; 479 mod_timer(&blitq->poll_timer, jiffies + 1);
482 add_timer(&blitq->poll_timer);
483 480
484 /* 481 /*
485 * Rerun handler to delete timer if engines are off, and 482 * Rerun handler to delete timer if engines are off, and
@@ -574,9 +571,8 @@ via_init_dmablit(drm_device_t *dev)
574 } 571 }
575 DRM_INIT_WAITQUEUE(&blitq->busy_queue); 572 DRM_INIT_WAITQUEUE(&blitq->busy_queue);
576 INIT_WORK(&blitq->wq, via_dmablit_workqueue); 573 INIT_WORK(&blitq->wq, via_dmablit_workqueue);
577 init_timer(&blitq->poll_timer); 574 setup_timer(&blitq->poll_timer, via_dmablit_timer,
578 blitq->poll_timer.function = &via_dmablit_timer; 575 (unsigned long)blitq);
579 blitq->poll_timer.data = (unsigned long) blitq;
580 } 576 }
581} 577}
582 578