aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/nv50_display.c
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2011-01-26 11:49:18 -0500
committerBen Skeggs <bskeggs@redhat.com>2011-02-24 15:44:36 -0500
commitd82f8e6c802bb1244ce590d3877f7c66a8fb0ff0 (patch)
treecb7294e91455667978b9f01d4dcffe151f3bdd7e /drivers/gpu/drm/nouveau/nv50_display.c
parentf17811dfa7f07e3df6d0e3c4ab4af8eb47e8fabc (diff)
drm/nouveau: use system_wq instead of dev_priv->wq
With cmwq, there's no reason for nouveau to use a dedicated workqueue. Drop dev_priv->wq and use system_wq instead. Each work item is sync flushed when the containing structure is unregistered/destroyed. Note that this change also makes sure that nv50_gpio_handler is not freed while the contained work item is still running. Signed-off-by: Tejun Heo <tj@kernel.org> Cc: David Airlie <airlied@linux.ie> Cc: dri-devel@lists.freedesktop.org Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nv50_display.c')
-rw-r--r--drivers/gpu/drm/nouveau/nv50_display.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/gpu/drm/nouveau/nv50_display.c b/drivers/gpu/drm/nouveau/nv50_display.c
index 5096f2f45df8..a804a350800e 100644
--- a/drivers/gpu/drm/nouveau/nv50_display.c
+++ b/drivers/gpu/drm/nouveau/nv50_display.c
@@ -345,12 +345,15 @@ int nv50_display_create(struct drm_device *dev)
345void 345void
346nv50_display_destroy(struct drm_device *dev) 346nv50_display_destroy(struct drm_device *dev)
347{ 347{
348 struct drm_nouveau_private *dev_priv = dev->dev_private;
349
348 NV_DEBUG_KMS(dev, "\n"); 350 NV_DEBUG_KMS(dev, "\n");
349 351
350 drm_mode_config_cleanup(dev); 352 drm_mode_config_cleanup(dev);
351 353
352 nv50_display_disable(dev); 354 nv50_display_disable(dev);
353 nouveau_irq_unregister(dev, 26); 355 nouveau_irq_unregister(dev, 26);
356 flush_work_sync(&dev_priv->irq_work);
354} 357}
355 358
356static u16 359static u16
@@ -836,7 +839,7 @@ nv50_display_isr(struct drm_device *dev)
836 if (clock) { 839 if (clock) {
837 nv_wr32(dev, NV03_PMC_INTR_EN_0, 0); 840 nv_wr32(dev, NV03_PMC_INTR_EN_0, 0);
838 if (!work_pending(&dev_priv->irq_work)) 841 if (!work_pending(&dev_priv->irq_work))
839 queue_work(dev_priv->wq, &dev_priv->irq_work); 842 schedule_work(&dev_priv->irq_work);
840 delayed |= clock; 843 delayed |= clock;
841 intr1 &= ~clock; 844 intr1 &= ~clock;
842 } 845 }