Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915/alpm: Fix tCDS multiplier in AUX-less wake time
@ 2026-12-03  3:46 Lee Shawn C
  2026-12-03  3:58 ` sashiko-bot
                   ` (5 more replies)
  0 siblings, 6 replies; 11+ messages in thread
From: Lee Shawn C @ 2026-12-03  3:46 UTC (permalink / raw)
  To: intel-gfx; +Cc: Lee Shawn C, Ankit Nautiyal, Jouni Högander

eDP 1.5 Figure 5-8 shows the CDS period as 2 x t2.
Use it in the wake time calculation instead of 1 x t2.

Cc: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Cc: Jouni Högander <jouni.hogander@intel.com>
Signed-off-by: Lee Shawn C <shawn.c.lee@intel.com>
---
 drivers/gpu/drm/i915/display/intel_alpm.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_alpm.c b/drivers/gpu/drm/i915/display/intel_alpm.c
index 105006ca6be7..897b24c7fafd 100644
--- a/drivers/gpu/drm/i915/display/intel_alpm.c
+++ b/drivers/gpu/drm/i915/display/intel_alpm.c
@@ -92,7 +92,7 @@ static int get_lfps_half_cycle_clocks(const struct intel_crtc_state *crtc_state)
  * The tLFPS_Period, Max term is 800ns
  * The tSilence, Max term is 180ns
  * The tPHY Establishment (a.k.a. t1) term is 50us
- * The tCDS term is 1 or 2 times t2
+ * The tCDS term is 2 times t2, it can be configurable
  * t2 = Number ML_PHY_LOCK * tML_PHY_LOCK
  * Number ML_PHY_LOCK = ( 7 + CEILING( 6.5us / tML_PHY_LOCK ) + 1)
  * Rounding up the 6.5us padding to the next ML_PHY_LOCK boundary and
@@ -111,7 +111,7 @@ static int _lnl_compute_aux_less_wake_time(const struct intel_crtc_state *crtc_s
 	int tml_phy_lock = 1000 * 1000 * tps4 / crtc_state->port_clock;
 	int num_ml_phy_lock = 7 + DIV_ROUND_UP(6500, tml_phy_lock) + 1;
 	int t2 = num_ml_phy_lock * tml_phy_lock;
-	int tcds = 1 * t2;
+	int tcds = 2 * t2;
 
 	return DIV_ROUND_UP(tphy2_p2_to_p0 + get_lfps_cycle_time(crtc_state) +
 			    SILENCE_PERIOD_TIME + t1 + tcds, 1000);
-- 
2.53.0


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

* Re: [PATCH] drm/i915/alpm: Fix tCDS multiplier in AUX-less wake time
  2026-12-03  3:46 [PATCH] drm/i915/alpm: Fix tCDS multiplier in AUX-less wake time Lee Shawn C
@ 2026-12-03  3:58 ` sashiko-bot
  2026-12-03  4:12 ` [PATCH v2] " Lee Shawn C
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 11+ messages in thread
From: sashiko-bot @ 2026-12-03  3:58 UTC (permalink / raw)
  To: Lee Shawn C, intel-gfx

Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] drm/i915/alpm: missing Fixes trailer for
  _lnl_compute_aux_less_wake_time() fix
--

commit cc84d9f7382b309ab17f5f11afd031b20a986feb
Author: Lee Shawn C <shawn.c.lee@intel.com>

> drm/i915/alpm: Fix tCDS multiplier in AUX-less wake time
>
> eDP 1.5 Figure 5-8 shows the CDS period as 2 x t2.
> Use it in the wake time calculation instead of 1 x t2.
>
> Cc: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
> Cc: Jouni Högander <jouni.hogander@intel.com>
> Signed-off-by: Lee Shawn C <shawn.c.lee@intel.com>

[Severity: Low]
This fixes the AUX-less wake time calculation in
_lnl_compute_aux_less_wake_time().  Should this include:

  Fixes: da6a9836ac09 ("drm/i915/psr: Calculate aux less wake time")

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261203034645.582597-1-shawn.c.lee@intel.com?part=1

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

