diff options
author | Tejun Heo <tj@kernel.org> | 2011-01-26 11:49:18 -0500 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2011-02-24 15:44:36 -0500 |
commit | d82f8e6c802bb1244ce590d3877f7c66a8fb0ff0 (patch) | |
tree | cb7294e91455667978b9f01d4dcffe151f3bdd7e /drivers/gpu/drm/nouveau/nouveau_state.c | |
parent | f17811dfa7f07e3df6d0e3c4ab4af8eb47e8fabc (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/nouveau_state.c')
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_state.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_state.c b/drivers/gpu/drm/nouveau/nouveau_state.c index 2148d01354d..805c0b3fcdb 100644 --- a/drivers/gpu/drm/nouveau/nouveau_state.c +++ b/drivers/gpu/drm/nouveau/nouveau_state.c | |||
@@ -929,12 +929,6 @@ int nouveau_load(struct drm_device *dev, unsigned long flags) | |||
929 | NV_DEBUG(dev, "vendor: 0x%X device: 0x%X class: 0x%X\n", | 929 | NV_DEBUG(dev, "vendor: 0x%X device: 0x%X class: 0x%X\n", |
930 | dev->pci_vendor, dev->pci_device, dev->pdev->class); | 930 | dev->pci_vendor, dev->pci_device, dev->pdev->class); |
931 | 931 | ||
932 | dev_priv->wq = create_workqueue("nouveau"); | ||
933 | if (!dev_priv->wq) { | ||
934 | ret = -EINVAL; | ||
935 | goto err_priv; | ||
936 | } | ||
937 | |||
938 | /* resource 0 is mmio regs */ | 932 | /* resource 0 is mmio regs */ |
939 | /* resource 1 is linear FB */ | 933 | /* resource 1 is linear FB */ |
940 | /* resource 2 is RAMIN (mmio regs + 0x1000000) */ | 934 | /* resource 2 is RAMIN (mmio regs + 0x1000000) */ |
@@ -947,7 +941,7 @@ int nouveau_load(struct drm_device *dev, unsigned long flags) | |||
947 | NV_ERROR(dev, "Unable to initialize the mmio mapping. " | 941 | NV_ERROR(dev, "Unable to initialize the mmio mapping. " |
948 | "Please report your setup to " DRIVER_EMAIL "\n"); | 942 | "Please report your setup to " DRIVER_EMAIL "\n"); |
949 | ret = -EINVAL; | 943 | ret = -EINVAL; |
950 | goto err_wq; | 944 | goto err_priv; |
951 | } | 945 | } |
952 | NV_DEBUG(dev, "regs mapped ok at 0x%llx\n", | 946 | NV_DEBUG(dev, "regs mapped ok at 0x%llx\n", |
953 | (unsigned long long)mmio_start_offs); | 947 | (unsigned long long)mmio_start_offs); |
@@ -1054,8 +1048,6 @@ err_ramin: | |||
1054 | iounmap(dev_priv->ramin); | 1048 | iounmap(dev_priv->ramin); |
1055 | err_mmio: | 1049 | err_mmio: |
1056 | iounmap(dev_priv->mmio); | 1050 | iounmap(dev_priv->mmio); |
1057 | err_wq: | ||
1058 | destroy_workqueue(dev_priv->wq); | ||
1059 | err_priv: | 1051 | err_priv: |
1060 | kfree(dev_priv); | 1052 | kfree(dev_priv); |
1061 | dev->dev_private = NULL; | 1053 | dev->dev_private = NULL; |