Lines Matching defs:dev

49 	if ((irq.busnum >> 8) != dev->pci_domain ||
50 (irq.busnum & 0xff) != dev->pci_bus ||
51 irq.devnum != dev->pci_slot ||
52 irq.funcnum != dev->pci_func)
55 irq.irq = dev->irq;
66 drm_device_t *dev = (void *)arg;
69 mutex_enter(&dev->irq_lock);
70 ret = dev->driver->irq_handler(arg);
71 mutex_exit(&dev->irq_lock);
79 drm_install_irq_handle(drm_device_t *dev)
81 dev_info_t *dip = dev->dip;
95 &dev->intr_block) != DDI_SUCCESS) {
100 mutex_init(&dev->irq_lock, NULL, MUTEX_DRIVER, (void *)dev->intr_block);
103 if (ddi_add_intr(dip, 0, &dev->intr_block,
105 (caddr_t)dev) != DDI_SUCCESS) {
115 drm_irq_install(drm_device_t *dev)
119 if (dev->dev_private == NULL) {
124 if (dev->irq_enabled) {
129 dev->context_flag = 0;
130 mutex_init(&dev->tasklet_lock, NULL, MUTEX_DRIVER, NULL);
134 dev->driver->irq_preinstall(dev);
137 ret = drm_install_irq_handle(dev);
143 if (dev->driver->use_vbl_irq) {
144 DRM_INIT_WAITQUEUE(&dev->vbl_queue, DRM_INTR_PRI(dev));
148 dev->driver->irq_postinstall(dev);
150 dev->irq_enabled = 1;
156 drm_uninstall_irq_handle(drm_device_t *dev)
158 ASSERT(dev->dip);
159 ddi_remove_intr(dev->dip, 0, dev->intr_block);
160 mutex_destroy(&dev->irq_lock);
166 drm_irq_uninstall(drm_device_t *dev)
169 if (!dev->irq_enabled) {
172 dev->irq_enabled = 0;
173 dev->driver->irq_uninstall(dev);
174 drm_uninstall_irq_handle(dev);
175 dev->locked_tasklet_func = NULL;
176 if (dev->driver->use_vbl_irq) {
177 DRM_FINI_WAITQUEUE(&dev->vbl_queue);
179 mutex_destroy(&dev->tasklet_lock);
199 return (drm_irq_install(dev));
201 err = drm_irq_uninstall(dev);
218 if (!dev->irq_enabled)
246 if (dev->driver->use_vbl_irq2 != 1)
249 if (dev->driver->use_vbl_irq != 1)
254 &dev->vbl_received2 : &dev->vbl_received);
283 ret = dev->driver->vblank_wait2(dev,
286 ret = dev->driver->vblank_wait(dev,
317 drm_vbl_send_signals(drm_device_t *dev)
320 unsigned int vbl_seq = atomic_read(&dev->vbl_received);
323 vbl_sig = TAILQ_FIRST(&dev->vbl_sig_list);
332 TAILQ_REMOVE(&dev->vbl_sig_list, vbl_sig, link);
342 * \param dev DRM device.
353 drm_locked_tasklet(drm_device_t *dev, void (*func)(drm_device_t *))
355 mutex_enter(&dev->tasklet_lock);
357 if (dev->locked_tasklet_func) {
358 mutex_exit(&dev->tasklet_lock);
362 dev->locked_tasklet_func = func;
364 mutex_exit(&dev->tasklet_lock);