Lines Matching refs:pdev
67 static bool is_vga(struct pci_dev *pdev)
69 return pdev->class == PCI_CLASS_DISPLAY_VGA << 8;
73 qxl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
78 if (pdev->revision < 4) {
84 qdev = devm_drm_dev_alloc(&pdev->dev, &qxl_driver,
91 ret = pci_enable_device(pdev);
95 ret = drm_fb_helper_remove_conflicting_pci_framebuffers(pdev, "qxl");
99 if (is_vga(pdev) && pdev->revision < 5) {
100 ret = vga_get_interruptible(pdev, VGA_RSRC_LEGACY_IO);
107 ret = qxl_device_init(qdev, pdev);
130 if (is_vga(pdev) && pdev->revision < 5)
131 vga_put(pdev, VGA_RSRC_LEGACY_IO);
133 pci_disable_device(pdev);
152 qxl_pci_remove(struct pci_dev *pdev)
154 struct drm_device *dev = pci_get_drvdata(pdev);
158 if (is_vga(pdev) && pdev->revision < 5)
159 vga_put(pdev, VGA_RSRC_LEGACY_IO);
166 struct pci_dev *pdev = dev->pdev;
182 pci_save_state(pdev);
203 struct pci_dev *pdev = to_pci_dev(dev);
204 struct drm_device *drm_dev = pci_get_drvdata(pdev);
211 pci_disable_device(pdev);
212 pci_set_power_state(pdev, PCI_D3hot);
218 struct pci_dev *pdev = to_pci_dev(dev);
219 struct drm_device *drm_dev = pci_get_drvdata(pdev);
221 pci_set_power_state(pdev, PCI_D0);
222 pci_restore_state(pdev);
223 if (pci_enable_device(pdev)) {
246 struct pci_dev *pdev = to_pci_dev(dev);
247 struct drm_device *drm_dev = pci_get_drvdata(pdev);