diff options
Diffstat (limited to 'drivers/gpu/drm/i915/i915_drv.c')
-rw-r--r-- | drivers/gpu/drm/i915/i915_drv.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c index cf4cb3e9a0c2..85ad020125c8 100644 --- a/drivers/gpu/drm/i915/i915_drv.c +++ b/drivers/gpu/drm/i915/i915_drv.c | |||
@@ -49,6 +49,7 @@ unsigned int i915_lvds_downclock = 0; | |||
49 | module_param_named(lvds_downclock, i915_lvds_downclock, int, 0400); | 49 | module_param_named(lvds_downclock, i915_lvds_downclock, int, 0400); |
50 | 50 | ||
51 | static struct drm_driver driver; | 51 | static struct drm_driver driver; |
52 | extern int intel_agp_enabled; | ||
52 | 53 | ||
53 | #define INTEL_VGA_DEVICE(id, info) { \ | 54 | #define INTEL_VGA_DEVICE(id, info) { \ |
54 | .class = PCI_CLASS_DISPLAY_VGA << 8, \ | 55 | .class = PCI_CLASS_DISPLAY_VGA << 8, \ |
@@ -136,6 +137,16 @@ const static struct intel_device_info intel_ironlake_m_info = { | |||
136 | .has_hotplug = 1, | 137 | .has_hotplug = 1, |
137 | }; | 138 | }; |
138 | 139 | ||
140 | const static struct intel_device_info intel_sandybridge_d_info = { | ||
141 | .is_i965g = 1, .is_i9xx = 1, .need_gfx_hws = 1, | ||
142 | .has_hotplug = 1, | ||
143 | }; | ||
144 | |||
145 | const static struct intel_device_info intel_sandybridge_m_info = { | ||
146 | .is_i965g = 1, .is_mobile = 1, .is_i9xx = 1, .need_gfx_hws = 1, | ||
147 | .has_hotplug = 1, | ||
148 | }; | ||
149 | |||
139 | const static struct pci_device_id pciidlist[] = { | 150 | const static struct pci_device_id pciidlist[] = { |
140 | INTEL_VGA_DEVICE(0x3577, &intel_i830_info), | 151 | INTEL_VGA_DEVICE(0x3577, &intel_i830_info), |
141 | INTEL_VGA_DEVICE(0x2562, &intel_845g_info), | 152 | INTEL_VGA_DEVICE(0x2562, &intel_845g_info), |
@@ -167,6 +178,8 @@ const static struct pci_device_id pciidlist[] = { | |||
167 | INTEL_VGA_DEVICE(0xa011, &intel_pineview_info), | 178 | INTEL_VGA_DEVICE(0xa011, &intel_pineview_info), |
168 | INTEL_VGA_DEVICE(0x0042, &intel_ironlake_d_info), | 179 | INTEL_VGA_DEVICE(0x0042, &intel_ironlake_d_info), |
169 | INTEL_VGA_DEVICE(0x0046, &intel_ironlake_m_info), | 180 | INTEL_VGA_DEVICE(0x0046, &intel_ironlake_m_info), |
181 | INTEL_VGA_DEVICE(0x0102, &intel_sandybridge_d_info), | ||
182 | INTEL_VGA_DEVICE(0x0106, &intel_sandybridge_m_info), | ||
170 | {0, 0, 0} | 183 | {0, 0, 0} |
171 | }; | 184 | }; |
172 | 185 | ||
@@ -546,6 +559,11 @@ static struct drm_driver driver = { | |||
546 | 559 | ||
547 | static int __init i915_init(void) | 560 | static int __init i915_init(void) |
548 | { | 561 | { |
562 | if (!intel_agp_enabled) { | ||
563 | DRM_ERROR("drm/i915 can't work without intel_agp module!\n"); | ||
564 | return -ENODEV; | ||
565 | } | ||
566 | |||
549 | driver.num_ioctls = i915_max_ioctl; | 567 | driver.num_ioctls = i915_max_ioctl; |
550 | 568 | ||
551 | i915_gem_shrinker_init(); | 569 | i915_gem_shrinker_init(); |
@@ -571,6 +589,11 @@ static int __init i915_init(void) | |||
571 | driver.driver_features &= ~DRIVER_MODESET; | 589 | driver.driver_features &= ~DRIVER_MODESET; |
572 | #endif | 590 | #endif |
573 | 591 | ||
592 | if (!(driver.driver_features & DRIVER_MODESET)) { | ||
593 | driver.suspend = i915_suspend; | ||
594 | driver.resume = i915_resume; | ||
595 | } | ||
596 | |||
574 | return drm_init(&driver); | 597 | return drm_init(&driver); |
575 | } | 598 | } |
576 | 599 | ||