* [PATCH v2] drm/i915/alpm: Fix tCDS multiplier in AUX-less wake time
  2026-12-03  3:46 [PATCH] drm/i915/alpm: Fix tCDS multiplier in AUX-less wake time Lee Shawn C
  2026-12-03  3:58 ` sashiko-bot
@ 2026-12-03  4:12 ` Lee Shawn C
  2026-12-03  6:07   ` Hogander, Jouni
  2026-12-03  4:33 ` ✓ i915.CI.BAT: success for " Patchwork
                   ` (3 subsequent siblings)
  5 siblings, 1 reply; 11+ messages in thread
From: Lee Shawn C @ 2026-12-03  4:12 UTC (permalink / raw)
  To: intel-gfx, intel-xe; +Cc: Lee Shawn C, Ankit Nautiyal, Jouni Högander

eDP 1.5 Figure 5-8 shows the CDS period as 2 x t2.
Use it in the wake time calculation instead of 1 x t2.

v2: Add Fixes tag

Fixes: da6a9836ac09 ("drm/i915/psr: Calculate aux less wake time")
Cc: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Cc: Jouni Högander <jouni.hogander@intel.com>
Signed-off-by: Lee Shawn C <shawn.c.lee@intel.com>
---
 drivers/gpu/drm/i915/display/intel_alpm.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_alpm.c b/drivers/gpu/drm/i915/display/intel_alpm.c
index 105006ca6be7..897b24c7fafd 100644
--- a/drivers/gpu/drm/i915/display/intel_alpm.c
+++ b/drivers/gpu/drm/i915/display/intel_alpm.c
@@ -92,7 +92,7 @@ static int get_lfps_half_cycle_clocks(const struct intel_crtc_state *crtc_state)
  * The tLFPS_Period, Max term is 800ns
  * The tSilence, Max term is 180ns
  * The tPHY Establishment (a.k.a. t1) term is 50us
- * The tCDS term is 1 or 2 times t2
+ * The tCDS term is 2 times t2, it can be configurable
  * t2 = Number ML_PHY_LOCK * tML_PHY_LOCK
  * Number ML_PHY_LOCK = ( 7 + CEILING( 6.5us / tML_PHY_LOCK ) + 1)
  * Rounding up the 6.5us padding to the next ML_PHY_LOCK boundary and
@@ -111,7 +111,7 @@ static int _lnl_compute_aux_less_wake_time(const struct intel_crtc_state *crtc_s
 	int tml_phy_lock = 1000 * 1000 * tps4 / crtc_state->port_clock;
 	int num_ml_phy_lock = 7 + DIV_ROUND_UP(6500, tml_phy_lock) + 1;
 	int t2 = num_ml_phy_lock * tml_phy_lock;
-	int tcds = 1 * t2;
+	int tcds = 2 * t2;
 
 	return DIV_ROUND_UP(tphy2_p2_to_p0 + get_lfps_cycle_time(crtc_state) +
 			    SILENCE_PERIOD_TIME + t1 + tcds, 1000);
-- 
2.53.0


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

* ✓ i915.CI.BAT: success for drm/i915/alpm: Fix tCDS multiplier in AUX-less wake time
  2026-12-03  3:46 [PATCH] drm/i915/alpm: Fix tCDS multiplier in AUX-less wake time Lee Shawn C
  2026-12-03  3:58 ` sashiko-bot
  2026-12-03  4:12 ` [PATCH v2] " Lee Shawn C
@ 2026-12-03  4:33 ` Patchwork
  2026-12-03  5:02 ` ✓ i915.CI.BAT: success for drm/i915/alpm: Fix tCDS multiplier in AUX-less wake time (rev2) Patchwork
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 11+ messages in thread
From: Patchwork @ 2026-12-03  4:33 UTC (permalink / raw)
  To: Lee Shawn C; +Cc: intel-gfx

[-- Attachment #1: Type: text/plain, Size: 2032 bytes --]

== Series Details ==

Series: drm/i915/alpm: Fix tCDS multiplier in AUX-less wake time
URL   : https://patchwork.freedesktop.org/series/180383/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_19656 -> Patchwork_180383v1
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_180383v1/index.html

Participating hosts (39 -> 37)
------------------------------

  Missing    (2): bat-dg2-13 fi-tgl-1115g4 

Known issues
------------

  Here are the changes found in Patchwork_180383v1 that come from known issues:

### IGT changes ###

#### Possible fixes ####

  * igt@i915_selftest@live@late_gt_pm:
    - fi-cfl-8109u:       [DMESG-WARN][1] ([i915#13735]) -> [PASS][2] +80 other tests pass
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_19656/fi-cfl-8109u/igt@i915_selftest@live@late_gt_pm.html
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_180383v1/fi-cfl-8109u/igt@i915_selftest@live@late_gt_pm.html

  * igt@kms_pipe_crc_basic@read-crc:
    - fi-cfl-8109u:       [DMESG-WARN][3] ([i915#13735] / [i915#15673]) -> [PASS][4] +49 other tests pass
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_19656/fi-cfl-8109u/igt@kms_pipe_crc_basic@read-crc.html
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_180383v1/fi-cfl-8109u/igt@kms_pipe_crc_basic@read-crc.html

  
  [i915#13735]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/13735
  [i915#15673]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/15673


Build changes
-------------

  * Linux: CI_DRM_19656 -> Patchwork_180383v1

  CI-20190529: 20190529
  CI_DRM_19656: acd75be5933b65fbec28b648d318128a8b26593a @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_9223: 9223
  Patchwork_180383v1: acd75be5933b65fbec28b648d318128a8b26593a @ git://anongit.freedesktop.org/gfx-ci/linux

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_180383v1/index.html

[-- Attachment #2: Type: text/html, Size: 2728 bytes --]

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

* ✓ i915.CI.BAT: success for drm/i915/alpm: Fix tCDS multiplier in AUX-less wake time (rev2)
  2026-12-03  3:46 [PATCH] drm/i915/alpm: Fix tCDS multiplier in AUX-less wake time Lee Shawn C
                   ` (2 preceding siblings ...)
  2026-12-03  4:33 ` ✓ i915.CI.BAT: success for " Patchwork
@ 2026-12-03  5:02 ` Patchwork
  2026-12-03 10:38 ` [PATCH v3] drm/i915/alpm: Fix tCDS multiplier in AUX-less wake time Lee Shawn C
  2026-12-03 12:02 ` ✓ i915.CI.BAT: success for drm/i915/alpm: Fix tCDS multiplier in AUX-less wake time (rev3) Patchwork
  5 siblings, 0 replies; 11+ messages in thread
