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>
This commit is contained in:
David Herrmann
2014-08-29 12:12:43 +02:00
zatwierdzone przez Dave Airlie
rodzic 1e444be0ef
commit 915b4d11b8
30 zmienionych plików z 59 dodań i 9 usunięć

Wyświetl plik

@@ -34,6 +34,11 @@ MODULE_DEVICE_TABLE(usb, id_table);
MODULE_LICENSE("GPL");
static int udl_driver_set_busid(struct drm_device *d, struct drm_master *m)
{
return 0;
}
static int udl_usb_probe(struct usb_interface *interface,
const struct usb_device_id *id)
{
@@ -75,6 +80,7 @@ static struct drm_driver driver = {
.driver_features = DRIVER_MODESET | DRIVER_GEM | DRIVER_PRIME,
.load = udl_driver_load,
.unload = udl_driver_unload,
.set_busid = udl_driver_set_busid,
/* gem hooks */
.gem_free_object = udl_gem_free_object,