38 #include <linux/module.h>
69 #define KMS_DRIVER_MAJOR 2
70 #define KMS_DRIVER_MINOR 24
71 #define KMS_DRIVER_PATCHLEVEL 0
78 struct drm_file *file_priv);
80 struct drm_file *file_priv);
95 struct drm_file *file_priv);
99 struct drm_file *file_priv);
101 struct drm_file *file_priv);
117 struct drm_gem_object *obj,
122 #if defined(CONFIG_DEBUG_FS)
123 int radeon_debugfs_init(
struct drm_minor *minor);
124 void radeon_debugfs_cleanup(
struct drm_minor *minor);
164 MODULE_PARM_DESC(gartsize,
"Size of PCIE/IGP gart to setup in megabytes (32, 64, etc)");
182 MODULE_PARM_DESC(disp_priority,
"Display Priority (0 = auto, 1 = normal, 2 = high)");
188 MODULE_PARM_DESC(pcie_gen2,
"PCIE Gen2 mode (-1 = auto, 0 = disable, 1 = enable)");
194 MODULE_PARM_DESC(lockup_timeout,
"GPU lockup timeout in ms (defaul 10000 = 10 seconds, 0 = disable)");
229 #if defined(CONFIG_DRM_RADEON_KMS)
248 static struct drm_driver driver_old = {
250 DRIVER_USE_AGP | DRIVER_USE_MTRR | DRIVER_PCI_DMA | DRIVER_SG |
251 DRIVER_HAVE_IRQ | DRIVER_HAVE_DMA | DRIVER_IRQ_SHARED,
273 .
fops = &radeon_driver_old_fops,
282 static struct drm_driver kms_driver;
284 static void radeon_kick_out_firmware_fb(
struct pci_dev *pdev)
286 struct apertures_struct *ap;
289 ap = alloc_apertures(1);
304 radeon_kick_out_firmware_fb(pdev);
306 return drm_get_pci_dev(pdev, ent, &kms_driver);
310 radeon_pci_remove(
struct pci_dev *pdev)
312 struct drm_device *dev = pci_get_drvdata(pdev);
320 struct drm_device *dev = pci_get_drvdata(pdev);
325 radeon_pci_resume(
struct pci_dev *pdev)
327 struct drm_device *dev = pci_get_drvdata(pdev);
345 static struct drm_driver kms_driver = {
347 DRIVER_USE_AGP | DRIVER_USE_MTRR | DRIVER_PCI_DMA | DRIVER_SG |
348 DRIVER_HAVE_IRQ | DRIVER_HAVE_DMA | DRIVER_IRQ_SHARED | DRIVER_GEM |
365 #if defined(CONFIG_DEBUG_FS)
366 .debugfs_init = radeon_debugfs_init,
367 .debugfs_cleanup = radeon_debugfs_cleanup,
382 .fops = &radeon_driver_kms_fops,
397 static struct drm_driver *
driver;
400 static struct pci_driver radeon_pci_driver = {
402 .id_table = pciidlist,
405 static struct pci_driver radeon_kms_pci_driver = {
407 .id_table = pciidlist,
408 .probe = radeon_pci_probe,
409 .remove = radeon_pci_remove,
410 .suspend = radeon_pci_suspend,
411 .resume = radeon_pci_resume,
416 driver = &driver_old;
417 pdriver = &radeon_pci_driver;
419 #ifdef CONFIG_VGA_CONSOLE
421 DRM_INFO(
"VGACON disable radeon kernel modesetting.\n");
422 driver = &driver_old;
423 pdriver = &radeon_pci_driver;
424 driver->driver_features &= ~DRIVER_MODESET;
430 #ifdef CONFIG_DRM_RADEON_KMS
431 DRM_INFO(
"radeon defaulting to kernel modesetting.\n");
434 DRM_INFO(
"radeon defaulting to userspace modesetting.\n");
439 DRM_INFO(
"radeon kernel modesetting enabled.\n");
440 driver = &kms_driver;
441 pdriver = &radeon_kms_pci_driver;
442 driver->driver_features |= DRIVER_MODESET;
451 static void __exit radeon_exit(
void)