Lines Matching +full:device +full:- +full:unique
32 if (dev->irqr == NULL) in drm_platform_free_irq()
35 bus_release_resource(dev->dev, SYS_RES_IRQ, in drm_platform_free_irq()
36 dev->irqrid, dev->irqr); in drm_platform_free_irq()
38 dev->irqr = NULL; in drm_platform_free_irq()
39 dev->irq = 0; in drm_platform_free_irq()
44 return dev->driver->name; in drm_platform_get_name()
51 master->unique_len = 13 + strlen(dev->driver->name); in drm_platform_set_busid()
52 master->unique_size = master->unique_len; in drm_platform_set_busid()
53 master->unique = malloc(master->unique_len + 1, DRM_MEM_DRIVER, M_NOWAIT); in drm_platform_set_busid()
55 if (master->unique == NULL) in drm_platform_set_busid()
56 return -ENOMEM; in drm_platform_set_busid()
58 id = 0; // XXX dev->driver->id; in drm_platform_set_busid()
60 /* if only a single instance of the platform device, id will be in drm_platform_set_busid()
61 * set to -1.. use 0 instead to avoid a funny looking bus-id: in drm_platform_set_busid()
63 if (id == -1) in drm_platform_set_busid()
66 len = snprintf(master->unique, master->unique_len, in drm_platform_set_busid()
67 "platform:%s:%02d", dev->driver->name, id); in drm_platform_set_busid()
69 if (len > master->unique_len) { in drm_platform_set_busid()
70 DRM_ERROR("Unique buffer overflowed\n"); in drm_platform_set_busid()
71 ret = -EINVAL; in drm_platform_set_busid()
82 if (dev->irqr) in drm_platform_get_irq()
83 return (dev->irq); in drm_platform_get_irq()
85 dev->irqr = bus_alloc_resource_any(dev->dev, SYS_RES_IRQ, in drm_platform_get_irq()
86 &dev->irqrid, RF_SHAREABLE); in drm_platform_get_irq()
87 if (!dev->irqr) { in drm_platform_get_irq()
88 dev_err(dev->dev, "Failed to allocate IRQ\n"); in drm_platform_get_irq()
92 dev->irq = (int) rman_get_start(dev->irqr); in drm_platform_get_irq()
94 return (dev->irq); in drm_platform_get_irq()
108 * \param platdev - Platform device structure
112 * then register the character device and inter module information.
123 driver->bus = &drm_platform_bus; in drm_get_platform_dev()
125 dev->dev = kdev; in drm_get_platform_dev()
137 ret = drm_get_minor(dev, &dev->control, DRM_MINOR_CONTROL); in drm_get_platform_dev()
142 ret = drm_get_minor(dev, &dev->primary, DRM_MINOR_LEGACY); in drm_get_platform_dev()
146 if (dev->driver->load) { in drm_get_platform_dev()
147 ret = dev->driver->load(dev, 0); in drm_get_platform_dev()
155 &dev->primary->mode_group); in drm_get_platform_dev()
161 list_add_tail(&dev->driver_item, &driver->device_list); in drm_get_platform_dev()
167 driver->name, driver->major, driver->minor, driver->patchlevel, in drm_get_platform_dev()
168 driver->date, dev->primary->index); in drm_get_platform_dev()
173 drm_put_minor(&dev->primary); in drm_get_platform_dev()
176 drm_put_minor(&dev->control); in drm_get_platform_dev()