From: Jani Nikula <jani.nikula@linux.intel.com>
To: Pablo Ceballos <pceballos@google.com>,
Ankit K Nautiyal <ankit.k.nautiyal@intel.com>
Cc: imre.deak@linux.intel.com, intel-gfx@lists.freedesktop.org,
linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
Daniel Vetter <daniel@ffwll.ch>,
Rodrigo Vivi <rodrigo.vivi@intel.com>,
David Airlie <airlied@gmail.com>,
Pablo Ceballos <pceballos@google.com>
Subject: Re: [Intel-gfx] [PATCH v3] drm/i915/display/lspcon: Increase LSPCON mode settle timeout
Date: Mon, 02 Oct 2023 13:00:05 +0300 [thread overview]
Message-ID: <87r0mdgx96.fsf@intel.com> (raw)
In-Reply-To: <20230816045654.833973-1-pceballos@google.com>
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
WARNING: multiple messages have this Message-ID (diff)
From: Jani Nikula <jani.nikula@linux.intel.com>
To: Pablo Ceballos <pceballos@google.com>,
Ankit K Nautiyal <ankit.k.nautiyal@intel.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>,
imre.deak@linux.intel.com, intel-gfx@lists.freedesktop.org,
linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
Rodrigo Vivi <rodrigo.vivi@intel.com>,
Pablo Ceballos <pceballos@google.com>
Subject: Re: [PATCH v3] drm/i915/display/lspcon: Increase LSPCON mode settle timeout
Date: Mon, 02 Oct 2023 13:00:05 +0300 [thread overview]
Message-ID: <87r0mdgx96.fsf@intel.com> (raw)
In-Reply-To: <20230816045654.833973-1-pceballos@google.com>
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
WARNING: multiple messages have this Message-ID (diff)
From: Jani Nikula <jani.nikula@linux.intel.com>
To: Pablo Ceballos <pceballos@google.com>,
Ankit K Nautiyal <ankit.k.nautiyal@intel.com>
Cc: "David Airlie" <airlied@gmail.com>,
"Daniel Vetter" <daniel@ffwll.ch>,
"Joonas Lahtinen" <joonas.lahtinen@linux.intel.com>,
"Rodrigo Vivi" <rodrigo.vivi@intel.com>,
"Tvrtko Ursulin" <tvrtko.ursulin@linux.intel.com>,
"Ville Syrjälä" <ville.syrjala@linux.intel.com>,
"Pablo Ceballos" <pceballos@google.com>,
intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
linux-kernel@vger.kernel.org, imre.deak@linux.intel.com
Subject: Re: [PATCH v3] drm/i915/display/lspcon: Increase LSPCON mode settle timeout
Date: Mon, 02 Oct 2023 13:00:05 +0300 [thread overview]
Message-ID: <87r0mdgx96.fsf@intel.com> (raw)
In-Reply-To: <20230816045654.833973-1-pceballos@google.com>
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
next prev parent reply other threads:[~2023-10-02 10:01 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-16 4:56 [Intel-gfx] [PATCH v3] drm/i915/display/lspcon: Increase LSPCON mode settle timeout Pablo Ceballos
2023-08-16 4:56 ` Pablo Ceballos
2023-08-16 4:56 ` Pablo Ceballos
2023-08-16 6:50 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915/display/lspcon: Increase LSPCON mode settle timeout (rev4) Patchwork
2023-08-16 6:50 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2023-08-16 7:08 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2023-08-16 9:02 ` [Intel-gfx] [PATCH v3] drm/i915/display/lspcon: Increase LSPCON mode settle timeout Jani Nikula
2023-08-16 9:02 ` Jani Nikula
2023-08-16 9:02 ` Jani Nikula
2023-08-16 10:42 ` [Intel-gfx] ✗ Fi.CI.IGT: failure for drm/i915/display/lspcon: Increase LSPCON mode settle timeout (rev4) Patchwork
2023-10-02 10:00 ` Jani Nikula [this message]
2023-10-02 10:00 ` [PATCH v3] drm/i915/display/lspcon: Increase LSPCON mode settle timeout Jani Nikula
2023-10-02 10:00 ` Jani Nikula
2023-10-02 20:47 ` [PATCH v4] " Niko Tsirakis
2023-10-04 15:35 ` Jani Nikula
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87r0mdgx96.fsf@intel.com \
--to=jani.nikula@linux.intel.com \
--cc=airlied@gmail.com \
--cc=ankit.k.nautiyal@intel.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=imre.deak@linux.intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pceballos@google.com \
--cc=rodrigo.vivi@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.