]> www.infradead.org Git - nvme.git/commitdiff
drm/i915/alpm: Fix port clock usage in AUX Less wake time calculation
authorJouni Högander <jouni.hogander@intel.com>
Tue, 18 Jun 2024 05:30:20 +0000 (08:30 +0300)
committerJouni Högander <jouni.hogander@intel.com>
Wed, 19 Jun 2024 04:42:08 +0000 (07:42 +0300)
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>
Link: https://patchwork.freedesktop.org/patch/msgid/20240618053026.3268759-4-jouni.hogander@intel.com
drivers/gpu/drm/i915/display/intel_alpm.c

index 90072f6e3a33f835571292dd3fcd27ab0fce525b..67848fc1e24d0051ccec28d63e6a4afe33c93a96 100644 (file)
@@ -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;