diff mbox

drm/i915: Fix drm:intel_enable_lvds ERROR message in kernel log

Message ID 20171120222844.12508-1-contact@florentflament.com (mailing list archive)
State New, archived
Headers show

Commit Message

Florent Flament Nov. 20, 2017, 10:28 p.m. UTC
Fix `[drm:intel_enable_lvds] *ERROR* timed out waiting for panel to
power on` in kernel log at boot time.

This patch relates to the following bugs:
* https://bugs.freedesktop.org/show_bug.cgi?id=103414
* https://bugzilla.kernel.org/show_bug.cgi?id=57591

Toshiba Satellite Z930 laptops needs between 1 and 2 seconds to power
on its screen during Intel i915 DRM initialization. This currently
results in a `[drm:intel_enable_lvds] *ERROR* timed out waiting for
panel to power on` message appearing in the kernel log during boot
time and when stopping the machine.

This change increases the timeout of the `intel_enable_lvds` function
from 1 to 2 seconds, letting enough time for the Satellite 930 LCD
screen to power on, and suppressing the error message from the kernel
log.

This patch has been successfully tested on Linux 4.14 running on a
Toshiba Satellite Z930.

Signed-off-by: Florent Flament <contact@florentflament.com>
---
 drivers/gpu/drm/i915/intel_lvds.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/intel_lvds.c b/drivers/gpu/drm/i915/intel_lvds.c
index 38572d65e46e..d41bbc9ff8c9 100644
--- a/drivers/gpu/drm/i915/intel_lvds.c
+++ b/drivers/gpu/drm/i915/intel_lvds.c
@@ -317,7 +317,10 @@  static void intel_enable_lvds(struct intel_encoder *encoder,
 
 	I915_WRITE(PP_CONTROL(0), I915_READ(PP_CONTROL(0)) | PANEL_POWER_ON);
 	POSTING_READ(lvds_encoder->reg);
-	if (intel_wait_for_register(dev_priv, PP_STATUS(0), PP_ON, PP_ON, 1000))
+
+	/* Toshiba Satellite Z930 laptops LCD screens need more than 1
+	 * second to power on. */
+	if (intel_wait_for_register(dev_priv, PP_STATUS(0), PP_ON, PP_ON, 2000))
 		DRM_ERROR("timed out waiting for panel to power on\n");
 
 	intel_panel_enable_backlight(pipe_config, conn_state);