aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/i915_drv.c
diff options
context:
space:
mode:
authorRodrigo Vivi <rodrigo.vivi@gmail.com>2012-10-15 16:16:23 -0400
committerDaniel Vetter <daniel.vetter@ffwll.ch>2012-10-17 15:21:45 -0400
commit0a3af268644e0217ea22d6899a76187f930e9590 (patch)
tree3cd8f1fccb96af87cab7ee97aaaf063d644431dc /drivers/gpu/drm/i915/i915_drv.c
parenta7c2e1aad6c846f316641bbaa54cf999aeaa7ebc (diff)
drm/i915: Insert i915_preliminary_hw_support variable.
On the worst scenario, users with new hardwares and old kernel from enabling times can get black screens. So, from now on, this perliminary_hw_support module parameter shall be used by all upcoming platforms that are still under enabling. The second option would be to merge the pci ids after basic modeset works, but that makes testing and development while bringing up hw a rather tedious afair. Although it is uncomfortable for developers use this extra variable it brings more stability for end users. Signed-off-by: Rodrigo Vivi <rodrigo.vivi@gmail.com> Reviewed-by: Dave Airlie <airlied@redhat.com> [danvet: dropped the i915_ param prefix, i915.i915_ is just tedious.] Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_drv.c')
-rw-r--r--drivers/gpu/drm/i915/i915_drv.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
index a7837e556945..16564755406d 100644
--- a/drivers/gpu/drm/i915/i915_drv.c
+++ b/drivers/gpu/drm/i915/i915_drv.c
@@ -119,6 +119,13 @@ module_param_named(i915_enable_ppgtt, i915_enable_ppgtt, int, 0600);
119MODULE_PARM_DESC(i915_enable_ppgtt, 119MODULE_PARM_DESC(i915_enable_ppgtt,
120 "Enable PPGTT (default: true)"); 120 "Enable PPGTT (default: true)");
121 121
122unsigned int i915_preliminary_hw_support __read_mostly = 0;
123module_param_named(preliminary_hw_support, i915_preliminary_hw_support, int, 0600);
124MODULE_PARM_DESC(preliminary_hw_support,
125 "Enable preliminary hardware support. "
126 "Enable Haswell and ValleyView Support. "
127 "(default: false)");
128
122static struct drm_driver driver; 129static struct drm_driver driver;
123extern int intel_agp_enabled; 130extern int intel_agp_enabled;
124 131
@@ -827,6 +834,12 @@ i915_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
827 struct intel_device_info *intel_info = 834 struct intel_device_info *intel_info =
828 (struct intel_device_info *) ent->driver_data; 835 (struct intel_device_info *) ent->driver_data;
829 836
837 if (intel_info->is_haswell || intel_info->is_valleyview)
838 if(!i915_preliminary_hw_support) {
839 DRM_ERROR("Preliminary hardware support disabled\n");
840 return -ENODEV;
841 }
842
830 /* Only bind to function 0 of the device. Early generations 843 /* Only bind to function 0 of the device. Early generations
831 * used function 1 as a placeholder for multi-head. This causes 844 * used function 1 as a placeholder for multi-head. This causes
832 * us confusion instead, especially on the systems where both 845 * us confusion instead, especially on the systems where both