Commit a0bae57f authored by Damien Lespiau's avatar Damien Lespiau Committed by Daniel Vetter

drm/i915: Provide a command line option to disable display

If we can't actually determine at run-time we have a fused-off display,
provide at least an option to disable it.

v2: Move the i915.disable_display test in a separate check
    (Daniel Vetter)
Signed-off-by: default avatarDamien Lespiau <damien.lespiau@intel.com>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent 658ac4c6
...@@ -1483,9 +1483,12 @@ static void intel_device_info_runtime_init(struct drm_device *dev) ...@@ -1483,9 +1483,12 @@ static void intel_device_info_runtime_init(struct drm_device *dev)
if (IS_VALLEYVIEW(dev)) if (IS_VALLEYVIEW(dev))
info->num_sprites = 2; info->num_sprites = 2;
if (info->num_pipes > 0 && if (i915.disable_display) {
(INTEL_INFO(dev)->gen == 7 || INTEL_INFO(dev)->gen == 8) && DRM_INFO("Display disabled (module parameter)\n");
!IS_VALLEYVIEW(dev)) { info->num_pipes = 0;
} else if (info->num_pipes > 0 &&
(INTEL_INFO(dev)->gen == 7 || INTEL_INFO(dev)->gen == 8) &&
!IS_VALLEYVIEW(dev)) {
u32 fuse_strap = I915_READ(FUSE_STRAP); u32 fuse_strap = I915_READ(FUSE_STRAP);
u32 sfuse_strap = I915_READ(SFUSE_STRAP); u32 sfuse_strap = I915_READ(SFUSE_STRAP);
......
...@@ -1958,6 +1958,7 @@ struct i915_params { ...@@ -1958,6 +1958,7 @@ struct i915_params {
bool fastboot; bool fastboot;
bool prefault_disable; bool prefault_disable;
bool reset; bool reset;
bool disable_display;
}; };
extern struct i915_params i915 __read_mostly; extern struct i915_params i915 __read_mostly;
......
...@@ -47,6 +47,7 @@ struct i915_params i915 __read_mostly = { ...@@ -47,6 +47,7 @@ struct i915_params i915 __read_mostly = {
.prefault_disable = 0, .prefault_disable = 0,
.reset = true, .reset = true,
.invert_brightness = 0, .invert_brightness = 0,
.disable_display = 0,
}; };
module_param_named(modeset, i915.modeset, int, 0400); module_param_named(modeset, i915.modeset, int, 0400);
...@@ -153,3 +154,6 @@ MODULE_PARM_DESC(invert_brightness, ...@@ -153,3 +154,6 @@ MODULE_PARM_DESC(invert_brightness,
"report PCI device ID, subsystem vendor and subsystem device ID " "report PCI device ID, subsystem vendor and subsystem device ID "
"to dri-devel@lists.freedesktop.org, if your machine needs it. " "to dri-devel@lists.freedesktop.org, if your machine needs it. "
"It will then be included in an upcoming module version."); "It will then be included in an upcoming module version.");
module_param_named(disable_display, i915.disable_display, bool, 0600);
MODULE_PARM_DESC(disable_display, "Disable display (default: false)");
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment