aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm
diff options
context:
space:
mode:
authorDavid Herrmann <dh.herrmann@gmail.com>2014-08-29 06:12:43 -0400
committerDave Airlie <airlied@redhat.com>2014-09-10 03:43:04 -0400
commit915b4d11b8b9e7b84ba4a4645b6cc7fbc0c071cf (patch)
treec823f519117c5b1e8752626a59e2efd2565100ac /drivers/gpu/drm
parent1e444be0ef1bda2b180ecdedfa4c5d32bf236a5d (diff)
drm: add driver->set_busid() callback
One step closer to dropping all the drm_bus_* code: Add a driver->set_busid() callback and make all drivers use the generic helpers. Nouveau is the only driver that uses two different bus-types with the same drm_driver. This is totally broken if both buses are available on the same machine (unlikely, but lets be safe). Therefore, we create two different drivers for each platform during module_init() and set the set_busid() callback respectively. Signed-off-by: David Herrmann <dh.herrmann@gmail.com> Reviewed-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r--drivers/gpu/drm/armada/armada_drv.c1
-rw-r--r--drivers/gpu/drm/ast/ast_drv.c1
-rw-r--r--drivers/gpu/drm/bochs/bochs_drv.c1
-rw-r--r--drivers/gpu/drm/cirrus/cirrus_drv.c1
-rw-r--r--drivers/gpu/drm/drm_ioctl.c8
-rw-r--r--drivers/gpu/drm/drm_pci.c3
-rw-r--r--drivers/gpu/drm/drm_platform.c3
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_drv.c1
-rw-r--r--drivers/gpu/drm/gma500/psb_drv.c1
-rw-r--r--drivers/gpu/drm/i810/i810_drv.c1
-rw-r--r--drivers/gpu/drm/i915/i915_drv.c1
-rw-r--r--drivers/gpu/drm/mga/mga_drv.c1
-rw-r--r--drivers/gpu/drm/mgag200/mgag200_drv.c1
-rw-r--r--drivers/gpu/drm/msm/msm_drv.c1
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_drm.c19
-rw-r--r--drivers/gpu/drm/omapdrm/omap_drv.c1
-rw-r--r--drivers/gpu/drm/qxl/qxl_drv.c2
-rw-r--r--drivers/gpu/drm/r128/r128_drv.c1
-rw-r--r--drivers/gpu/drm/radeon/radeon_drv.c2
-rw-r--r--drivers/gpu/drm/rcar-du/rcar_du_drv.c1
-rw-r--r--drivers/gpu/drm/savage/savage_drv.c1
-rw-r--r--drivers/gpu/drm/shmobile/shmob_drm_drv.c1
-rw-r--r--drivers/gpu/drm/sis/sis_drv.c1
-rw-r--r--drivers/gpu/drm/tdfx/tdfx_drv.c1
-rw-r--r--drivers/gpu/drm/tilcdc/tilcdc_drv.c1
-rw-r--r--drivers/gpu/drm/udl/udl_drv.c6
-rw-r--r--drivers/gpu/drm/via/via_drv.c1
-rw-r--r--drivers/gpu/drm/vmwgfx/vmwgfx_drv.c1
28 files changed, 55 insertions, 9 deletions
diff --git a/drivers/gpu/drm/armada/armada_drv.c b/drivers/gpu/drm/armada/armada_drv.c
index e2d5792b140f..f672e6ad8afa 100644
--- a/drivers/gpu/drm/armada/armada_drv.c
+++ b/drivers/gpu/drm/armada/armada_drv.c
@@ -308,6 +308,7 @@ static struct drm_driver armada_drm_driver = {
308 .postclose = NULL, 308 .postclose = NULL,
309 .lastclose = armada_drm_lastclose, 309 .lastclose = armada_drm_lastclose,
310 .unload = armada_drm_unload, 310 .unload = armada_drm_unload,
311 .set_busid = drm_platform_set_busid,
311 .get_vblank_counter = drm_vblank_count, 312 .get_vblank_counter = drm_vblank_count,
312 .enable_vblank = armada_drm_enable_vblank, 313 .enable_vblank = armada_drm_enable_vblank,
313 .disable_vblank = armada_drm_disable_vblank, 314 .disable_vblank = armada_drm_disable_vblank,
diff --git a/drivers/gpu/drm/ast/ast_drv.c b/drivers/gpu/drm/ast/ast_drv.c
index f19682a93c24..9a32d9dfdd26 100644
--- a/drivers/gpu/drm/ast/ast_drv.c
+++ b/drivers/gpu/drm/ast/ast_drv.c
@@ -199,6 +199,7 @@ static struct drm_driver driver = {
199 199
200 .load = ast_driver_load, 200 .load = ast_driver_load,
201 .unload = ast_driver_unload, 201 .unload = ast_driver_unload,
202 .set_busid = drm_pci_set_busid,
202 203
203 .fops = &ast_fops, 204 .fops = &ast_fops,
204 .name = DRIVER_NAME, 205 .name = DRIVER_NAME,
diff --git a/drivers/gpu/drm/bochs/bochs_drv.c b/drivers/gpu/drm/bochs/bochs_drv.c
index 9738e9b14708..98837bde2d25 100644
--- a/drivers/gpu/drm/bochs/bochs_drv.c
+++ b/drivers/gpu/drm/bochs/bochs_drv.c
@@ -82,6 +82,7 @@ static struct drm_driver bochs_driver = {
82 .driver_features = DRIVER_GEM | DRIVER_MODESET, 82 .driver_features = DRIVER_GEM | DRIVER_MODESET,
83 .load = bochs_load, 83 .load = bochs_load,
84 .unload = bochs_unload, 84 .unload = bochs_unload,
85 .set_busid = drm_pci_set_busid,
85 .fops = &bochs_fops, 86 .fops = &bochs_fops,
86 .name = "bochs-drm", 87 .name = "bochs-drm",
87 .desc = "bochs dispi vga interface (qemu stdvga)", 88 .desc = "bochs dispi vga interface (qemu stdvga)",
diff --git a/drivers/gpu/drm/cirrus/cirrus_drv.c b/drivers/gpu/drm/cirrus/cirrus_drv.c
index 919c73b94447..e705335101a5 100644
--- a/drivers/gpu/drm/cirrus/cirrus_drv.c
+++ b/drivers/gpu/drm/cirrus/cirrus_drv.c
@@ -128,6 +128,7 @@ static struct drm_driver driver = {
128 .driver_features = DRIVER_MODESET | DRIVER_GEM, 128 .driver_features = DRIVER_MODESET | DRIVER_GEM,
129 .load = cirrus_driver_load, 129 .load = cirrus_driver_load,
130 .unload = cirrus_driver_unload, 130 .unload = cirrus_driver_unload,
131 .set_busid = drm_pci_set_busid,
131 .fops = &cirrus_driver_fops, 132 .fops = &cirrus_driver_fops,
132 .name = DRIVER_NAME, 133 .name = DRIVER_NAME,
133 .desc = DRIVER_DESC, 134 .desc = DRIVER_DESC,
diff --git a/drivers/gpu/drm/drm_ioctl.c b/drivers/gpu/drm/drm_ioctl.c
index cb6b54aebd6f..4770bd78b307 100644
--- a/drivers/gpu/drm/drm_ioctl.c
+++ b/drivers/gpu/drm/drm_ioctl.c
@@ -244,7 +244,13 @@ static int drm_set_busid(struct drm_device *dev, struct drm_file *file_priv)
244 if (master->unique != NULL) 244 if (master->unique != NULL)
245 drm_unset_busid(dev, master); 245 drm_unset_busid(dev, master);
246 246
247 if (dev->driver->bus && dev->driver->bus->set_busid) { 247 if (dev->driver->set_busid) {
248 ret = dev->driver->set_busid(dev, master);
249 if (ret) {
250 drm_unset_busid(dev, master);
251 return ret;
252 }
253 } else if (dev->driver->bus && dev->driver->bus->set_busid) {
248 ret = dev->driver->bus->set_busid(dev, master); 254 ret = dev->driver->bus->set_busid(dev, master);
249 if (ret) { 255 if (ret) {
250 drm_unset_busid(dev, master); 256 drm_unset_busid(dev, master);
diff --git a/drivers/gpu/drm/drm_pci.c b/drivers/gpu/drm/drm_pci.c
index e266927bb9f1..0400c371cbde 100644
--- a/drivers/gpu/drm/drm_pci.c
+++ b/drivers/gpu/drm/drm_pci.c
@@ -127,7 +127,7 @@ static int drm_get_pci_domain(struct drm_device *dev)
127 return pci_domain_nr(dev->pdev->bus); 127 return pci_domain_nr(dev->pdev->bus);
128} 128}
129 129
130static int drm_pci_set_busid(struct drm_device *dev, struct drm_master *master) 130int drm_pci_set_busid(struct drm_device *dev, struct drm_master *master)
131{ 131{
132 master->unique = kasprintf(GFP_KERNEL, "pci:%04x:%02x:%02x.%d", 132 master->unique = kasprintf(GFP_KERNEL, "pci:%04x:%02x:%02x.%d",
133 drm_get_pci_domain(dev), 133 drm_get_pci_domain(dev),
@@ -140,6 +140,7 @@ static int drm_pci_set_busid(struct drm_device *dev, struct drm_master *master)
140 master->unique_len = strlen(master->unique); 140 master->unique_len = strlen(master->unique);
141 return 0; 141 return 0;
142} 142}
143EXPORT_SYMBOL(drm_pci_set_busid);
143 144
144int drm_pci_set_unique(struct drm_device *dev, 145int drm_pci_set_unique(struct drm_device *dev,
145 struct drm_master *master, 146 struct drm_master *master,
diff --git a/drivers/gpu/drm/drm_platform.c b/drivers/gpu/drm/drm_platform.c
index f197a2b6911a..939cd2272b91 100644
--- a/drivers/gpu/drm/drm_platform.c
+++ b/drivers/gpu/drm/drm_platform.c
@@ -68,7 +68,7 @@ err_free:
68 return ret; 68 return ret;
69} 69}
70 70
71static int drm_platform_set_busid(struct drm_device *dev, struct drm_master *master) 71int drm_platform_set_busid(struct drm_device *dev, struct drm_master *master)
72{ 72{
73 int id; 73 int id;
74 74
@@ -84,6 +84,7 @@ static int drm_platform_set_busid(struct drm_device *dev, struct drm_master *mas
84 master->unique_len = strlen(master->unique); 84 master->unique_len = strlen(master->unique);
85 return 0; 85 return 0;
86} 86}
87EXPORT_SYMBOL(drm_platform_set_busid);
87 88
88static struct drm_bus drm_platform_bus = { 89static struct drm_bus drm_platform_bus = {
89 .set_busid = drm_platform_set_busid, 90 .set_busid = drm_platform_set_busid,
diff --git a/drivers/gpu/drm/exynos/exynos_drm_drv.c b/drivers/gpu/drm/exynos/exynos_drm_drv.c
index 0d74e9b99c4e..5aae95cf5b23 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_drv.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_drv.c
@@ -330,6 +330,7 @@ static struct drm_driver exynos_drm_driver = {
330 .preclose = exynos_drm_preclose, 330 .preclose = exynos_drm_preclose,
331 .lastclose = exynos_drm_lastclose, 331 .lastclose = exynos_drm_lastclose,
332 .postclose = exynos_drm_postclose, 332 .postclose = exynos_drm_postclose,
333 .set_busid = drm_platform_set_busid,
333 .get_vblank_counter = drm_vblank_count, 334 .get_vblank_counter = drm_vblank_count,
334 .enable_vblank = exynos_drm_crtc_enable_vblank, 335 .enable_vblank = exynos_drm_crtc_enable_vblank,
335 .disable_vblank = exynos_drm_crtc_disable_vblank, 336 .disable_vblank = exynos_drm_crtc_disable_vblank,
diff --git a/drivers/gpu/drm/gma500/psb_drv.c b/drivers/gpu/drm/gma500/psb_drv.c
index eec993f93b1a..6ec3a905fdd2 100644
--- a/drivers/gpu/drm/gma500/psb_drv.c
+++ b/drivers/gpu/drm/gma500/psb_drv.c
@@ -476,6 +476,7 @@ static struct drm_driver driver = {
476 .unload = psb_driver_unload, 476 .unload = psb_driver_unload,
477 .lastclose = psb_driver_lastclose, 477 .lastclose = psb_driver_lastclose,
478 .preclose = psb_driver_preclose, 478 .preclose = psb_driver_preclose,
479 .set_busid = drm_pci_set_busid,
479 480
480 .num_ioctls = ARRAY_SIZE(psb_ioctls), 481 .num_ioctls = ARRAY_SIZE(psb_ioctls),
481 .device_is_agp = psb_driver_device_is_agp, 482 .device_is_agp = psb_driver_device_is_agp,
diff --git a/drivers/gpu/drm/i810/i810_drv.c b/drivers/gpu/drm/i810/i810_drv.c
index 441ccf8f5bdc..6cb08a1c6b62 100644
--- a/drivers/gpu/drm/i810/i810_drv.c
+++ b/drivers/gpu/drm/i810/i810_drv.c
@@ -63,6 +63,7 @@ static struct drm_driver driver = {
63 .load = i810_driver_load, 63 .load = i810_driver_load,
64 .lastclose = i810_driver_lastclose, 64 .lastclose = i810_driver_lastclose,
65 .preclose = i810_driver_preclose, 65 .preclose = i810_driver_preclose,
66 .set_busid = drm_pci_set_busid,
66 .device_is_agp = i810_driver_device_is_agp, 67 .device_is_agp = i810_driver_device_is_agp,
67 .dma_quiescent = i810_driver_dma_quiescent, 68 .dma_quiescent = i810_driver_dma_quiescent,
68 .ioctls = i810_ioctls, 69 .ioctls = i810_ioctls,
diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
index ff4db249cc72..cdd95956811d 100644
--- a/drivers/gpu/drm/i915/i915_drv.c
+++ b/drivers/gpu/drm/i915/i915_drv.c
@@ -1593,6 +1593,7 @@ static struct drm_driver driver = {
1593 .lastclose = i915_driver_lastclose, 1593 .lastclose = i915_driver_lastclose,
1594 .preclose = i915_driver_preclose, 1594 .preclose = i915_driver_preclose,
1595 .postclose = i915_driver_postclose, 1595 .postclose = i915_driver_postclose,
1596 .set_busid = drm_pci_set_busid,
1596 1597
1597 /* Used in place of i915_pm_ops for non-DRIVER_MODESET */ 1598 /* Used in place of i915_pm_ops for non-DRIVER_MODESET */
1598 .suspend = i915_suspend, 1599 .suspend = i915_suspend,
diff --git a/drivers/gpu/drm/mga/mga_drv.c b/drivers/gpu/drm/mga/mga_drv.c
index 6b1a87c8aac5..cb5c71f4b28e 100644
--- a/drivers/gpu/drm/mga/mga_drv.c
+++ b/drivers/gpu/drm/mga/mga_drv.c
@@ -64,6 +64,7 @@ static struct drm_driver driver = {
64 .load = mga_driver_load, 64 .load = mga_driver_load,
65 .unload = mga_driver_unload, 65 .unload = mga_driver_unload,
66 .lastclose = mga_driver_lastclose, 66 .lastclose = mga_driver_lastclose,
67 .set_busid = drm_pci_set_busid,
67 .dma_quiescent = mga_driver_dma_quiescent, 68 .dma_quiescent = mga_driver_dma_quiescent,
68 .device_is_agp = mga_driver_device_is_agp, 69 .device_is_agp = mga_driver_device_is_agp,
69 .get_vblank_counter = mga_get_vblank_counter, 70 .get_vblank_counter = mga_get_vblank_counter,
diff --git a/drivers/gpu/drm/mgag200/mgag200_drv.c b/drivers/gpu/drm/mgag200/mgag200_drv.c
index 2d75d6df0789..97745991544d 100644
--- a/drivers/gpu/drm/mgag200/mgag200_drv.c
+++ b/drivers/gpu/drm/mgag200/mgag200_drv.c
@@ -91,6 +91,7 @@ static struct drm_driver driver = {
91 .driver_features = DRIVER_GEM | DRIVER_MODESET, 91 .driver_features = DRIVER_GEM | DRIVER_MODESET,
92 .load = mgag200_driver_load, 92 .load = mgag200_driver_load,
93 .unload = mgag200_driver_unload, 93 .unload = mgag200_driver_unload,
94 .set_busid = drm_pci_set_busid,
94 .fops = &mgag200_driver_fops, 95 .fops = &mgag200_driver_fops,
95 .name = DRIVER_NAME, 96 .name = DRIVER_NAME,
96 .desc = DRIVER_DESC, 97 .desc = DRIVER_DESC,
diff --git a/drivers/gpu/drm/msm/msm_drv.c b/drivers/gpu/drm/msm/msm_drv.c
index b447c01ad89c..47ccdbf49fa1 100644
--- a/drivers/gpu/drm/msm/msm_drv.c
+++ b/drivers/gpu/drm/msm/msm_drv.c
@@ -836,6 +836,7 @@ static struct drm_driver msm_driver = {
836 .open = msm_open, 836 .open = msm_open,
837 .preclose = msm_preclose, 837 .preclose = msm_preclose,
838 .lastclose = msm_lastclose, 838 .lastclose = msm_lastclose,
839 .set_busid = drm_platform_set_busid,
839 .irq_handler = msm_irq, 840 .irq_handler = msm_irq,
840 .irq_preinstall = msm_irq_preinstall, 841 .irq_preinstall = msm_irq_preinstall,
841 .irq_postinstall = msm_irq_postinstall, 842 .irq_postinstall = msm_irq_postinstall,
diff --git a/drivers/gpu/drm/nouveau/nouveau_drm.c b/drivers/gpu/drm/nouveau/nouveau_drm.c
index 250a5e88c751..cee1eaf64117 100644
--- a/drivers/gpu/drm/nouveau/nouveau_drm.c
+++ b/drivers/gpu/drm/nouveau/nouveau_drm.c
@@ -73,7 +73,9 @@ MODULE_PARM_DESC(runpm, "disable (0), force enable (1), optimus only default (-1
73int nouveau_runtime_pm = -1; 73int nouveau_runtime_pm = -1;
74module_param_named(runpm, nouveau_runtime_pm, int, 0400); 74module_param_named(runpm, nouveau_runtime_pm, int, 0400);
75 75
76static struct drm_driver driver; 76static struct drm_driver driver_stub;
77static struct drm_driver driver_pci;
78static struct drm_driver driver_platform;
77 79
78static u64 80static u64
79nouveau_pci_name(struct pci_dev *pdev) 81nouveau_pci_name(struct pci_dev *pdev)
@@ -322,7 +324,7 @@ static int nouveau_drm_probe(struct pci_dev *pdev,
322 324
323 pci_set_master(pdev); 325 pci_set_master(pdev);
324 326
325 ret = drm_get_pci_dev(pdev, pent, &driver); 327 ret = drm_get_pci_dev(pdev, pent, &driver_pci);
326 if (ret) { 328 if (ret) {
327 nouveau_object_ref(NULL, (struct nouveau_object **)&device); 329 nouveau_object_ref(NULL, (struct nouveau_object **)&device);
328 return ret; 330 return ret;
@@ -855,7 +857,7 @@ nouveau_driver_fops = {
855}; 857};
856 858
857static struct drm_driver 859static struct drm_driver
858driver = { 860driver_stub = {
859 .driver_features = 861 .driver_features =
860 DRIVER_USE_AGP | 862 DRIVER_USE_AGP |
861 DRIVER_GEM | DRIVER_MODESET | DRIVER_PRIME | DRIVER_RENDER, 863 DRIVER_GEM | DRIVER_MODESET | DRIVER_PRIME | DRIVER_RENDER,
@@ -1061,7 +1063,7 @@ nouveau_platform_device_create_(struct platform_device *pdev, int size,
1061 if (err) 1063 if (err)
1062 return ERR_PTR(err); 1064 return ERR_PTR(err);
1063 1065
1064 drm = drm_dev_alloc(&driver, &pdev->dev); 1066 drm = drm_dev_alloc(&driver_platform, &pdev->dev);
1065 if (!drm) { 1067 if (!drm) {
1066 err = -ENOMEM; 1068 err = -ENOMEM;
1067 goto err_free; 1069 goto err_free;
@@ -1086,6 +1088,11 @@ EXPORT_SYMBOL(nouveau_platform_device_create_);
1086static int __init 1088static int __init
1087nouveau_drm_init(void) 1089nouveau_drm_init(void)
1088{ 1090{
1091 driver_pci = driver_stub;
1092 driver_pci.set_busid = drm_pci_set_busid;
1093 driver_platform = driver_stub;
1094 driver_platform.set_busid = drm_platform_set_busid;
1095
1089 if (nouveau_modeset == -1) { 1096 if (nouveau_modeset == -1) {
1090#ifdef CONFIG_VGA_CONSOLE 1097#ifdef CONFIG_VGA_CONSOLE
1091 if (vgacon_text_force()) 1098 if (vgacon_text_force())
@@ -1097,7 +1104,7 @@ nouveau_drm_init(void)
1097 return 0; 1104 return 0;
1098 1105
1099 nouveau_register_dsm_handler(); 1106 nouveau_register_dsm_handler();
1100 return drm_pci_init(&driver, &nouveau_drm_pci_driver); 1107 return drm_pci_init(&driver_pci, &nouveau_drm_pci_driver);
1101} 1108}
1102 1109
1103static void __exit 1110static void __exit
@@ -1106,7 +1113,7 @@ nouveau_drm_exit(void)
1106 if (!nouveau_modeset) 1113 if (!nouveau_modeset)
1107 return; 1114 return;
1108 1115
1109 drm_pci_exit(&driver, &nouveau_drm_pci_driver); 1116 drm_pci_exit(&driver_pci, &nouveau_drm_pci_driver);
1110 nouveau_unregister_dsm_handler(); 1117 nouveau_unregister_dsm_handler();
1111} 1118}
1112 1119
diff --git a/drivers/gpu/drm/omapdrm/omap_drv.c b/drivers/gpu/drm/omapdrm/omap_drv.c
index 002b9721e85a..862ba03c236c 100644
--- a/drivers/gpu/drm/omapdrm/omap_drv.c
+++ b/drivers/gpu/drm/omapdrm/omap_drv.c
@@ -629,6 +629,7 @@ static struct drm_driver omap_drm_driver = {
629 .lastclose = dev_lastclose, 629 .lastclose = dev_lastclose,
630 .preclose = dev_preclose, 630 .preclose = dev_preclose,
631 .postclose = dev_postclose, 631 .postclose = dev_postclose,
632 .set_busid = drm_platform_set_busid,
632 .get_vblank_counter = drm_vblank_count, 633 .get_vblank_counter = drm_vblank_count,
633 .enable_vblank = omap_irq_enable_vblank, 634 .enable_vblank = omap_irq_enable_vblank,
634 .disable_vblank = omap_irq_disable_vblank, 635 .disable_vblank = omap_irq_disable_vblank,
diff --git a/drivers/gpu/drm/qxl/qxl_drv.c b/drivers/gpu/drm/qxl/qxl_drv.c
index 4da0105e481a..1d9b80c91a15 100644
--- a/drivers/gpu/drm/qxl/qxl_drv.c
+++ b/drivers/gpu/drm/qxl/qxl_drv.c
@@ -235,6 +235,8 @@ static struct drm_driver qxl_driver = {
235 .enable_vblank = qxl_noop_enable_vblank, 235 .enable_vblank = qxl_noop_enable_vblank,
236 .disable_vblank = qxl_noop_disable_vblank, 236 .disable_vblank = qxl_noop_disable_vblank,
237 237
238 .set_busid = drm_pci_set_busid,
239
238 .dumb_create = qxl_mode_dumb_create, 240 .dumb_create = qxl_mode_dumb_create,
239 .dumb_map_offset = qxl_mode_dumb_mmap, 241 .dumb_map_offset = qxl_mode_dumb_mmap,
240 .dumb_destroy = drm_gem_dumb_destroy, 242 .dumb_destroy = drm_gem_dumb_destroy,
diff --git a/drivers/gpu/drm/r128/r128_drv.c b/drivers/gpu/drm/r128/r128_drv.c
index 5bd307cd8da1..4a59370eb580 100644
--- a/drivers/gpu/drm/r128/r128_drv.c
+++ b/drivers/gpu/drm/r128/r128_drv.c
@@ -62,6 +62,7 @@ static struct drm_driver driver = {
62 .load = r128_driver_load, 62 .load = r128_driver_load,
63 .preclose = r128_driver_preclose, 63 .preclose = r128_driver_preclose,
64 .lastclose = r128_driver_lastclose, 64 .lastclose = r128_driver_lastclose,
65 .set_busid = drm_pci_set_busid,
65 .get_vblank_counter = r128_get_vblank_counter, 66 .get_vblank_counter = r128_get_vblank_counter,
66 .enable_vblank = r128_enable_vblank, 67 .enable_vblank = r128_enable_vblank,
67 .disable_vblank = r128_disable_vblank, 68 .disable_vblank = r128_disable_vblank,
diff --git a/drivers/gpu/drm/radeon/radeon_drv.c b/drivers/gpu/drm/radeon/radeon_drv.c
index f1e96e094b00..ec7e963d9bf7 100644
--- a/drivers/gpu/drm/radeon/radeon_drv.c
+++ b/drivers/gpu/drm/radeon/radeon_drv.c
@@ -328,6 +328,7 @@ static struct drm_driver driver_old = {
328 .preclose = radeon_driver_preclose, 328 .preclose = radeon_driver_preclose,
329 .postclose = radeon_driver_postclose, 329 .postclose = radeon_driver_postclose,
330 .lastclose = radeon_driver_lastclose, 330 .lastclose = radeon_driver_lastclose,
331 .set_busid = drm_pci_set_busid,
331 .unload = radeon_driver_unload, 332 .unload = radeon_driver_unload,
332 .suspend = radeon_suspend, 333 .suspend = radeon_suspend,
333 .resume = radeon_resume, 334 .resume = radeon_resume,
@@ -551,6 +552,7 @@ static struct drm_driver kms_driver = {
551 .preclose = radeon_driver_preclose_kms, 552 .preclose = radeon_driver_preclose_kms,
552 .postclose = radeon_driver_postclose_kms, 553 .postclose = radeon_driver_postclose_kms,
553 .lastclose = radeon_driver_lastclose_kms, 554 .lastclose = radeon_driver_lastclose_kms,
555 .set_busid = drm_pci_set_busid,
554 .unload = radeon_driver_unload_kms, 556 .unload = radeon_driver_unload_kms,
555 .get_vblank_counter = radeon_get_vblank_counter_kms, 557 .get_vblank_counter = radeon_get_vblank_counter_kms,
556 .enable_vblank = radeon_enable_vblank_kms, 558 .enable_vblank = radeon_enable_vblank_kms,
diff --git a/drivers/gpu/drm/rcar-du/rcar_du_drv.c b/drivers/gpu/drm/rcar-du/rcar_du_drv.c
index fda64b7b73e8..672d2fcba009 100644
--- a/drivers/gpu/drm/rcar-du/rcar_du_drv.c
+++ b/drivers/gpu/drm/rcar-du/rcar_du_drv.c
@@ -158,6 +158,7 @@ static struct drm_driver rcar_du_driver = {
158 .unload = rcar_du_unload, 158 .unload = rcar_du_unload,
159 .preclose = rcar_du_preclose, 159 .preclose = rcar_du_preclose,
160 .lastclose = rcar_du_lastclose, 160 .lastclose = rcar_du_lastclose,
161 .set_busid = drm_platform_set_busid,
161 .get_vblank_counter = drm_vblank_count, 162 .get_vblank_counter = drm_vblank_count,
162 .enable_vblank = rcar_du_enable_vblank, 163 .enable_vblank = rcar_du_enable_vblank,
163 .disable_vblank = rcar_du_disable_vblank, 164 .disable_vblank = rcar_du_disable_vblank,
diff --git a/drivers/gpu/drm/savage/savage_drv.c b/drivers/gpu/drm/savage/savage_drv.c
index 3c030216e888..1b09d2182037 100644
--- a/drivers/gpu/drm/savage/savage_drv.c
+++ b/drivers/gpu/drm/savage/savage_drv.c
@@ -57,6 +57,7 @@ static struct drm_driver driver = {
57 .preclose = savage_reclaim_buffers, 57 .preclose = savage_reclaim_buffers,
58 .lastclose = savage_driver_lastclose, 58 .lastclose = savage_driver_lastclose,
59 .unload = savage_driver_unload, 59 .unload = savage_driver_unload,
60 .set_busid = drm_pci_set_busid,
60 .ioctls = savage_ioctls, 61 .ioctls = savage_ioctls,
61 .dma_ioctl = savage_bci_buffers, 62 .dma_ioctl = savage_bci_buffers,
62 .fops = &savage_driver_fops, 63 .fops = &savage_driver_fops,
diff --git a/drivers/gpu/drm/shmobile/shmob_drm_drv.c b/drivers/gpu/drm/shmobile/shmob_drm_drv.c
index ff4ba483b602..873d12f851bf 100644
--- a/drivers/gpu/drm/shmobile/shmob_drm_drv.c
+++ b/drivers/gpu/drm/shmobile/shmob_drm_drv.c
@@ -267,6 +267,7 @@ static struct drm_driver shmob_drm_driver = {
267 .load = shmob_drm_load, 267 .load = shmob_drm_load,
268 .unload = shmob_drm_unload, 268 .unload = shmob_drm_unload,
269 .preclose = shmob_drm_preclose, 269 .preclose = shmob_drm_preclose,
270 .set_busid = drm_platform_set_busid,
270 .irq_handler = shmob_drm_irq, 271 .irq_handler = shmob_drm_irq,
271 .get_vblank_counter = drm_vblank_count, 272 .get_vblank_counter = drm_vblank_count,
272 .enable_vblank = shmob_drm_enable_vblank, 273 .enable_vblank = shmob_drm_enable_vblank,
diff --git a/drivers/gpu/drm/sis/sis_drv.c b/drivers/gpu/drm/sis/sis_drv.c
index 756f787b7143..54858e6fedaf 100644
--- a/drivers/gpu/drm/sis/sis_drv.c
+++ b/drivers/gpu/drm/sis/sis_drv.c
@@ -108,6 +108,7 @@ static struct drm_driver driver = {
108 .open = sis_driver_open, 108 .open = sis_driver_open,
109 .preclose = sis_reclaim_buffers_locked, 109 .preclose = sis_reclaim_buffers_locked,
110 .postclose = sis_driver_postclose, 110 .postclose = sis_driver_postclose,
111 .set_busid = drm_pci_set_busid,
111 .dma_quiescent = sis_idle, 112 .dma_quiescent = sis_idle,
112 .lastclose = sis_lastclose, 113 .lastclose = sis_lastclose,
113 .ioctls = sis_ioctls, 114 .ioctls = sis_ioctls,
diff --git a/drivers/gpu/drm/tdfx/tdfx_drv.c b/drivers/gpu/drm/tdfx/tdfx_drv.c
index 3492ca5c46d3..df533ff999a4 100644
--- a/drivers/gpu/drm/tdfx/tdfx_drv.c
+++ b/drivers/gpu/drm/tdfx/tdfx_drv.c
@@ -55,6 +55,7 @@ static const struct file_operations tdfx_driver_fops = {
55}; 55};
56 56
57static struct drm_driver driver = { 57static struct drm_driver driver = {
58 .set_busid = drm_pci_set_busid,
58 .fops = &tdfx_driver_fops, 59 .fops = &tdfx_driver_fops,
59 .name = DRIVER_NAME, 60 .name = DRIVER_NAME,
60 .desc = DRIVER_DESC, 61 .desc = DRIVER_DESC,
diff --git a/drivers/gpu/drm/tilcdc/tilcdc_drv.c b/drivers/gpu/drm/tilcdc/tilcdc_drv.c
index 6be623b4a86f..aea4b7663934 100644
--- a/drivers/gpu/drm/tilcdc/tilcdc_drv.c
+++ b/drivers/gpu/drm/tilcdc/tilcdc_drv.c
@@ -502,6 +502,7 @@ static struct drm_driver tilcdc_driver = {
502 .unload = tilcdc_unload, 502 .unload = tilcdc_unload,
503 .preclose = tilcdc_preclose, 503 .preclose = tilcdc_preclose,
504 .lastclose = tilcdc_lastclose, 504 .lastclose = tilcdc_lastclose,
505 .set_busid = drm_platform_set_busid,
505 .irq_handler = tilcdc_irq, 506 .irq_handler = tilcdc_irq,
506 .irq_preinstall = tilcdc_irq_preinstall, 507 .irq_preinstall = tilcdc_irq_preinstall,
507 .irq_postinstall = tilcdc_irq_postinstall, 508 .irq_postinstall = tilcdc_irq_postinstall,
diff --git a/drivers/gpu/drm/udl/udl_drv.c b/drivers/gpu/drm/udl/udl_drv.c
index 3ddd6cd98ac1..06675e5d4342 100644
--- a/drivers/gpu/drm/udl/udl_drv.c
+++ b/drivers/gpu/drm/udl/udl_drv.c
@@ -34,6 +34,11 @@ MODULE_DEVICE_TABLE(usb, id_table);
34 34
35MODULE_LICENSE("GPL"); 35MODULE_LICENSE("GPL");
36 36
37static int udl_driver_set_busid(struct drm_device *d, struct drm_master *m)
38{
39 return 0;
40}
41
37static int udl_usb_probe(struct usb_interface *interface, 42static int udl_usb_probe(struct usb_interface *interface,
38 const struct usb_device_id *id) 43 const struct usb_device_id *id)
39{ 44{
@@ -75,6 +80,7 @@ static struct drm_driver driver = {
75 .driver_features = DRIVER_MODESET | DRIVER_GEM | DRIVER_PRIME, 80 .driver_features = DRIVER_MODESET | DRIVER_GEM | DRIVER_PRIME,
76 .load = udl_driver_load, 81 .load = udl_driver_load,
77 .unload = udl_driver_unload, 82 .unload = udl_driver_unload,
83 .set_busid = udl_driver_set_busid,
78 84
79 /* gem hooks */ 85 /* gem hooks */
80 .gem_free_object = udl_gem_free_object, 86 .gem_free_object = udl_gem_free_object,
diff --git a/drivers/gpu/drm/via/via_drv.c b/drivers/gpu/drm/via/via_drv.c
index 50abc2adfaee..c16ffa63ded6 100644
--- a/drivers/gpu/drm/via/via_drv.c
+++ b/drivers/gpu/drm/via/via_drv.c
@@ -79,6 +79,7 @@ static struct drm_driver driver = {
79 .open = via_driver_open, 79 .open = via_driver_open,
80 .preclose = via_reclaim_buffers_locked, 80 .preclose = via_reclaim_buffers_locked,
81 .postclose = via_driver_postclose, 81 .postclose = via_driver_postclose,
82 .set_busid = drm_pci_set_busid,
82 .context_dtor = via_final_context, 83 .context_dtor = via_final_context,
83 .get_vblank_counter = via_get_vblank_counter, 84 .get_vblank_counter = via_get_vblank_counter,
84 .enable_vblank = via_enable_vblank, 85 .enable_vblank = via_enable_vblank,
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
index 18b54acacfbb..7197af157313 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
@@ -1418,6 +1418,7 @@ static struct drm_driver driver = {
1418 .open = vmw_driver_open, 1418 .open = vmw_driver_open,
1419 .preclose = vmw_preclose, 1419 .preclose = vmw_preclose,
1420 .postclose = vmw_postclose, 1420 .postclose = vmw_postclose,
1421 .set_busid = drm_pci_set_busid,
1421 1422
1422 .dumb_create = vmw_dumb_create, 1423 .dumb_create = vmw_dumb_create,
1423 .dumb_map_offset = vmw_dumb_map_offset, 1424 .dumb_map_offset = vmw_dumb_map_offset,