28 #include <linux/export.h>
54 dev->platformdev = platdev;
66 if (drm_core_check_feature(dev, DRIVER_MODESET)) {
76 if (dev->driver->load) {
77 ret = dev->driver->load(dev, 0);
83 if (drm_core_check_feature(dev, DRIVER_MODESET)) {
85 &dev->primary->mode_group);
94 DRM_INFO(
"Initialized %s %d.%d.%d %s on minor %d\n",
95 driver->name, driver->major, driver->minor, driver->patchlevel,
96 driver->date, dev->primary->index);
103 if (drm_core_check_feature(dev, DRIVER_MODESET))
117 static const char *drm_platform_get_name(
struct drm_device *
dev)
119 return dev->platformdev->name;
122 static int drm_platform_set_busid(
struct drm_device *
dev,
struct drm_master *master)
126 master->unique_len = 13 +
strlen(dev->platformdev->name);
127 master->unique_size = master->unique_len;
130 if (master->unique ==
NULL)
133 id = dev->platformdev->id;
141 len =
snprintf(master->unique, master->unique_len,
142 "platform:%s:%02d", dev->platformdev->name,
id);
144 if (len > master->unique_len) {
145 DRM_ERROR(
"Unique buffer overflowed\n");
154 if (dev->devname ==
NULL) {
159 sprintf(dev->devname,
"%s@%s", dev->platformdev->name,
166 static struct drm_bus drm_platform_bus = {
167 .bus_type = DRIVER_BUS_PLATFORM,
168 .get_irq = drm_platform_get_irq,
169 .get_name = drm_platform_get_name,
170 .set_busid = drm_platform_set_busid,
189 driver->kdriver.platform_device = platform_device;
190 driver->bus = &drm_platform_bus;
191 INIT_LIST_HEAD(&driver->device_list);
203 DRM_INFO(
"Module unloaded\n");