Commit cf37c097 authored by Niko Tsirakis's avatar Niko Tsirakis Committed by Jani Nikula
Browse files

drm/i915/display/lspcon: Increase LSPCON mode settle timeout

This is to eliminate all cases of "*ERROR* LSPCON mode hasn't settled",
followed by link training errors. Intel engineers recommended increasing
this timeout and that does resolve the issue.

On some CometLake-based device designs the Parade PS175 takes more than
400ms to settle in PCON mode. 100 reboot trials on one device resulted
in a median settle time of 440ms and a maximum of 444ms. Even after
increasing the timeout to 500ms, 2% of devices still had this error. So
this increases the timeout to 800ms.

Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/9443


Signed-off-by: default avatarPablo Ceballos <pceballos@google.com>
Signed-off-by: default avatarNiko Tsirakis <ntsirakis@google.com>
Reviewed-by: default avatarJani Nikula <jani.nikula@intel.com>
Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20231002204709.761089-1-ntsirakis@google.com
parent 14aebb78
Loading
Loading
Loading
Loading
+14 −1
Original line number Diff line number Diff line
@@ -153,6 +153,18 @@ static enum drm_lspcon_mode lspcon_get_current_mode(struct intel_lspcon *lspcon)
	return current_mode;
}

static int lspcon_get_mode_settle_timeout(struct intel_lspcon *lspcon)
{
	/*
	 * On some CometLake-based device designs the Parade PS175 takes more
	 * than 400ms to settle in PCON mode. 100 reboot trials on one device
	 * resulted in a median settle time of 440ms and a maximum of 444ms.
	 * Even after increasing the timeout to 500ms, 2% of devices still had
	 * this error. So this sets the timeout to 800ms.
	 */
	return lspcon->vendor == LSPCON_VENDOR_PARADE ? 800 : 400;
}

static enum drm_lspcon_mode lspcon_wait_mode(struct intel_lspcon *lspcon,
					     enum drm_lspcon_mode mode)
{
@@ -167,7 +179,8 @@ static enum drm_lspcon_mode lspcon_wait_mode(struct intel_lspcon *lspcon,
	drm_dbg_kms(&i915->drm, "Waiting for LSPCON mode %s to settle\n",
		    lspcon_mode_name(mode));

	wait_for((current_mode = lspcon_get_current_mode(lspcon)) == mode, 400);
	wait_for((current_mode = lspcon_get_current_mode(lspcon)) == mode,
		 lspcon_get_mode_settle_timeout(lspcon));
	if (current_mode != mode)
		drm_err(&i915->drm, "LSPCON mode hasn't settled\n");