* Re: [PATCH v3] drm/i915/display/lspcon: Increase LSPCON mode settle timeout
2023-08-16 4:56 [PATCH v3] drm/i915/display/lspcon: Increase LSPCON mode settle timeout Pablo Ceballos
@ 2023-08-16 9:02 ` Jani Nikula
2023-10-02 10:00 ` Jani Nikula
2023-10-02 20:47 ` [PATCH v4] " Niko Tsirakis
2 siblings, 0 replies; 5+ messages in thread
From: Jani Nikula @ 2023-08-16 9:02 UTC (permalink / raw)
To: Pablo Ceballos, Ankit K Nautiyal
Cc: Tvrtko Ursulin, intel-gfx, linux-kernel, dri-devel, Rodrigo Vivi,
Pablo Ceballos
On Wed, 16 Aug 2023, Pablo Ceballos <pceballos@google.com> wrote:
> 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.
>
> Signed-off-by: Pablo Ceballos <pceballos@google.com>
I think we've been here before. Do you have a publicly available gitlab
issue with the proper logs? If not, please file one at [1].
BR,
Jani.
[1] https://gitlab.freedesktop.org/drm/intel/issues/new
> ---
>
> V2: Added more details in the commit message
> V3: Only apply the increased timeout if the vendor is Parade
>
> drivers/gpu/drm/i915/display/intel_lspcon.c | 21 ++++++++++++++++++++-
> 1 file changed, 20 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_lspcon.c b/drivers/gpu/drm/i915/display/intel_lspcon.c
> index bb3b5355a0d9..b07eab84cc63 100644
> --- a/drivers/gpu/drm/i915/display/intel_lspcon.c
> +++ b/drivers/gpu/drm/i915/display/intel_lspcon.c
> @@ -153,6 +153,24 @@ static enum drm_lspcon_mode lspcon_get_current_mode(struct intel_lspcon *lspcon)
> return current_mode;
> }
>
> +static u32 lspcon_get_mode_settle_timeout(struct intel_lspcon *lspcon)
> +{
> + u32 timeout_ms = 400;
> +
> + /*
> + * 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.
> + */
> + if (lspcon->vendor == LSPCON_VENDOR_PARADE)
> + timeout_ms = 800;
> +
> + return timeout_ms;
> +}
> +
> +
> static enum drm_lspcon_mode lspcon_wait_mode(struct intel_lspcon *lspcon,
> enum drm_lspcon_mode mode)
> {
> @@ -167,7 +185,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");
--
Jani Nikula, Intel Open Source Graphics Center
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH v3] drm/i915/display/lspcon: Increase LSPCON mode settle timeout
2023-08-16 4:56 [PATCH v3] drm/i915/display/lspcon: Increase LSPCON mode settle timeout Pablo Ceballos
2023-08-16 9:02 ` Jani Nikula
@ 2023-10-02 10:00 ` Jani Nikula
2023-10-02 20:47 ` [PATCH v4] " Niko Tsirakis
2 siblings, 0 replies; 5+ messages in thread
From: Jani Nikula @ 2023-10-02 10:00 UTC (permalink / raw)
To: Pablo Ceballos, Ankit K Nautiyal
Cc: Tvrtko Ursulin, imre.deak, intel-gfx, linux-kernel, dri-devel,
Rodrigo Vivi, Pablo Ceballos
On Wed, 16 Aug 2023, Pablo Ceballos <pceballos@google.com> wrote:
> 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.
>
> Signed-off-by: Pablo Ceballos <pceballos@google.com>
Please file the issue at [1] as requested before, and reference it in
the commit message.
[1] https://gitlab.freedesktop.org/drm/intel/-/issues/new
> ---
>
> V2: Added more details in the commit message
> V3: Only apply the increased timeout if the vendor is Parade
>
> drivers/gpu/drm/i915/display/intel_lspcon.c | 21 ++++++++++++++++++++-
> 1 file changed, 20 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_lspcon.c b/drivers/gpu/drm/i915/display/intel_lspcon.c
> index bb3b5355a0d9..b07eab84cc63 100644
> --- a/drivers/gpu/drm/i915/display/intel_lspcon.c
> +++ b/drivers/gpu/drm/i915/display/intel_lspcon.c
> @@ -153,6 +153,24 @@ static enum drm_lspcon_mode lspcon_get_current_mode(struct intel_lspcon *lspcon)
> return current_mode;
> }
>
> +static u32 lspcon_get_mode_settle_timeout(struct intel_lspcon *lspcon)
> +{
> + u32 timeout_ms = 400;
Please use plain int for plain numbers. There's nothing u32 about this.
> +
> + /*
> + * 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.
> + */
> + if (lspcon->vendor == LSPCON_VENDOR_PARADE)
> + timeout_ms = 800;
> +
> + return timeout_ms;
All of the above is just
return lspcon->vendor == LSPCON_VENDOR_PARADE ? 800 : 400;
BR,
Jani.
> +}
> +
> +
> static enum drm_lspcon_mode lspcon_wait_mode(struct intel_lspcon *lspcon,
> enum drm_lspcon_mode mode)
> {
> @@ -167,7 +185,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");
--
Jani Nikula, Intel
^ permalink raw reply [flat|nested] 5+ messages in thread* [PATCH v4] drm/i915/display/lspcon: Increase LSPCON mode settle timeout
2023-08-16 4:56 [PATCH v3] drm/i915/display/lspcon: Increase LSPCON mode settle timeout Pablo Ceballos
2023-08-16 9:02 ` Jani Nikula
2023-10-02 10:00 ` Jani Nikula
@ 2023-10-02 20:47 ` Niko Tsirakis
2023-10-04 15:35 ` Jani Nikula
2 siblings, 1 reply; 5+ messages in thread
From: Niko Tsirakis @ 2023-10-02 20:47 UTC (permalink / raw)
To: dri-devel; +Cc: Niko Tsirakis, Pablo Ceballos
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: Pablo Ceballos <pceballos@google.com>
Signed-off-by: Niko Tsirakis <ntsirakis@google.com>
---
drivers/gpu/drm/i915/display/intel_lspcon.c | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/display/intel_lspcon.c b/drivers/gpu/drm/i915/display/intel_lspcon.c
index dc1b35559afd..92536482e657 100644
--- a/drivers/gpu/drm/i915/display/intel_lspcon.c
+++ b/drivers/gpu/drm/i915/display/intel_lspcon.c
@@ -116,6 +116,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)
{
@@ -128,7 +140,8 @@ static enum drm_lspcon_mode lspcon_wait_mode(struct intel_lspcon *lspcon,
DRM_DEBUG_KMS("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_ERROR("LSPCON mode hasn't settled\n");
--
2.42.0.582.g8ccd20d70d-goog
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH v4] drm/i915/display/lspcon: Increase LSPCON mode settle timeout
2023-10-02 20:47 ` [PATCH v4] " Niko Tsirakis
@ 2023-10-04 15:35 ` Jani Nikula
0 siblings, 0 replies; 5+ messages in thread
From: Jani Nikula @ 2023-10-04 15:35 UTC (permalink / raw)
To: Niko Tsirakis, dri-devel; +Cc: Niko Tsirakis, Pablo Ceballos
On Mon, 02 Oct 2023, Niko Tsirakis <ntsirakis@google.com> wrote:
> 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: Pablo Ceballos <pceballos@google.com>
> Signed-off-by: Niko Tsirakis <ntsirakis@google.com>
Thanks for the patch, pushed to drm-intel-next.
BR,
Jani.
> ---
> drivers/gpu/drm/i915/display/intel_lspcon.c | 15 ++++++++++++++-
> 1 file changed, 14 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_lspcon.c b/drivers/gpu/drm/i915/display/intel_lspcon.c
> index dc1b35559afd..92536482e657 100644
> --- a/drivers/gpu/drm/i915/display/intel_lspcon.c
> +++ b/drivers/gpu/drm/i915/display/intel_lspcon.c
> @@ -116,6 +116,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)
> {
> @@ -128,7 +140,8 @@ static enum drm_lspcon_mode lspcon_wait_mode(struct intel_lspcon *lspcon,
> DRM_DEBUG_KMS("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_ERROR("LSPCON mode hasn't settled\n");
--
Jani Nikula, Intel
^ permalink raw reply [flat|nested] 5+ messages in thread