Lines Matching defs:pdev
72 struct pci_dev *pdev = dev->pdev;
75 if (pdev->msi_handle) {
77 for (i = 0; i < pdev->msi_actual; i++) {
78 ret = ddi_intr_add_handler(pdev->msi_handle[i],
86 if (pdev->msi_flag & DDI_INTR_FLAG_BLOCK) {
88 (void) ddi_intr_block_enable(pdev->msi_handle, pdev->msi_actual);
91 for (i = 0; i < pdev->msi_actual; i++)
92 (void) ddi_intr_enable(pdev->msi_handle[i]);
96 if (ddi_add_intr(dev->devinfo, 0, &pdev->intr_block,
109 struct pci_dev *pdev = dev->pdev;
114 if (pdev->msi_handle) {
116 if (pdev->msi_flag & DDI_INTR_FLAG_BLOCK) {
118 (void) ddi_intr_block_disable(pdev->msi_handle, pdev->msi_actual);
120 for (i = 0; i < pdev->msi_actual; i++)
121 (void) ddi_intr_disable(pdev->msi_handle[i]);
125 for (i = 0; i < pdev->msi_actual; i++){
126 (void) ddi_intr_remove_handler(pdev->msi_handle[i]);
129 ddi_remove_intr(dev->devinfo, 0, pdev->intr_block);
134 pci_enable_msi(struct pci_dev *pdev)
136 struct drm_device *dev = pdev->dev;
172 pdev->msi_size = count * sizeof (ddi_intr_handle_t);
173 pdev->msi_handle = kmem_alloc(pdev->msi_size, KM_SLEEP);
175 ret = ddi_intr_alloc(devinfo, pdev->msi_handle, DDI_INTR_TYPE_MSI, 0,
180 kmem_free(pdev->msi_handle, pdev->msi_size);
183 pdev->msi_actual = actual;
188 ret = ddi_intr_get_pri(pdev->msi_handle[0], &pdev->msi_pri);
192 (void) ddi_intr_free(pdev->msi_handle[i]);
193 kmem_free(pdev->msi_handle, pdev->msi_size);
197 ret = ddi_intr_get_cap(pdev->msi_handle[0], &pdev->msi_flag);
201 (void) ddi_intr_free(pdev->msi_handle[i]);
202 kmem_free(pdev->msi_handle, pdev->msi_size);
210 pci_disable_msi(struct pci_dev *pdev)
214 for (i = 0; i < pdev->msi_actual; i++)
215 (void) ddi_intr_free(pdev->msi_handle[i]);
216 kmem_free(pdev->msi_handle, pdev->msi_size);
217 pdev->msi_handle = NULL;
256 if ((p->busnum >> 8) != dev->pdev->domain ||
257 (p->busnum & 0xff) != dev->pdev->bus ||
258 p->devnum != dev->pdev->slot || p->funcnum != dev->pdev->func)
261 p->irq = dev->pdev->irq;
403 mutex_init(&dev->vbl_lock, NULL, MUTEX_DRIVER, (void *)dev->pdev->intr_block);
507 if (dev->pdev->irq == 0)
525 DRM_DEBUG("irq=%d\n", dev->pdev->irq);
592 DRM_DEBUG("irq=%d\n", dev->pdev->irq);
628 ctl->irq != dev->pdev->irq)
1344 if ((!dev->pdev->irq) || (!dev->irq_enabled))