diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2013-12-11 05:34:43 -0500 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2013-12-17 20:34:13 -0500 |
commit | 57ed0f7b4375f4cb0ec3eccbc81f262294eefbcd (patch) | |
tree | 935ea0949b91080532de66d1d74f8a97a4c81223 | |
parent | e9f0d76f3bcd4dda7136baaaaf45bda3b13ff40f (diff) |
drm: Kill DRM_WAKUP and DRM_INIT_WAITQUEUE
Less yelling ftw!
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Dave Airlie <airlied@redhat.com>
-rw-r--r-- | drivers/gpu/drm/drm_irq.c | 6 | ||||
-rw-r--r-- | drivers/gpu/drm/exynos/exynos_drm_fimd.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/exynos/exynos_mixer.c | 4 | ||||
-rw-r--r-- | drivers/gpu/drm/mga/mga_irq.c | 4 | ||||
-rw-r--r-- | drivers/gpu/drm/omapdrm/omap_irq.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_irq.c | 4 | ||||
-rw-r--r-- | drivers/gpu/drm/via/via_dmablit.c | 10 | ||||
-rw-r--r-- | drivers/gpu/drm/via/via_irq.c | 4 | ||||
-rw-r--r-- | drivers/gpu/drm/via/via_video.c | 6 | ||||
-rw-r--r-- | include/drm/drm_os_linux.h | 3 |
10 files changed, 21 insertions, 24 deletions
diff --git a/drivers/gpu/drm/drm_irq.c b/drivers/gpu/drm/drm_irq.c index b52ff052b785..e7de2da57234 100644 --- a/drivers/gpu/drm/drm_irq.c +++ b/drivers/gpu/drm/drm_irq.c | |||
@@ -368,7 +368,7 @@ int drm_irq_uninstall(struct drm_device *dev) | |||
368 | if (dev->num_crtcs) { | 368 | if (dev->num_crtcs) { |
369 | spin_lock_irqsave(&dev->vbl_lock, irqflags); | 369 | spin_lock_irqsave(&dev->vbl_lock, irqflags); |
370 | for (i = 0; i < dev->num_crtcs; i++) { | 370 | for (i = 0; i < dev->num_crtcs; i++) { |
371 | DRM_WAKEUP(&dev->vblank[i].queue); | 371 | wake_up(&dev->vblank[i].queue); |
372 | dev->vblank[i].enabled = false; | 372 | dev->vblank[i].enabled = false; |
373 | dev->vblank[i].last = | 373 | dev->vblank[i].last = |
374 | dev->driver->get_vblank_counter(dev, i); | 374 | dev->driver->get_vblank_counter(dev, i); |
@@ -980,7 +980,7 @@ void drm_vblank_off(struct drm_device *dev, int crtc) | |||
980 | 980 | ||
981 | spin_lock_irqsave(&dev->vbl_lock, irqflags); | 981 | spin_lock_irqsave(&dev->vbl_lock, irqflags); |
982 | vblank_disable_and_save(dev, crtc); | 982 | vblank_disable_and_save(dev, crtc); |
983 | DRM_WAKEUP(&dev->vblank[crtc].queue); | 983 | wake_up(&dev->vblank[crtc].queue); |
984 | 984 | ||
985 | /* Send any queued vblank events, lest the natives grow disquiet */ | 985 | /* Send any queued vblank events, lest the natives grow disquiet */ |
986 | seq = drm_vblank_count_and_time(dev, crtc, &now); | 986 | seq = drm_vblank_count_and_time(dev, crtc, &now); |
@@ -1363,7 +1363,7 @@ bool drm_handle_vblank(struct drm_device *dev, int crtc) | |||
1363 | crtc, (int) diff_ns); | 1363 | crtc, (int) diff_ns); |
1364 | } | 1364 | } |
1365 | 1365 | ||
1366 | DRM_WAKEUP(&dev->vblank[crtc].queue); | 1366 | wake_up(&dev->vblank[crtc].queue); |
1367 | drm_handle_vblank_events(dev, crtc); | 1367 | drm_handle_vblank_events(dev, crtc); |
1368 | 1368 | ||
1369 | spin_unlock_irqrestore(&dev->vblank_time_lock, irqflags); | 1369 | spin_unlock_irqrestore(&dev->vblank_time_lock, irqflags); |
diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimd.c b/drivers/gpu/drm/exynos/exynos_drm_fimd.c index a61878bf5dcd..267aca91b70d 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_fimd.c +++ b/drivers/gpu/drm/exynos/exynos_drm_fimd.c | |||
@@ -954,7 +954,7 @@ static int fimd_probe(struct platform_device *pdev) | |||
954 | } | 954 | } |
955 | 955 | ||
956 | ctx->driver_data = drm_fimd_get_driver_data(pdev); | 956 | ctx->driver_data = drm_fimd_get_driver_data(pdev); |
957 | DRM_INIT_WAITQUEUE(&ctx->wait_vsync_queue); | 957 | init_waitqueue_head(&ctx->wait_vsync_queue); |
958 | atomic_set(&ctx->wait_vsync_event, 0); | 958 | atomic_set(&ctx->wait_vsync_event, 0); |
959 | 959 | ||
960 | subdrv = &ctx->subdrv; | 960 | subdrv = &ctx->subdrv; |
diff --git a/drivers/gpu/drm/exynos/exynos_mixer.c b/drivers/gpu/drm/exynos/exynos_mixer.c index 1433300565e5..2dfa48c76f54 100644 --- a/drivers/gpu/drm/exynos/exynos_mixer.c +++ b/drivers/gpu/drm/exynos/exynos_mixer.c | |||
@@ -1019,7 +1019,7 @@ static irqreturn_t mixer_irq_handler(int irq, void *arg) | |||
1019 | /* set wait vsync event to zero and wake up queue. */ | 1019 | /* set wait vsync event to zero and wake up queue. */ |
1020 | if (atomic_read(&ctx->wait_vsync_event)) { | 1020 | if (atomic_read(&ctx->wait_vsync_event)) { |
1021 | atomic_set(&ctx->wait_vsync_event, 0); | 1021 | atomic_set(&ctx->wait_vsync_event, 0); |
1022 | DRM_WAKEUP(&ctx->wait_vsync_queue); | 1022 | wake_up(&ctx->wait_vsync_queue); |
1023 | } | 1023 | } |
1024 | } | 1024 | } |
1025 | 1025 | ||
@@ -1209,7 +1209,7 @@ static int mixer_probe(struct platform_device *pdev) | |||
1209 | drm_hdmi_ctx->ctx = (void *)ctx; | 1209 | drm_hdmi_ctx->ctx = (void *)ctx; |
1210 | ctx->vp_enabled = drv->is_vp_enabled; | 1210 | ctx->vp_enabled = drv->is_vp_enabled; |
1211 | ctx->mxr_ver = drv->version; | 1211 | ctx->mxr_ver = drv->version; |
1212 | DRM_INIT_WAITQUEUE(&ctx->wait_vsync_queue); | 1212 | init_waitqueue_head(&ctx->wait_vsync_queue); |
1213 | atomic_set(&ctx->wait_vsync_event, 0); | 1213 | atomic_set(&ctx->wait_vsync_event, 0); |
1214 | 1214 | ||
1215 | platform_set_drvdata(pdev, drm_hdmi_ctx); | 1215 | platform_set_drvdata(pdev, drm_hdmi_ctx); |
diff --git a/drivers/gpu/drm/mga/mga_irq.c b/drivers/gpu/drm/mga/mga_irq.c index 14c0e3ca2b07..1b071b8ff9dc 100644 --- a/drivers/gpu/drm/mga/mga_irq.c +++ b/drivers/gpu/drm/mga/mga_irq.c | |||
@@ -79,7 +79,7 @@ irqreturn_t mga_driver_irq_handler(int irq, void *arg) | |||
79 | MGA_WRITE(MGA_PRIMEND, prim_end); | 79 | MGA_WRITE(MGA_PRIMEND, prim_end); |
80 | 80 | ||
81 | atomic_inc(&dev_priv->last_fence_retired); | 81 | atomic_inc(&dev_priv->last_fence_retired); |
82 | DRM_WAKEUP(&dev_priv->fence_queue); | 82 | wake_up(&dev_priv->fence_queue); |
83 | handled = 1; | 83 | handled = 1; |
84 | } | 84 | } |
85 | 85 | ||
@@ -151,7 +151,7 @@ int mga_driver_irq_postinstall(struct drm_device *dev) | |||
151 | { | 151 | { |
152 | drm_mga_private_t *dev_priv = (drm_mga_private_t *) dev->dev_private; | 152 | drm_mga_private_t *dev_priv = (drm_mga_private_t *) dev->dev_private; |
153 | 153 | ||
154 | DRM_INIT_WAITQUEUE(&dev_priv->fence_queue); | 154 | init_waitqueue_head(&dev_priv->fence_queue); |
155 | 155 | ||
156 | /* Turn on soft trap interrupt. Vertical blank interrupts are enabled | 156 | /* Turn on soft trap interrupt. Vertical blank interrupts are enabled |
157 | * in mga_enable_vblank. | 157 | * in mga_enable_vblank. |
diff --git a/drivers/gpu/drm/omapdrm/omap_irq.c b/drivers/gpu/drm/omapdrm/omap_irq.c index 615bea967337..0e5336e5a791 100644 --- a/drivers/gpu/drm/omapdrm/omap_irq.c +++ b/drivers/gpu/drm/omapdrm/omap_irq.c | |||
@@ -308,7 +308,7 @@ int omap_drm_irq_uninstall(struct drm_device *dev) | |||
308 | if (dev->num_crtcs) { | 308 | if (dev->num_crtcs) { |
309 | spin_lock_irqsave(&dev->vbl_lock, irqflags); | 309 | spin_lock_irqsave(&dev->vbl_lock, irqflags); |
310 | for (i = 0; i < dev->num_crtcs; i++) { | 310 | for (i = 0; i < dev->num_crtcs; i++) { |
311 | DRM_WAKEUP(&dev->vblank[i].queue); | 311 | wake_up(&dev->vblank[i].queue); |
312 | dev->vblank[i].enabled = false; | 312 | dev->vblank[i].enabled = false; |
313 | dev->vblank[i].last = | 313 | dev->vblank[i].last = |
314 | dev->driver->get_vblank_counter(dev, i); | 314 | dev->driver->get_vblank_counter(dev, i); |
diff --git a/drivers/gpu/drm/radeon/radeon_irq.c b/drivers/gpu/drm/radeon/radeon_irq.c index 22fa979163fd..ded2f0564b83 100644 --- a/drivers/gpu/drm/radeon/radeon_irq.c +++ b/drivers/gpu/drm/radeon/radeon_irq.c | |||
@@ -203,7 +203,7 @@ irqreturn_t radeon_driver_irq_handler(int irq, void *arg) | |||
203 | 203 | ||
204 | /* SW interrupt */ | 204 | /* SW interrupt */ |
205 | if (stat & RADEON_SW_INT_TEST) | 205 | if (stat & RADEON_SW_INT_TEST) |
206 | DRM_WAKEUP(&dev_priv->swi_queue); | 206 | wake_up(&dev_priv->swi_queue); |
207 | 207 | ||
208 | /* VBLANK interrupt */ | 208 | /* VBLANK interrupt */ |
209 | if ((dev_priv->flags & RADEON_FAMILY_MASK) >= CHIP_RS600) { | 209 | if ((dev_priv->flags & RADEON_FAMILY_MASK) >= CHIP_RS600) { |
@@ -354,7 +354,7 @@ int radeon_driver_irq_postinstall(struct drm_device *dev) | |||
354 | (drm_radeon_private_t *) dev->dev_private; | 354 | (drm_radeon_private_t *) dev->dev_private; |
355 | 355 | ||
356 | atomic_set(&dev_priv->swi_emitted, 0); | 356 | atomic_set(&dev_priv->swi_emitted, 0); |
357 | DRM_INIT_WAITQUEUE(&dev_priv->swi_queue); | 357 | init_waitqueue_head(&dev_priv->swi_queue); |
358 | 358 | ||
359 | dev->max_vblank_count = 0x001fffff; | 359 | dev->max_vblank_count = 0x001fffff; |
360 | 360 | ||
diff --git a/drivers/gpu/drm/via/via_dmablit.c b/drivers/gpu/drm/via/via_dmablit.c index 9236ef1de270..694b9954cbbc 100644 --- a/drivers/gpu/drm/via/via_dmablit.c +++ b/drivers/gpu/drm/via/via_dmablit.c | |||
@@ -338,7 +338,7 @@ via_dmablit_handler(struct drm_device *dev, int engine, int from_irq) | |||
338 | 338 | ||
339 | blitq->blits[cur]->aborted = blitq->aborting; | 339 | blitq->blits[cur]->aborted = blitq->aborting; |
340 | blitq->done_blit_handle++; | 340 | blitq->done_blit_handle++; |
341 | DRM_WAKEUP(blitq->blit_queue + cur); | 341 | wake_up(blitq->blit_queue + cur); |
342 | 342 | ||
343 | cur++; | 343 | cur++; |
344 | if (cur >= VIA_NUM_BLIT_SLOTS) | 344 | if (cur >= VIA_NUM_BLIT_SLOTS) |
@@ -521,7 +521,7 @@ via_dmablit_workqueue(struct work_struct *work) | |||
521 | 521 | ||
522 | spin_unlock_irqrestore(&blitq->blit_lock, irqsave); | 522 | spin_unlock_irqrestore(&blitq->blit_lock, irqsave); |
523 | 523 | ||
524 | DRM_WAKEUP(&blitq->busy_queue); | 524 | wake_up(&blitq->busy_queue); |
525 | 525 | ||
526 | via_free_sg_info(dev->pdev, cur_sg); | 526 | via_free_sg_info(dev->pdev, cur_sg); |
527 | kfree(cur_sg); | 527 | kfree(cur_sg); |
@@ -561,8 +561,8 @@ via_init_dmablit(struct drm_device *dev) | |||
561 | blitq->aborting = 0; | 561 | blitq->aborting = 0; |
562 | spin_lock_init(&blitq->blit_lock); | 562 | spin_lock_init(&blitq->blit_lock); |
563 | for (j = 0; j < VIA_NUM_BLIT_SLOTS; ++j) | 563 | for (j = 0; j < VIA_NUM_BLIT_SLOTS; ++j) |
564 | DRM_INIT_WAITQUEUE(blitq->blit_queue + j); | 564 | init_waitqueue_head(blitq->blit_queue + j); |
565 | DRM_INIT_WAITQUEUE(&blitq->busy_queue); | 565 | init_waitqueue_head(&blitq->busy_queue); |
566 | INIT_WORK(&blitq->wq, via_dmablit_workqueue); | 566 | INIT_WORK(&blitq->wq, via_dmablit_workqueue); |
567 | setup_timer(&blitq->poll_timer, via_dmablit_timer, | 567 | setup_timer(&blitq->poll_timer, via_dmablit_timer, |
568 | (unsigned long)blitq); | 568 | (unsigned long)blitq); |
@@ -713,7 +713,7 @@ via_dmablit_release_slot(drm_via_blitq_t *blitq) | |||
713 | spin_lock_irqsave(&blitq->blit_lock, irqsave); | 713 | spin_lock_irqsave(&blitq->blit_lock, irqsave); |
714 | blitq->num_free++; | 714 | blitq->num_free++; |
715 | spin_unlock_irqrestore(&blitq->blit_lock, irqsave); | 715 | spin_unlock_irqrestore(&blitq->blit_lock, irqsave); |
716 | DRM_WAKEUP(&blitq->busy_queue); | 716 | wake_up(&blitq->busy_queue); |
717 | } | 717 | } |
718 | 718 | ||
719 | /* | 719 | /* |
diff --git a/drivers/gpu/drm/via/via_irq.c b/drivers/gpu/drm/via/via_irq.c index 85a4cb955204..1319433816d3 100644 --- a/drivers/gpu/drm/via/via_irq.c +++ b/drivers/gpu/drm/via/via_irq.c | |||
@@ -138,7 +138,7 @@ irqreturn_t via_driver_irq_handler(int irq, void *arg) | |||
138 | for (i = 0; i < dev_priv->num_irqs; ++i) { | 138 | for (i = 0; i < dev_priv->num_irqs; ++i) { |
139 | if (status & cur_irq->pending_mask) { | 139 | if (status & cur_irq->pending_mask) { |
140 | atomic_inc(&cur_irq->irq_received); | 140 | atomic_inc(&cur_irq->irq_received); |
141 | DRM_WAKEUP(&cur_irq->irq_queue); | 141 | wake_up(&cur_irq->irq_queue); |
142 | handled = 1; | 142 | handled = 1; |
143 | if (dev_priv->irq_map[drm_via_irq_dma0_td] == i) | 143 | if (dev_priv->irq_map[drm_via_irq_dma0_td] == i) |
144 | via_dmablit_handler(dev, 0, 1); | 144 | via_dmablit_handler(dev, 0, 1); |
@@ -287,7 +287,7 @@ void via_driver_irq_preinstall(struct drm_device *dev) | |||
287 | atomic_set(&cur_irq->irq_received, 0); | 287 | atomic_set(&cur_irq->irq_received, 0); |
288 | cur_irq->enable_mask = dev_priv->irq_masks[i][0]; | 288 | cur_irq->enable_mask = dev_priv->irq_masks[i][0]; |
289 | cur_irq->pending_mask = dev_priv->irq_masks[i][1]; | 289 | cur_irq->pending_mask = dev_priv->irq_masks[i][1]; |
290 | DRM_INIT_WAITQUEUE(&cur_irq->irq_queue); | 290 | init_waitqueue_head(&cur_irq->irq_queue); |
291 | dev_priv->irq_enable_mask |= cur_irq->enable_mask; | 291 | dev_priv->irq_enable_mask |= cur_irq->enable_mask; |
292 | dev_priv->irq_pending_mask |= cur_irq->pending_mask; | 292 | dev_priv->irq_pending_mask |= cur_irq->pending_mask; |
293 | cur_irq++; | 293 | cur_irq++; |
diff --git a/drivers/gpu/drm/via/via_video.c b/drivers/gpu/drm/via/via_video.c index f60cfb654428..a9ffbad1cfdd 100644 --- a/drivers/gpu/drm/via/via_video.c +++ b/drivers/gpu/drm/via/via_video.c | |||
@@ -36,7 +36,7 @@ void via_init_futex(drm_via_private_t *dev_priv) | |||
36 | DRM_DEBUG("\n"); | 36 | DRM_DEBUG("\n"); |
37 | 37 | ||
38 | for (i = 0; i < VIA_NR_XVMC_LOCKS; ++i) { | 38 | for (i = 0; i < VIA_NR_XVMC_LOCKS; ++i) { |
39 | DRM_INIT_WAITQUEUE(&(dev_priv->decoder_queue[i])); | 39 | init_waitqueue_head(&(dev_priv->decoder_queue[i])); |
40 | XVMCLOCKPTR(dev_priv->sarea_priv, i)->lock = 0; | 40 | XVMCLOCKPTR(dev_priv->sarea_priv, i)->lock = 0; |
41 | } | 41 | } |
42 | } | 42 | } |
@@ -58,7 +58,7 @@ void via_release_futex(drm_via_private_t *dev_priv, int context) | |||
58 | if ((_DRM_LOCKING_CONTEXT(*lock) == context)) { | 58 | if ((_DRM_LOCKING_CONTEXT(*lock) == context)) { |
59 | if (_DRM_LOCK_IS_HELD(*lock) | 59 | if (_DRM_LOCK_IS_HELD(*lock) |
60 | && (*lock & _DRM_LOCK_CONT)) { | 60 | && (*lock & _DRM_LOCK_CONT)) { |
61 | DRM_WAKEUP(&(dev_priv->decoder_queue[i])); | 61 | wake_up(&(dev_priv->decoder_queue[i])); |
62 | } | 62 | } |
63 | *lock = 0; | 63 | *lock = 0; |
64 | } | 64 | } |
@@ -86,7 +86,7 @@ int via_decoder_futex(struct drm_device *dev, void *data, struct drm_file *file_ | |||
86 | (fx->ms / 10) * (HZ / 100), *lock != fx->val); | 86 | (fx->ms / 10) * (HZ / 100), *lock != fx->val); |
87 | return ret; | 87 | return ret; |
88 | case VIA_FUTEX_WAKE: | 88 | case VIA_FUTEX_WAKE: |
89 | DRM_WAKEUP(&(dev_priv->decoder_queue[fx->lock])); | 89 | wake_up(&(dev_priv->decoder_queue[fx->lock])); |
90 | return 0; | 90 | return 0; |
91 | } | 91 | } |
92 | return 0; | 92 | return 0; |
diff --git a/include/drm/drm_os_linux.h b/include/drm/drm_os_linux.h index 2794cfeb4dfb..cf12233ef7ed 100644 --- a/include/drm/drm_os_linux.h +++ b/include/drm/drm_os_linux.h | |||
@@ -78,6 +78,3 @@ do { \ | |||
78 | __set_current_state(TASK_RUNNING); \ | 78 | __set_current_state(TASK_RUNNING); \ |
79 | remove_wait_queue(&(queue), &entry); \ | 79 | remove_wait_queue(&(queue), &entry); \ |
80 | } while (0) | 80 | } while (0) |
81 | |||
82 | #define DRM_WAKEUP( queue ) wake_up( queue ) | ||
83 | #define DRM_INIT_WAITQUEUE( queue ) init_waitqueue_head( queue ) | ||