28 #include <linux/module.h>
41 #define PCI_VENDOR_ASPEED 0x1a03
43 static struct drm_driver
driver;
45 #define AST_VGA_DEVICE(id, info) { \
46 .class = PCI_BASE_CLASS_DISPLAY << 16, \
47 .class_mask = 0xff0000, \
48 .vendor = PCI_VENDOR_ASPEED, \
50 .subvendor = PCI_ANY_ID, \
51 .subdevice = PCI_ANY_ID, \
52 .driver_data = (unsigned long) info }
66 return drm_get_pci_dev(pdev, ent, &
driver);
70 ast_pci_remove(
struct pci_dev *pdev)
115 ret = ast_drm_thaw(dev);
123 static int ast_pm_suspend(
struct device *dev)
126 struct drm_device *ddev = pci_get_drvdata(pdev);
129 error = ast_drm_freeze(ddev);
137 static int ast_pm_resume(
struct device *dev)
140 struct drm_device *ddev = pci_get_drvdata(pdev);
141 return ast_drm_resume(ddev);
144 static int ast_pm_freeze(
struct device *dev)
147 struct drm_device *ddev = pci_get_drvdata(pdev);
149 if (!ddev || !ddev->dev_private)
151 return ast_drm_freeze(ddev);
155 static int ast_pm_thaw(
struct device *dev)
158 struct drm_device *ddev = pci_get_drvdata(pdev);
159 return ast_drm_thaw(ddev);
162 static int ast_pm_poweroff(
struct device *dev)
165 struct drm_device *ddev = pci_get_drvdata(pdev);
167 return ast_drm_freeze(ddev);
171 .suspend = ast_pm_suspend,
172 .resume = ast_pm_resume,
173 .freeze = ast_pm_freeze,
175 .poweroff = ast_pm_poweroff,
176 .restore = ast_pm_resume,
181 .id_table = pciidlist,
182 .probe = ast_pci_probe,
183 .remove = ast_pci_remove,
184 .driver.pm = &ast_pm_ops,
201 static struct drm_driver
driver = {
202 .driver_features = DRIVER_USE_MTRR | DRIVER_MODESET | DRIVER_GEM,
224 static int __init ast_init(
void)
226 #ifdef CONFIG_VGA_CONSOLE
235 static void __exit ast_exit(
void)