aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/drm_pci.c
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2013-12-11 05:34:39 -0500
committerDave Airlie <airlied@redhat.com>2013-12-17 20:27:29 -0500
commit8a5a80081a1cc8b4f7bdf777fde3d955a020481c (patch)
tree9e56b5cd9092dfdf209c8355f82a85296778ae1d /drivers/gpu/drm/drm_pci.c
parentd5e41ad3b947be2615e7d9102333e918d012c340 (diff)
drm: remove global_mutex locking around agp_init
David Herrmann dutifully moved this locking along when moving the agp_init call out of the generic drm_dev_register into the pci specific load helpers. But afaict there's no need and the reason for that locking has been purely a historical accident - we need the lock around the driver dev node registration to paper over the midlayer init races, and the agp init simply ended up in there. The real fix for all this is of course to delay the dev (and sysfs/debugfs) interface registration until everything is fully set up. Until then stop the cargo-cult locking from spreading and remove the locking. Cc: David Herrmann <dh.herrmann@gmail.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/drm_pci.c')
-rw-r--r--drivers/gpu/drm/drm_pci.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/drivers/gpu/drm/drm_pci.c b/drivers/gpu/drm/drm_pci.c
index 6dfae6b3c0bc..5736aaa7e86c 100644
--- a/drivers/gpu/drm/drm_pci.c
+++ b/drivers/gpu/drm/drm_pci.c
@@ -330,9 +330,7 @@ int drm_get_pci_dev(struct pci_dev *pdev, const struct pci_device_id *ent,
330 if (drm_core_check_feature(dev, DRIVER_MODESET)) 330 if (drm_core_check_feature(dev, DRIVER_MODESET))
331 pci_set_drvdata(pdev, dev); 331 pci_set_drvdata(pdev, dev);
332 332
333 mutex_lock(&drm_global_mutex);
334 drm_pci_agp_init(dev); 333 drm_pci_agp_init(dev);
335 mutex_unlock(&drm_global_mutex);
336 334
337 ret = drm_dev_register(dev, ent->driver_data); 335 ret = drm_dev_register(dev, ent->driver_data);
338 if (ret) 336 if (ret)
@@ -350,9 +348,7 @@ int drm_get_pci_dev(struct pci_dev *pdev, const struct pci_device_id *ent,
350 return 0; 348 return 0;
351 349
352err_agp: 350err_agp:
353 mutex_lock(&drm_global_mutex);
354 drm_pci_agp_destroy(dev); 351 drm_pci_agp_destroy(dev);
355 mutex_unlock(&drm_global_mutex);
356 pci_disable_device(pdev); 352 pci_disable_device(pdev);
357err_free: 353err_free:
358 drm_dev_free(dev); 354 drm_dev_free(dev);