From: "Manna, Animesh" <animesh.manna@intel.com>
To: "Hogander, Jouni" <jouni.hogander@intel.com>,
"intel-gfx@lists.freedesktop.org"
<intel-gfx@lists.freedesktop.org>,
"intel-xe@lists.freedesktop.org" <intel-xe@lists.freedesktop.org>
Cc: "Hogander, Jouni" <jouni.hogander@intel.com>
Subject: RE: [PATCH 4/4] drm/i915/alpm: Use actual lfps cycle and silence periods in wake time
Date: Thu, 28 Aug 2025 07:54:34 +0000 [thread overview]
Message-ID: <DS0PR11MB804973213F7EEFC7040E0DDEF93BA@DS0PR11MB8049.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20250813070617.480793-5-jouni.hogander@intel.com>
> -----Original Message-----
> From: Intel-xe <intel-xe-bounces@lists.freedesktop.org> On Behalf Of Jouni
> Högander
> Sent: Wednesday, August 13, 2025 12:36 PM
> To: intel-gfx@lists.freedesktop.org; intel-xe@lists.freedesktop.org
> Cc: Hogander, Jouni <jouni.hogander@intel.com>
> Subject: [PATCH 4/4] drm/i915/alpm: Use actual lfps cycle and silence
> periods in wake time
>
> Currently we are using maximum lfps cycle and silence period times when
> calculating AUXLess wake time. Use actual values instead.
Could not locate mid of min-max is the actual value or not. Good to know the reference if I missed it.
As per bspec software can use any values between minimum and maximum, so mid of min-max may be good.
>
> Signed-off-by: Jouni Högander <jouni.hogander@intel.com>
The code changes LGTM,
Reviewed-by: Animesh Manna <animesh.manna@intel.com>
> ---
> drivers/gpu/drm/i915/display/intel_alpm.c | 12 +++++-------
> 1 file changed, 5 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_alpm.c
> b/drivers/gpu/drm/i915/display/intel_alpm.c
> index b2123305f128..4e8aa167b97b 100644
> --- a/drivers/gpu/drm/i915/display/intel_alpm.c
> +++ b/drivers/gpu/drm/i915/display/intel_alpm.c
> @@ -116,21 +116,19 @@ static int get_lfps_half_cycle_clocks(const struct
> intel_crtc_state *crtc_state)
> * tML_PHY_LOCK = TPS4 Length * ( 10 / (Link Rate in MHz) )
> * TPS4 Length = 252 Symbols
> */
> -static int _lnl_compute_aux_less_wake_time(int port_clock)
> +static int _lnl_compute_aux_less_wake_time(const struct
> +intel_crtc_state *crtc_state)
> {
> int tphy2_p2_to_p0 = 12 * 1000;
> - int tlfps_period_max = 800;
> - int tsilence_max = 180;
> int t1 = 50 * 1000;
> int tps4 = 252;
> /* port_clock is link rate in 10kbit/s units */
> - int tml_phy_lock = 1000 * 1000 * tps4 / port_clock;
> + 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;
>
> - return DIV_ROUND_UP(tphy2_p2_to_p0 + tlfps_period_max +
> tsilence_max +
> - t1 + tcds, 1000);
> + return DIV_ROUND_UP(tphy2_p2_to_p0 +
> get_lfps_cycle_time(crtc_state) +
> + SILENCE_PERIOD_TIME + t1 + tcds, 1000);
> }
>
> static int
> @@ -142,7 +140,7 @@ _lnl_compute_aux_less_alpm_params(struct
> intel_dp *intel_dp,
> lfps_half_cycle;
>
> aux_less_wake_time =
> - _lnl_compute_aux_less_wake_time(crtc_state->port_clock);
> + _lnl_compute_aux_less_wake_time(crtc_state);
> aux_less_wake_lines = intel_usecs_to_scanlines(&crtc_state-
> >hw.adjusted_mode,
> aux_less_wake_time);
> silence_period = get_silence_period_symbols(crtc_state);
> --
> 2.43.0
next prev parent reply other threads:[~2025-08-28 7:54 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-13 7:06 [PATCH 0/4] ALPM LFPS and silence period calculation Jouni Högander
2025-08-13 7:06 ` [PATCH 1/4] drm/i915/alpm: Calculate silence period Jouni Högander
2025-08-28 6:39 ` Manna, Animesh
2025-08-13 7:06 ` [PATCH 2/4] drm/i915/alpm: Add own define for LFPS count Jouni Högander
2025-08-28 7:00 ` Manna, Animesh
2025-08-13 7:06 ` [PATCH 3/4] drm/i915/alpm: Replace hardcoded LFPS cycle with proper calculation Jouni Högander
2025-08-28 7:35 ` Manna, Animesh
2025-08-28 9:39 ` Hogander, Jouni
2025-08-13 7:06 ` [PATCH 4/4] drm/i915/alpm: Use actual lfps cycle and silence periods in wake time Jouni Högander
2025-08-28 7:54 ` Manna, Animesh [this message]
2025-08-28 9:48 ` Hogander, Jouni
2025-08-13 7:31 ` ✓ CI.KUnit: success for ALPM LFPS and silence period calculation Patchwork
2025-08-13 8:41 ` ✓ Xe.CI.BAT: " Patchwork
2025-08-13 9:38 ` ✗ Xe.CI.Full: failure " Patchwork
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=DS0PR11MB804973213F7EEFC7040E0DDEF93BA@DS0PR11MB8049.namprd11.prod.outlook.com \
--to=animesh.manna@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=jouni.hogander@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).