From: Patchwork @ 2026-12-03  5:02 UTC (permalink / raw)
  To: Lee Shawn C; +Cc: intel-gfx

[-- Attachment #1: Type: text/plain, Size: 2418 bytes --]

== Series Details ==

Series: drm/i915/alpm: Fix tCDS multiplier in AUX-less wake time (rev2)
URL   : https://patchwork.freedesktop.org/series/180383/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_19656 -> Patchwork_180383v2
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_180383v2/index.html

Participating hosts (39 -> 37)
------------------------------

  Missing    (2): bat-dg2-13 bat-adls-6 

Known issues
------------

  Here are the changes found in Patchwork_180383v2 that come from known issues:

### IGT changes ###

#### Possible fixes ####

  * igt@i915_selftest@live@late_gt_pm:
    - fi-cfl-8109u:       [DMESG-WARN][1] ([i915#13735]) -> [PASS][2] +80 other tests pass
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_19656/fi-cfl-8109u/igt@i915_selftest@live@late_gt_pm.html
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_180383v2/fi-cfl-8109u/igt@i915_selftest@live@late_gt_pm.html

  * igt@kms_pipe_crc_basic@read-crc:
    - fi-cfl-8109u:       [DMESG-WARN][3] ([i915#13735] / [i915#15673]) -> [PASS][4] +49 other tests pass
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_19656/fi-cfl-8109u/igt@kms_pipe_crc_basic@read-crc.html
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_180383v2/fi-cfl-8109u/igt@kms_pipe_crc_basic@read-crc.html

  * igt@vgem_basic@unload:
    - bat-rpls-4:         [DMESG-WARN][5] ([i915#13400]) -> [PASS][6]
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_19656/bat-rpls-4/igt@vgem_basic@unload.html
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_180383v2/bat-rpls-4/igt@vgem_basic@unload.html

  
  [i915#13400]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/13400
  [i915#13735]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/13735
  [i915#15673]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/15673


Build changes
-------------

  * Linux: CI_DRM_19656 -> Patchwork_180383v2

  CI-20190529: 20190529
  CI_DRM_19656: acd75be5933b65fbec28b648d318128a8b26593a @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_9223: 9223
  Patchwork_180383v2: acd75be5933b65fbec28b648d318128a8b26593a @ git://anongit.freedesktop.org/gfx-ci/linux

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_180383v2/index.html

[-- Attachment #2: Type: text/html, Size: 3142 bytes --]

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

* Re: [PATCH v2] drm/i915/alpm: Fix tCDS multiplier in AUX-less wake time
  2026-12-03  4:12 ` [PATCH v2] " Lee Shawn C
@ 2026-12-03  6:07   ` Hogander, Jouni
  2026-12-03  7:00     ` Lee, Shawn C
  0 siblings, 1 reply; 11+ messages in thread
From: Hogander, Jouni @ 2026-12-03  6:07 UTC (permalink / raw)
  To: intel-xe@lists.freedesktop.org, Lee, Shawn C,
	intel-gfx@lists.freedesktop.org
  Cc: Nautiyal, Ankit K

On Thu, 2026-12-03 at 04:12 +0000, Lee Shawn C wrote:
> eDP 1.5 Figure 5-8 shows the CDS period as 2 x t2.
> Use it in the wake time calculation instead of 1 x t2.
> 
> v2: Add Fixes tag

This is a good catch. There is a "Period of CDS Phase" in sink ALPM
configuration register. Have you tested if it helps to set that as 1
(1xt2) instead of switching to 2*t2? I assume this is fixing the issue
where increasing AUX Less waketime by 1 lines helps.

BR,
Jouni Högander

> 
> Fixes: da6a9836ac09 ("drm/i915/psr: Calculate aux less wake time")
> Cc: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
> Cc: Jouni Högander <jouni.hogander@intel.com>
> Signed-off-by: Lee Shawn C <shawn.c.lee@intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_alpm.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_alpm.c
> b/drivers/gpu/drm/i915/display/intel_alpm.c
> index 105006ca6be7..897b24c7fafd 100644
> --- a/drivers/gpu/drm/i915/display/intel_alpm.c
> +++ b/drivers/gpu/drm/i915/display/intel_alpm.c
> @@ -92,7 +92,7 @@ static int get_lfps_half_cycle_clocks(const struct
> intel_crtc_state *crtc_state)
>   * The tLFPS_Period, Max term is 800ns
>   * The tSilence, Max term is 180ns
>   * The tPHY Establishment (a.k.a. t1) term is 50us
> - * The tCDS term is 1 or 2 times t2
> + * The tCDS term is 2 times t2, it can be configurable
>   * t2 = Number ML_PHY_LOCK * tML_PHY_LOCK
>   * Number ML_PHY_LOCK = ( 7 + CEILING( 6.5us / tML_PHY_LOCK ) + 1)
>   * Rounding up the 6.5us padding to the next ML_PHY_LOCK boundary
> and
> @@ -111,7 +111,7 @@ static int _lnl_compute_aux_less_wake_time(const
> struct intel_crtc_state *crtc_s
>  	int tml_phy_lock = 1000 * 1000 * tps4 / crtc_state-
> >port_clock;
>  	int num_ml_phy_lock = 7 + DIV_ROUND_UP(6500, tml_phy_lock) +
> 1;
>  	int t2 = num_ml_phy_lock * tml_phy_lock;
> -	int tcds = 1 * t2;
> +	int tcds = 2 * t2;
>  
>  	return DIV_ROUND_UP(tphy2_p2_to_p0 +
> get_lfps_cycle_time(crtc_state) +
>  			    SILENCE_PERIOD_TIME + t1 + tcds, 1000);

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

* RE: [PATCH v2] drm/i915/alpm: Fix tCDS multiplier in AUX-less wake time
  2026-12-03  6:07   ` Hogander, Jouni
@ 2026-12-03  7:00     ` Lee, Shawn C
  2026-12-03  7:32       ` Hogander, Jouni
  0 siblings, 1 reply; 11+ messages in thread
From: Lee, Shawn C @ 2026-12-03  7:00 UTC (permalink / raw)
  To: Hogander, Jouni, intel-xe@lists.freedesktop.org,
	intel-gfx@lists.freedesktop.org
  Cc: Nautiyal, Ankit K

On Thursday, December 3, 2026 2:07 PM, Thu, Hogander, Jouni wrote:
>On Thu, 2026-12-03 at 04:12 +0000, Lee Shawn C wrote:
>> eDP 1.5 Figure 5-8 shows the CDS period as 2 x t2.
>> Use it in the wake time calculation instead of 1 x t2.
>> 
>> v2: Add Fixes tag
>
>This is a good catch. There is a "Period of CDS Phase" in sink ALPM configuration register. Have you tested if it helps to set that as 1
>(1xt2) instead of switching to 2*t2? I assume this is fixing the issue where increasing AUX Less waketime by 1 lines helps.
>
>BR,
>Jouni Högander
>

Yes, I tried setting DPCD 0x116 bit 3 to 1 (1 x t2 on sink), with the wake time calculated using 1 x t2.
The panel still flickers on Panel Replay enter/exit.

With the wake time calculated with 2 x t2, the flicker is gone. From my point of view, 2 x t2 adds a bit more AUX-less wake time,
but it gives better compatibility with the panel.

Best regards,
Shawn

>> 
>> Fixes: da6a9836ac09 ("drm/i915/psr: Calculate aux less wake time")
>> Cc: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
>> Cc: Jouni Högander <jouni.hogander@intel.com>
>> Signed-off-by: Lee Shawn C <shawn.c.lee@intel.com>
>> ---
>>  drivers/gpu/drm/i915/display/intel_alpm.c | 4 ++--
>>  1 file changed, 2 insertions(+), 2 deletions(-)
>> 
>> diff --git a/drivers/gpu/drm/i915/display/intel_alpm.c
>> b/drivers/gpu/drm/i915/display/intel_alpm.c
>> index 105006ca6be7..897b24c7fafd 100644
>> --- a/drivers/gpu/drm/i915/display/intel_alpm.c
>> +++ b/drivers/gpu/drm/i915/display/intel_alpm.c
>> @@ -92,7 +92,7 @@ static int get_lfps_half_cycle_clocks(const struct 
>> intel_crtc_state *crtc_state)
>>   * The tLFPS_Period, Max term is 800ns
>>   * The tSilence, Max term is 180ns
>>   * The tPHY Establishment (a.k.a. t1) term is 50us
>> - * The tCDS term is 1 or 2 times t2
>> + * The tCDS term is 2 times t2, it can be configurable
>>   * t2 = Number ML_PHY_LOCK * tML_PHY_LOCK
>>   * Number ML_PHY_LOCK = ( 7 + CEILING( 6.5us / tML_PHY_LOCK ) + 1)
>>   * Rounding up the 6.5us padding to the next ML_PHY_LOCK boundary and 
>> @@ -111,7 +111,7 @@ static int _lnl_compute_aux_less_wake_time(const
>> struct intel_crtc_state *crtc_s
>>  	int tml_phy_lock = 1000 * 1000 * tps4 / crtc_state-
>> >port_clock;
>>  	int num_ml_phy_lock = 7 + DIV_ROUND_UP(6500, tml_phy_lock) + 1;
>>  	int t2 = num_ml_phy_lock * tml_phy_lock;
>> -	int tcds = 1 * t2;
>> +	int tcds = 2 * t2;
>>  
>>  	return DIV_ROUND_UP(tphy2_p2_to_p0 +
>> get_lfps_cycle_time(crtc_state) +
>>  			    SILENCE_PERIOD_TIME + t1 + tcds, 1000);

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

* Re: [PATCH v2] drm/i915/alpm: Fix tCDS multiplier in AUX-less wake time
  2026-12-03  7:00     ` Lee, Shawn C
@ 2026-12-03  7:32       ` Hogander, Jouni
  2026-12-03  8:07         ` Nautiyal, Ankit K
  0 siblings, 1 reply; 11+ messages in thread
From: Hogander, Jouni @ 2026-12-03  7:32 UTC (permalink / raw)
  To: intel-xe@lists.freedesktop.org, Lee, Shawn C,
	intel-gfx@lists.freedesktop.org
  Cc: Nautiyal, Ankit K

On Thu, 2026-12-03 at 07:00 +0000, Lee, Shawn C wrote:
> On Thursday, December 3, 2026 2:07 PM, Thu, Hogander, Jouni wrote:
> > On Thu, 2026-12-03 at 04:12 +0000, Lee Shawn C wrote:
> > > eDP 1.5 Figure 5-8 shows the CDS period as 2 x t2.
> > > Use it in the wake time calculation instead of 1 x t2.
> > > 
> > > v2: Add Fixes tag
> > 
> > This is a good catch. There is a "Period of CDS Phase" in sink ALPM
> > configuration register. Have you tested if it helps to set that as
> > 1
> > (1xt2) instead of switching to 2*t2? I assume this is fixing the
> > issue where increasing AUX Less waketime by 1 lines helps.
> > 
> > BR,
> > Jouni Högander
> > 
> 
> Yes, I tried setting DPCD 0x116 bit 3 to 1 (1 x t2 on sink), with the
> wake time calculated using 1 x t2.
> The panel still flickers on Panel Replay enter/exit.
> 
> With the wake time calculated with 2 x t2, the flicker is gone. From
> my point of view, 2 x t2 adds a bit more AUX-less wake time,
> but it gives better compatibility with the panel.

Ok, thank you for the confirmation. Lets use this one then:

Reviewed-by: Jouni Högander <jouni.hogander@intel.com>

> 
> Best regards,
> Shawn
> 
> > > 
> > > Fixes: da6a9836ac09 ("drm/i915/psr: Calculate aux less wake
> > > time")
> > > Cc: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
> > > Cc: Jouni Högander <jouni.hogander@intel.com>
> > > Signed-off-by: Lee Shawn C <shawn.c.lee@intel.com>
> > > ---
> > >  drivers/gpu/drm/i915/display/intel_alpm.c | 4 ++--
> > >  1 file changed, 2 insertions(+), 2 deletions(-)
> > > 
> > > diff --git a/drivers/gpu/drm/i915/display/intel_alpm.c
> > > b/drivers/gpu/drm/i915/display/intel_alpm.c
> > > index 105006ca6be7..897b24c7fafd 100644
> > > --- a/drivers/gpu/drm/i915/display/intel_alpm.c
> > > +++ b/drivers/gpu/drm/i915/display/intel_alpm.c
> > > @@ -92,7 +92,7 @@ static int get_lfps_half_cycle_clocks(const
> > > struct 
> > > intel_crtc_state *crtc_state)
> > >   * The tLFPS_Period, Max term is 800ns
> > >   * The tSilence, Max term is 180ns
> > >   * The tPHY Establishment (a.k.a. t1) term is 50us
> > > - * The tCDS term is 1 or 2 times t2
> > > + * The tCDS term is 2 times t2, it can be configurable
> > >   * t2 = Number ML_PHY_LOCK * tML_PHY_LOCK
> > >   * Number ML_PHY_LOCK = ( 7 + CEILING( 6.5us / tML_PHY_LOCK ) +
> > > 1)
> > >   * Rounding up the 6.5us padding to the next ML_PHY_LOCK
> > > boundary and 
> > > @@ -111,7 +111,7 @@ static int
> > > _lnl_compute_aux_less_wake_time(const
> > > struct intel_crtc_state *crtc_s
> > >  	int tml_phy_lock = 1000 * 1000 * tps4 / crtc_state-
> > > > port_clock;
> > >  	int num_ml_phy_lock = 7 + DIV_ROUND_UP(6500,
> > > tml_phy_lock) + 1;
> > >  	int t2 = num_ml_phy_lock * tml_phy_lock;
> > > -	int tcds = 1 * t2;
> > > +	int tcds = 2 * t2;
> > >  
> > >  	return DIV_ROUND_UP(tphy2_p2_to_p0 +
> > > get_lfps_cycle_time(crtc_state) +
> > >  			    SILENCE_PERIOD_TIME + t1 + tcds,
> > > 1000);

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

* Re: [PATCH v2] drm/i915/alpm: Fix tCDS multiplier in AUX-less wake time
  2026-12-03  7:32       ` Hogander, Jouni
@ 2026-12-03  8:07         ` Nautiyal, Ankit K
  0 siblings, 0 replies; 11+ messages in thread
From: Nautiyal, Ankit K @ 2026-12-03  8:07 UTC (permalink / raw)
  To: Hogander, Jouni, intel-xe@lists.freedesktop.org, Lee, Shawn C,
	intel-gfx@lists.freedesktop.org


On 12/3/2026 1:02 PM, Hogander, Jouni wrote:
> On Thu, 2026-12-03 at 07:00 +0000, Lee, Shawn C wrote:
>> On Thursday, December 3, 2026 2:07 PM, Thu, Hogander, Jouni wrote:
>>> On Thu, 2026-12-03 at 04:12 +0000, Lee Shawn C wrote:
>>>> eDP 1.5 Figure 5-8 shows the CDS period as 2 x t2.
>>>> Use it in the wake time calculation instead of 1 x t2.
>>>>
>>>> v2: Add Fixes tag
>>> This is a good catch. There is a "Period of CDS Phase" in sink ALPM
>>> configuration register. Have you tested if it helps to set that as
>>> 1
>>> (1xt2) instead of switching to 2*t2? I assume this is fixing the
>>> issue where increasing AUX Less waketime by 1 lines helps.
>>>
>>> BR,
>>> Jouni Högander
>>>
>> Yes, I tried setting DPCD 0x116 bit 3 to 1 (1 x t2 on sink), with the
>> wake time calculated using 1 x t2.
>> The panel still flickers on Panel Replay enter/exit.
>>
>> With the wake time calculated with 2 x t2, the flicker is gone. From
>> my point of view, 2 x t2 adds a bit more AUX-less wake time,
>> but it gives better compatibility with the panel.
> Ok, thank you for the confirmation. Lets use this one then:
>
> Reviewed-by: Jouni Högander <jouni.hogander@intel.com>


Hi Shawn, Jouni,

Great catch.

Since 2 x t2 is the default in DPCD 0x116[3], it is likely required for 
panel stability.

While this adjustment minutely increases AUX-less wake-up latency,  it 
should not impact already-working panels.

Could we please document that the value of t2 is fixing the flicker 
issues in some panels?

Perhaps makes sense to CC: <stable@vger.kernel.org> # v6.10+


Regards,

Ankit


>
>> Best regards,
>> Shawn
>>
>>>> Fixes: da6a9836ac09 ("drm/i915/psr: Calculate aux less wake
>>>> time")
>>>> Cc: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
>>>> Cc: Jouni Högander <jouni.hogander@intel.com>
>>>> Signed-off-by: Lee Shawn C <shawn.c.lee@intel.com>
>>>> ---
>>>>   drivers/gpu/drm/i915/display/intel_alpm.c | 4 ++--
>>>>   1 file changed, 2 insertions(+), 2 deletions(-)
>>>>
>>>> diff --git a/drivers/gpu/drm/i915/display/intel_alpm.c
>>>> b/drivers/gpu/drm/i915/display/intel_alpm.c
>>>> index 105006ca6be7..897b24c7fafd 100644
>>>> --- a/drivers/gpu/drm/i915/display/intel_alpm.c
>>>> +++ b/drivers/gpu/drm/i915/display/intel_alpm.c
>>>> @@ -92,7 +92,7 @@ static int get_lfps_half_cycle_clocks(const
>>>> struct
>>>> intel_crtc_state *crtc_state)
>>>>    * The tLFPS_Period, Max term is 800ns
>>>>    * The tSilence, Max term is 180ns
>>>>    * The tPHY Establishment (a.k.a. t1) term is 50us
>>>> - * The tCDS term is 1 or 2 times t2
>>>> + * The tCDS term is 2 times t2, it can be configurable
>>>>    * t2 = Number ML_PHY_LOCK * tML_PHY_LOCK
>>>>    * Number ML_PHY_LOCK = ( 7 + CEILING( 6.5us / tML_PHY_LOCK ) +
>>>> 1)
>>>>    * Rounding up the 6.5us padding to the next ML_PHY_LOCK
>>>> boundary and
>>>> @@ -111,7 +111,7 @@ static int
>>>> _lnl_compute_aux_less_wake_time(const
>>>> struct intel_crtc_state *crtc_s
>>>>   	int tml_phy_lock = 1000 * 1000 * tps4 / crtc_state-
>>>>> port_clock;
>>>>   	int num_ml_phy_lock = 7 + DIV_ROUND_UP(6500,
>>>> tml_phy_lock) + 1;
>>>>   	int t2 = num_ml_phy_lock * tml_phy_lock;
>>>> -	int tcds = 1 * t2;
>>>> +	int tcds = 2 * t2;
>>>>   
>>>>   	return DIV_ROUND_UP(tphy2_p2_to_p0 +
>>>> get_lfps_cycle_time(crtc_state) +
>>>>   			    SILENCE_PERIOD_TIME + t1 + tcds,
>>>> 1000);

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

* [PATCH v3] drm/i915/alpm: Fix tCDS multiplier in AUX-less wake time
  2026-12-03  3:46 [PATCH] drm/i915/alpm: Fix tCDS multiplier in AUX-less wake time Lee Shawn C
                   ` (3 preceding siblings ...)
  2026-12-03  5:02 ` ✓ i915.CI.BAT: success for drm/i915/alpm: Fix tCDS multiplier in AUX-less wake time (rev2) Patchwork
@ 2026-12-03 10:38 ` Lee Shawn C
  2026-12-03 12:02 ` ✓ i915.CI.BAT: success for drm/i915/alpm: Fix tCDS multiplier in AUX-less wake time (rev3) Patchwork
  5 siblings, 0 replies; 11+ messages in thread
From: Lee Shawn C @ 2026-12-03 10:38 UTC (permalink / raw)
  To: intel-gfx, intel-xe; +Cc: Lee Shawn C, Ankit Nautiyal, Jouni Högander

eDP 1.5 Figure 5-8 shows the CDS period as 2 x t2, which is also
the default of DPCD 0x116 bit 3. Use it in the wake time
calculation instead of 1 x t2.

This fixes panel flickering seen on some panels when Panel Replay
is enabled.

v2: Add Fixes tag
v3: Update commit message

Fixes: da6a9836ac09 ("drm/i915/psr: Calculate aux less wake time")
Cc: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Cc: Jouni Högander <jouni.hogander@intel.com>
Signed-off-by: Lee Shawn C <shawn.c.lee@intel.com>
Reviewed-by: Jouni Högander <jouni.hogander@intel.com>
---
 drivers/gpu/drm/i915/display/intel_alpm.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_alpm.c b/drivers/gpu/drm/i915/display/intel_alpm.c
index 105006ca6be7..897b24c7fafd 100644
--- a/drivers/gpu/drm/i915/display/intel_alpm.c
+++ b/drivers/gpu/drm/i915/display/intel_alpm.c
@@ -92,7 +92,7 @@ static int get_lfps_half_cycle_clocks(const struct intel_crtc_state *crtc_state)
  * The tLFPS_Period, Max term is 800ns
  * The tSilence, Max term is 180ns
  * The tPHY Establishment (a.k.a. t1) term is 50us
- * The tCDS term is 1 or 2 times t2
+ * The tCDS term is 2 times t2, it can be configurable
  * t2 = Number ML_PHY_LOCK * tML_PHY_LOCK
  * Number ML_PHY_LOCK = ( 7 + CEILING( 6.5us / tML_PHY_LOCK ) + 1)
  * Rounding up the 6.5us padding to the next ML_PHY_LOCK boundary and
@@ -111,7 +111,7 @@ static int _lnl_compute_aux_less_wake_time(const struct intel_crtc_state *crtc_s
 	int tml_phy_lock = 1000 * 1000 * tps4 / crtc_state->port_clock;
 	int num_ml_phy_lock = 7 + DIV_ROUND_UP(6500, tml_phy_lock) + 1;
 	int t2 = num_ml_phy_lock * tml_phy_lock;
-	int tcds = 1 * t2;
+	int tcds = 2 * t2;
 
 	return DIV_ROUND_UP(tphy2_p2_to_p0 + get_lfps_cycle_time(crtc_state) +
 			    SILENCE_PERIOD_TIME + t1 + tcds, 1000);
-- 
2.53.0


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

* ✓ i915.CI.BAT: success for drm/i915/alpm: Fix tCDS multiplier in AUX-less wake time (rev3)
  2026-12-03  3:46 [PATCH] drm/i915/alpm: Fix tCDS multiplier in AUX-less wake time Lee Shawn C
                   ` (4 preceding siblings ...)
  2026-12-03 10:38 ` [PATCH v3] drm/i915/alpm: Fix tCDS multiplier in AUX-less wake time Lee Shawn C
@ 2026-12-03 12:02 ` Patchwork
  5 siblings, 0 replies; 11+ messages in thread
From: Patchwork @ 2026-12-03 12:02 UTC (permalink / raw)
  To: Lee Shawn C; +Cc: intel-gfx

[-- Attachment #1: Type: text/plain, Size: 4462 bytes --]

== Series Details ==

Series: drm/i915/alpm: Fix tCDS multiplier in AUX-less wake time (rev3)
URL   : https://patchwork.freedesktop.org/series/180383/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_19660 -> Patchwork_180383v3
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_180383v3/index.html

Participating hosts (39 -> 39)
------------------------------

  Additional (1): bat-adls-6 
  Missing    (1): bat-dg2-13 

Known issues
------------

  Here are the changes found in Patchwork_180383v3 that come from known issues:

### IGT changes ###

#### Issues hit ####

  * igt@gem_lmem_swapping@parallel-random-engines:
    - bat-adls-6:         NOTRUN -> [SKIP][1] ([i915#4613]) +3 other tests skip
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_180383v3/bat-adls-6/igt@gem_lmem_swapping@parallel-random-engines.html

  * igt@gem_tiled_pread_basic@basic:
    - bat-adls-6:         NOTRUN -> [SKIP][2] ([i915#15656])
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_180383v3/bat-adls-6/igt@gem_tiled_pread_basic@basic.html

  * igt@intel_hwmon@hwmon-read:
    - bat-adls-6:         NOTRUN -> [SKIP][3] ([i915#7707]) +1 other test skip
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_180383v3/bat-adls-6/igt@intel_hwmon@hwmon-read.html

  * igt@kms_cursor_legacy@basic-busy-flip-before-cursor-legacy:
    - bat-adls-6:         NOTRUN -> [SKIP][4] ([i915#4103]) +1 other test skip
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_180383v3/bat-adls-6/igt@kms_cursor_legacy@basic-busy-flip-before-cursor-legacy.html

  * igt@kms_dsc@dsc-basic:
    - bat-adls-6:         NOTRUN -> [SKIP][5] ([i915#16361])
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_180383v3/bat-adls-6/igt@kms_dsc@dsc-basic.html

  * igt@kms_force_connector_basic@force-load-detect:
    - bat-adls-6:         NOTRUN -> [SKIP][6] ([i915#17452])
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_180383v3/bat-adls-6/igt@kms_force_connector_basic@force-load-detect.html

  * igt@kms_pm_backlight@basic-brightness:
    - bat-adls-6:         NOTRUN -> [SKIP][7] ([i915#5354])
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_180383v3/bat-adls-6/igt@kms_pm_backlight@basic-brightness.html

  * igt@kms_psr@psr-primary-mmap-gtt:
    - bat-adls-6:         NOTRUN -> [SKIP][8] ([i915#1072] / [i915#9732]) +3 other tests skip
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_180383v3/bat-adls-6/igt@kms_psr@psr-primary-mmap-gtt.html

  * igt@kms_setmode@basic-clone-single-crtc:
    - bat-adls-6:         NOTRUN -> [SKIP][9] ([i915#3555])
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_180383v3/bat-adls-6/igt@kms_setmode@basic-clone-single-crtc.html

  * igt@prime_vgem@basic-fence-read:
    - bat-adls-6:         NOTRUN -> [SKIP][10] ([i915#17448] / [i915#3291]) +2 other tests skip
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_180383v3/bat-adls-6/igt@prime_vgem@basic-fence-read.html

  
  [i915#1072]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/1072
  [i915#15656]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/15656
  [i915#16361]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/16361
  [i915#17448]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/17448
  [i915#17452]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/17452
  [i915#3291]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/3291
  [i915#3555]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/3555
  [i915#4103]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/4103
  [i915#4613]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/4613
  [i915#5354]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/5354
  [i915#7707]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/7707
  [i915#9732]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/9732


Build changes
-------------

  * Linux: CI_DRM_19660 -> Patchwork_180383v3

  CI-20190529: 20190529
  CI_DRM_19660: 57c72fb5167a986cd837dc5df166fca5dc93d3dc @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_9223: 9223
  Patchwork_180383v3: 57c72fb5167a986cd837dc5df166fca5dc93d3dc @ git://anongit.freedesktop.org/gfx-ci/linux

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_180383v3/index.html

[-- Attachment #2: Type: text/html, Size: 5302 bytes --]

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

end of thread, other threads:[~2026-12-03 12:02 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-03  3:46 [PATCH] drm/i915/alpm: Fix tCDS multiplier in AUX-less wake time Lee Shawn C
2026-12-03  3:58 ` sashiko-bot
2026-12-03  4:12 ` [PATCH v2] " Lee Shawn C
2026-12-03  6:07   ` Hogander, Jouni
2026-12-03  7:00     ` Lee, Shawn C
2026-12-03  7:32       ` Hogander, Jouni
2026-12-03  8:07         ` Nautiyal, Ankit K
2026-12-03  4:33 ` ✓ i915.CI.BAT: success for " Patchwork
2026-12-03  5:02 ` ✓ i915.CI.BAT: success for drm/i915/alpm: Fix tCDS multiplier in AUX-less wake time (rev2) Patchwork
2026-12-03 10:38 ` [PATCH v3] drm/i915/alpm: Fix tCDS multiplier in AUX-less wake time Lee Shawn C
2026-12-03 12:02 ` ✓ i915.CI.BAT: success for drm/i915/alpm: Fix tCDS multiplier in AUX-less wake time (rev3) Patchwork

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