mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2] drm/i915/display/lspcon: Increase LSPCON mode settle timeout
@ 2023-06-14 23:54 Pablo Ceballos
  2023-06-15  4:35 ` [Intel-gfx] " Nautiyal, Ankit K
  0 siblings, 1 reply; 4+ messages in thread
From: Pablo Ceballos @ 2023-06-14 23:54 UTC (permalink / raw)
  To: David Airlie, Daniel Vetter
  Cc: Jani Nikula, Joonas Lahtinen, Rodrigo Vivi, Tvrtko Ursulin,
	Ville Syrjälä,
	Sam Ravnborg, Pablo Ceballos, intel-gfx, dri-devel, linux-kernel

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>
---

Changelog since v1:
- Added more details in the commit message

 drivers/gpu/drm/i915/display/intel_lspcon.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/display/intel_lspcon.c b/drivers/gpu/drm/i915/display/intel_lspcon.c
index bb3b5355a0d9..d7299fdc43ad 100644
--- a/drivers/gpu/drm/i915/display/intel_lspcon.c
+++ b/drivers/gpu/drm/i915/display/intel_lspcon.c
@@ -167,7 +167,7 @@ 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, 800);
 	if (current_mode != mode)
 		drm_err(&i915->drm, "LSPCON mode hasn't settled\n");
 
-- 
2.41.0.162.gfafddb0af9-goog


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Intel-gfx] [PATCH v2] drm/i915/display/lspcon: Increase LSPCON mode settle timeout
  2023-06-14 23:54 [PATCH v2] drm/i915/display/lspcon: Increase LSPCON mode settle timeout Pablo Ceballos
@ 2023-06-15  4:35 ` Nautiyal, Ankit K
  2023-07-07 19:34   ` Pablo Ceballos
  0 siblings, 1 reply; 4+ messages in thread
From: Nautiyal, Ankit K @ 2023-06-15  4:35 UTC (permalink / raw)
  To: Pablo Ceballos, David Airlie, Daniel Vetter
  Cc: intel-gfx, linux-kernel, dri-devel, Rodrigo Vivi, Sam Ravnborg


On 6/15/2023 5:24 AM, Pablo Ceballos 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.

In one of the gitlab issue, it was tried with 1000ms as well, situation 
did improve, but issue didn't get fully resolved. [1].

I was wondering if trying to set LS/PCON mode multiple time will have 
any effect.

Unfortunately I do not have access to machine with Parade LSPCON chip, 
had suggested in yet another git lab issue [2].

I have a patch for this, sent to try-bot, though not sent to intel-gfx 
yet [3].


The timeout value was already increased from 100 ms to 400 ms earlier too.

If there is indeed no other way, perhaps need to have this solution.


[1] https://gitlab.freedesktop.org/drm/intel/-/issues/4516#note_1406500

[2] https://gitlab.freedesktop.org/drm/intel/-/issues/4458#note_1922654

[3] Patch : 
https://patchwork.freedesktop.org/patch/538819/?series=118208&rev=1


Regards,

Ankit


>
> Signed-off-by: Pablo Ceballos <pceballos@google.com>
> ---
>
> Changelog since v1:
> - Added more details in the commit message
>
>   drivers/gpu/drm/i915/display/intel_lspcon.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_lspcon.c b/drivers/gpu/drm/i915/display/intel_lspcon.c
> index bb3b5355a0d9..d7299fdc43ad 100644
> --- a/drivers/gpu/drm/i915/display/intel_lspcon.c
> +++ b/drivers/gpu/drm/i915/display/intel_lspcon.c
> @@ -167,7 +167,7 @@ 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, 800);
>   	if (current_mode != mode)
>   		drm_err(&i915->drm, "LSPCON mode hasn't settled\n");
>   

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Intel-gfx] [PATCH v2] drm/i915/display/lspcon: Increase LSPCON mode settle timeout
  2023-06-15  4:35 ` [Intel-gfx] " Nautiyal, Ankit K
@ 2023-07-07 19:34   ` Pablo Ceballos
  2023-07-10  4:02     ` Nautiyal, Ankit K
  0 siblings, 1 reply; 4+ messages in thread
From: Pablo Ceballos @ 2023-07-07 19:34 UTC (permalink / raw)
  To: Nautiyal, Ankit K
  Cc: David Airlie, Daniel Vetter, intel-gfx, linux-kernel, dri-devel,
	Rodrigo Vivi, Sam Ravnborg

On Wed, Jun 14, 2023 at 9:35 PM Nautiyal, Ankit K
<ankit.k.nautiyal@intel.com> wrote:
> I was wondering if trying to set LS/PCON mode multiple time will have
> any effect.
>
> Unfortunately I do not have access to machine with Parade LSPCON chip,
> had suggested in yet another git lab issue [2].
>
> I have a patch for this, sent to try-bot, though not sent to intel-gfx
> yet [3].

I tested this patch and it did not resolve the problem. The error log
was repeated multiple times and there were still link training issues
afterwards.

> The timeout value was already increased from 100 ms to 400 ms earlier too.
>
> If there is indeed no other way, perhaps need to have this solution.

Yes, can this please be merged?

Regards,
Pablo

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Intel-gfx] [PATCH v2] drm/i915/display/lspcon: Increase LSPCON mode settle timeout
  2023-07-07 19:34   ` Pablo Ceballos
@ 2023-07-10  4:02     ` Nautiyal, Ankit K
  0 siblings, 0 replies; 4+ messages in thread
From: Nautiyal, Ankit K @ 2023-07-10  4:02 UTC (permalink / raw)
  To: Pablo Ceballos
  Cc: David Airlie, Daniel Vetter, intel-gfx, linux-kernel, dri-devel,
	Rodrigo Vivi, Sam Ravnborg


On 7/8/2023 1:04 AM, Pablo Ceballos wrote:
> On Wed, Jun 14, 2023 at 9:35 PM Nautiyal, Ankit K
> <ankit.k.nautiyal@intel.com> wrote:
>> I was wondering if trying to set LS/PCON mode multiple time will have
>> any effect.
>>
>> Unfortunately I do not have access to machine with Parade LSPCON chip,
>> had suggested in yet another git lab issue [2].
>>
>> I have a patch for this, sent to try-bot, though not sent to intel-gfx
>> yet [3].
> I tested this patch and it did not resolve the problem. The error log
> was repeated multiple times and there were still link training issues
> afterwards.

Really appreciate to try this thing out, thanks. Too bad it didn't 
workout :(

I have seen increasing timeout does improves situation, but didn't have 
enough data points to come to a timeout value.

I agree with the change based on the experiments and data you have shared.

Lets just change the timeout to 800 ms when the lspcon->vendor is 
LSPCON_VENDOR_PARADE, so that it doesn't have any effect on platforms 
that don't have this.

IMHO a function to get timeout value based on lspcon vendor will be 
better (returns 800 ms for Parade, 400 otherwise.)

In the function itself, we can have the explanation of arriving at 800 
ms for the Parade chip (as given in the commit message) as a comment.


Thanks again for trying different solutions.

Regards,

Ankit


>> The timeout value was already increased from 100 ms to 400 ms earlier too.
>>
>> If there is indeed no other way, perhaps need to have this solution.
> Yes, can this please be merged?
>
> Regards,
> Pablo

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-07-10  4:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-14 23:54 [PATCH v2] drm/i915/display/lspcon: Increase LSPCON mode settle timeout Pablo Ceballos
2023-06-15  4:35 ` [Intel-gfx] " Nautiyal, Ankit K
2023-07-07 19:34   ` Pablo Ceballos
2023-07-10  4:02     ` Nautiyal, Ankit K

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®