mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] drm/display: Bump LSPCON mode switch timeout to 1000ms
@ 2026-01-11 18:03 TrainedPro
  2026-01-13  8:55 ` Jani Nikula
  2026-01-21  6:23 ` Nautiyal, Ankit K
  0 siblings, 2 replies; 3+ messages in thread
From: TrainedPro @ 2026-01-11 18:03 UTC (permalink / raw)
  To: Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann
  Cc: David Airlie, Daniel Vetter, dri-devel, linux-kernel, TrainedPro

The Parade PS175 LSPCON chip often requires up to 800ms to settle after a mode change, particularly during resume.

Although the Intel driver (intel_lspcon.c) is aware of this 800ms requirement, it calls the shared helper `drm_lspcon_set_mode()`, which currently hardcodes a 200ms timeout. This specific implementation forces a 200ms limit, effectively overriding the driver's knowledge and causing the mode change to time out prematurely, which results in a black screen (never waking up).

This patch increases the hardcoded timeout in the helper from 200ms to 1000ms. Since the function polls for the status bit, this change does not penalize faster chips but ensures correct operation for slower ones like the PS175.

Signed-off-by: TrainedPro <hassaananwar12345@gmail.com>
---
 drivers/gpu/drm/display/drm_dp_dual_mode_helper.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/display/drm_dp_dual_mode_helper.c b/drivers/gpu/drm/display/drm_dp_dual_mode_helper.c
index 719da3610310f..fda3cb4966adf 100644
--- a/drivers/gpu/drm/display/drm_dp_dual_mode_helper.c
+++ b/drivers/gpu/drm/display/drm_dp_dual_mode_helper.c
@@ -495,7 +495,7 @@ int drm_lspcon_set_mode(const struct drm_device *dev, struct i2c_adapter *adapte
 {
 	u8 data = 0;
 	int ret;
-	int time_out = 200;
+	int time_out = 1000;
 	enum drm_lspcon_mode current_mode;
 
 	if (mode == DRM_LSPCON_MODE_PCON)
-- 
2.43.0


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

* Re: [PATCH] drm/display: Bump LSPCON mode switch timeout to 1000ms
  2026-01-11 18:03 [PATCH] drm/display: Bump LSPCON mode switch timeout to 1000ms TrainedPro
@ 2026-01-13  8:55 ` Jani Nikula
  2026-01-21  6:23 ` Nautiyal, Ankit K
  1 sibling, 0 replies; 3+ messages in thread
From: Jani Nikula @ 2026-01-13  8:55 UTC (permalink / raw)
  To: TrainedPro, Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann
  Cc: David Airlie, Daniel Vetter, dri-devel, linux-kernel, TrainedPro

On Sun, 11 Jan 2026, TrainedPro <hassaananwar12345@gmail.com> wrote:
> The Parade PS175 LSPCON chip often requires up to 800ms to settle after a mode change, particularly during resume.
>
> Although the Intel driver (intel_lspcon.c) is aware of this 800ms requirement, it calls the shared helper `drm_lspcon_set_mode()`, which currently hardcodes a 200ms timeout. This specific implementation forces a 200ms limit, effectively overriding the driver's knowledge and causing the mode change to time out prematurely, which results in a black screen (never waking up).
>
> This patch increases the hardcoded timeout in the helper from 200ms to 1000ms. Since the function polls for the status bit, this change does not penalize faster chips but ensures correct operation for slower ones like the PS175.
>
> Signed-off-by: TrainedPro <hassaananwar12345@gmail.com>

Is there an existing gitlab issue with dmesg logs about the issue? See
[1] for how to report one.

BR,
Jani.


[1] https://drm.pages.freedesktop.org/intel-docs/how-to-file-i915-bugs.html



> ---
>  drivers/gpu/drm/display/drm_dp_dual_mode_helper.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/display/drm_dp_dual_mode_helper.c b/drivers/gpu/drm/display/drm_dp_dual_mode_helper.c
> index 719da3610310f..fda3cb4966adf 100644
> --- a/drivers/gpu/drm/display/drm_dp_dual_mode_helper.c
> +++ b/drivers/gpu/drm/display/drm_dp_dual_mode_helper.c
> @@ -495,7 +495,7 @@ int drm_lspcon_set_mode(const struct drm_device *dev, struct i2c_adapter *adapte
>  {
>  	u8 data = 0;
>  	int ret;
> -	int time_out = 200;
> +	int time_out = 1000;
>  	enum drm_lspcon_mode current_mode;
>  
>  	if (mode == DRM_LSPCON_MODE_PCON)

-- 
Jani Nikula, Intel

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

* Re: [PATCH] drm/display: Bump LSPCON mode switch timeout to 1000ms
  2026-01-11 18:03 [PATCH] drm/display: Bump LSPCON mode switch timeout to 1000ms TrainedPro
  2026-01-13  8:55 ` Jani Nikula
@ 2026-01-21  6:23 ` Nautiyal, Ankit K
  1 sibling, 0 replies; 3+ messages in thread
From: Nautiyal, Ankit K @ 2026-01-21  6:23 UTC (permalink / raw)
  To: TrainedPro, Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann
  Cc: David Airlie, Daniel Vetter, dri-devel, linux-kernel


On 1/11/2026 11:33 PM, TrainedPro wrote:
> The Parade PS175 LSPCON chip often requires up to 800ms to settle after a mode change, particularly during resume.
>
> Although the Intel driver (intel_lspcon.c) is aware of this 800ms requirement, it calls the shared helper `drm_lspcon_set_mode()`, which currently hardcodes a 200ms timeout. This specific implementation forces a 200ms limit, effectively overriding the driver's knowledge and causing the mode change to time out prematurely, which results in a black screen (never waking up).
>
> This patch increases the hardcoded timeout in the helper from 200ms to 1000ms. Since the function polls for the status bit, this change does not penalize faster chips but ensures correct operation for slower ones like the PS175.
>
> Signed-off-by: TrainedPro <hassaananwar12345@gmail.com>
> ---
>   drivers/gpu/drm/display/drm_dp_dual_mode_helper.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/display/drm_dp_dual_mode_helper.c b/drivers/gpu/drm/display/drm_dp_dual_mode_helper.c
> index 719da3610310f..fda3cb4966adf 100644
> --- a/drivers/gpu/drm/display/drm_dp_dual_mode_helper.c
> +++ b/drivers/gpu/drm/display/drm_dp_dual_mode_helper.c
> @@ -495,7 +495,7 @@ int drm_lspcon_set_mode(const struct drm_device *dev, struct i2c_adapter *adapte
>   {
>   	u8 data = 0;
>   	int ret;
> -	int time_out = 200;
> +	int time_out = 1000;


The change to increase the timeout was already made more than a year ago 
[1].
Could you please try with the latest drm-tip and see if the issue still 
persists?

[1] 
https://gitlab.freedesktop.org/drm/tip/-/commit/2e0727c347467775a2dfa7d850a3a029f3212e58 



Regards,

Ankit

>   	enum drm_lspcon_mode current_mode;
>   
>   	if (mode == DRM_LSPCON_MODE_PCON)

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

end of thread, other threads:[~2026-01-21  6:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-01-11 18:03 [PATCH] drm/display: Bump LSPCON mode switch timeout to 1000ms TrainedPro
2026-01-13  8:55 ` Jani Nikula
2026-01-21  6:23 ` 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®