aboutsummaryrefslogtreecommitdiffstats
path: root/include/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 /include/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 'include/drm')
-rw-r--r--include/drm/drmP.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/drm/drmP.h b/include/drm/drmP.h
index 98b1eafebc1c..c82f292efcd4 100644
--- a/include/drm/drmP.h
+++ b/include/drm/drmP.h
@@ -627,6 +627,7 @@ struct drm_driver {
627 int (*dma_ioctl) (struct drm_device *dev, void *data, struct drm_file *file_priv); 627 int (*dma_ioctl) (struct drm_device *dev, void *data, struct drm_file *file_priv);
628 int (*dma_quiescent) (struct drm_device *); 628 int (*dma_quiescent) (struct drm_device *);
629 int (*context_dtor) (struct drm_device *dev, int context); 629 int (*context_dtor) (struct drm_device *dev, int context);
630 int (*set_busid)(struct drm_device *dev, struct drm_master *master);
630 631
631 /** 632 /**
632 * get_vblank_counter - get raw hardware vblank counter 633 * get_vblank_counter - get raw hardware vblank counter
@@ -1498,6 +1499,7 @@ extern void drm_pci_exit(struct drm_driver *driver, struct pci_driver *pdriver);
1498extern int drm_get_pci_dev(struct pci_dev *pdev, 1499extern int drm_get_pci_dev(struct pci_dev *pdev,
1499 const struct pci_device_id *ent, 1500 const struct pci_device_id *ent,
1500 struct drm_driver *driver); 1501 struct drm_driver *driver);
1502extern int drm_pci_set_busid(struct drm_device *dev, struct drm_master *master);
1501 1503
1502#define DRM_PCIE_SPEED_25 1 1504#define DRM_PCIE_SPEED_25 1
1503#define DRM_PCIE_SPEED_50 2 1505#define DRM_PCIE_SPEED_50 2
@@ -1507,6 +1509,7 @@ extern int drm_pcie_get_speed_cap_mask(struct drm_device *dev, u32 *speed_mask);
1507 1509
1508/* platform section */ 1510/* platform section */
1509extern int drm_platform_init(struct drm_driver *driver, struct platform_device *platform_device); 1511extern int drm_platform_init(struct drm_driver *driver, struct platform_device *platform_device);
1512extern int drm_platform_set_busid(struct drm_device *d, struct drm_master *m);
1510 1513
1511/* returns true if currently okay to sleep */ 1514/* returns true if currently okay to sleep */
1512static __inline__ bool drm_can_sleep(void) 1515static __inline__ bool drm_can_sleep(void)