drm: remove agp_init() bus callback

The PCI bus helper is the only user of it. Call it directly before
device-registration to get rid of the callback.

Note that all drm_agp_*() calls are locked with the drm-global-mutex so we
need to explicitly lock it during initialization. It's not really clear
why it's needed, but lets be safe.

v2: Rebase on top of the agp_init interface change.

v3: Remove the rebase-fail where I've accidentally killed the ->irq_by_busid
callback a bit too early.

Cc: David Herrmann <dh.herrmann@gmail.com>
Signed-off-by: David Herrmann <dh.herrmann@gmail.com> (v1)
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Dave Airlie <airlied@redhat.com>
此提交包含在:
Daniel Vetter
2013-12-11 11:34:36 +01:00
提交者 Dave Airlie
父節點 d9906753bb
當前提交 2c695fa044
共有 3 個檔案被更改,包括 10 行新增11 行删除

查看文件

@@ -527,13 +527,10 @@ int drm_dev_register(struct drm_device *dev, unsigned long flags)
mutex_lock(&drm_global_mutex);
if (dev->driver->bus->agp_init)
dev->driver->bus->agp_init(dev);
if (drm_core_check_feature(dev, DRIVER_MODESET)) {
ret = drm_get_minor(dev, &dev->control, DRM_MINOR_CONTROL);
if (ret)
goto err_agp;
goto out_unlock;
}
if (drm_core_check_feature(dev, DRIVER_RENDER) && drm_rnodes) {
@@ -572,9 +569,6 @@ err_render_node:
drm_put_minor(dev->render);
err_control_node:
drm_put_minor(dev->control);
err_agp:
if (dev->driver->bus->agp_destroy)
dev->driver->bus->agp_destroy(dev);
out_unlock:
mutex_unlock(&drm_global_mutex);
return ret;