]> www.infradead.org Git - users/hch/misc.git/commitdiff
drm/i915/alpm: Add own define for LFPS count
authorJouni Högander <jouni.hogander@intel.com>
Fri, 29 Aug 2025 05:39:26 +0000 (08:39 +0300)
committerJouni Högander <jouni.hogander@intel.com>
Fri, 5 Sep 2025 05:35:45 +0000 (08:35 +0300)
Add own define for LFPS count and use it for the configuration. This new
define will be used for calculating ALPM parameters as well.

Signed-off-by: Jouni Högander <jouni.hogander@intel.com>
Reviewed-by: Animesh Manna <animesh.manna@intel.com>
Link: https://lore.kernel.org/r/20250829053929.3585636-3-jouni.hogander@intel.com
drivers/gpu/drm/i915/display/intel_alpm.c

index e48a4218c163b58cfc13155d33c93b1f2131f3c7..ae556a885c2a385d355177fa303dce64e671ae28 100644 (file)
@@ -22,6 +22,8 @@
                                (SILENCE_PERIOD_MAX_TIME -      \
                                 SILENCE_PERIOD_MIN_TIME) / 2)
 
+#define LFPS_CYCLE_COUNT 10
+
 bool intel_alpm_aux_wake_supported(struct intel_dp *intel_dp)
 {
        return intel_dp->alpm_dpcd & DP_ALPM_CAP;
@@ -403,7 +405,7 @@ void intel_alpm_port_configure(struct intel_dp *intel_dp,
                        PORT_ALPM_CTL_MAX_PHY_SWING_HOLD(0) |
                        PORT_ALPM_CTL_SILENCE_PERIOD(
                                intel_dp->alpm_parameters.silence_period_sym_clocks);
-               lfps_ctl_val = PORT_ALPM_LFPS_CTL_LFPS_CYCLE_COUNT(10) |
+               lfps_ctl_val = PORT_ALPM_LFPS_CTL_LFPS_CYCLE_COUNT(LFPS_CYCLE_COUNT) |
                        PORT_ALPM_LFPS_CTL_LFPS_HALF_CYCLE_DURATION(
                                intel_dp->alpm_parameters.lfps_half_cycle_num_of_syms) |
                        PORT_ALPM_LFPS_CTL_FIRST_LFPS_HALF_CYCLE_DURATION(