diff mbox series

[v8,03/20] drm/i915/alpm: Fix port clock usage in AUX Less wake time calculation

Message ID 20240613093239.1293629-4-jouni.hogander@intel.com (mailing list archive)
State New, archived
Headers show
Series Panel Replay eDP support | expand

Commit Message

Hogander, Jouni June 13, 2024, 9:32 a.m. UTC
Port clock is link rate in 10 kbit/s units. Take this into account when
calculating AUX Less wake time.

Fixes: da6a9836ac09 ("drm/i915/psr: Calculate aux less wake time")
Signed-off-by: Jouni Högander <jouni.hogander@intel.com>
---
 drivers/gpu/drm/i915/display/intel_alpm.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Manna, Animesh June 14, 2024, 4:18 p.m. UTC | #1
> -----Original Message-----
> From: Hogander, Jouni <jouni.hogander@intel.com>
> Sent: Thursday, June 13, 2024 3:02 PM
> To: intel-gfx@lists.freedesktop.org
> Cc: Manna, Animesh <animesh.manna@intel.com>; Kahola, Mika
> <mika.kahola@intel.com>; Hogander, Jouni <jouni.hogander@intel.com>
> Subject: [PATCH v8 03/20] drm/i915/alpm: Fix port clock usage in AUX Less
> wake time calculation
> 
> Port clock is link rate in 10 kbit/s units. Take this into account when
> calculating AUX Less wake time.
> 
> Fixes: da6a9836ac09 ("drm/i915/psr: Calculate aux less wake time")
> Signed-off-by: Jouni Högander <jouni.hogander@intel.com>

Reviewed-by: Animesh Manna <animesh.manna@intel.com>

> ---
>  drivers/gpu/drm/i915/display/intel_alpm.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_alpm.c
> b/drivers/gpu/drm/i915/display/intel_alpm.c
> index 90072f6e3a33..67848fc1e24d 100644
> --- a/drivers/gpu/drm/i915/display/intel_alpm.c
> +++ b/drivers/gpu/drm/i915/display/intel_alpm.c
> @@ -125,7 +125,8 @@ static int _lnl_compute_aux_less_wake_time(int
> port_clock)
>  	int tsilence_max = 180;
>  	int t1 = 50 * 1000;
>  	int tps4 = 252;
> -	int tml_phy_lock = 1000 * 1000 * tps4 * 10 / port_clock;
> +	/* port_clock is link rate in 10kbit/s units */
> +	int tml_phy_lock = 1000 * 1000 * tps4 / 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;
> --
> 2.34.1
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/display/intel_alpm.c b/drivers/gpu/drm/i915/display/intel_alpm.c
index 90072f6e3a33..67848fc1e24d 100644
--- a/drivers/gpu/drm/i915/display/intel_alpm.c
+++ b/drivers/gpu/drm/i915/display/intel_alpm.c
@@ -125,7 +125,8 @@  static int _lnl_compute_aux_less_wake_time(int port_clock)
 	int tsilence_max = 180;
 	int t1 = 50 * 1000;
 	int tps4 = 252;
-	int tml_phy_lock = 1000 * 1000 * tps4 * 10 / port_clock;
+	/* port_clock is link rate in 10kbit/s units */
+	int tml_phy_lock = 1000 * 1000 * tps4 / 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;