From: "Jouni Högander" <jouni.hogander@intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH v2 3/4] drm/i915/alpm: Calculate ALPM Entry check
Date: Fri, 5 Jan 2024 16:15:03 +0200 [thread overview]
Message-ID: <20240105141504.2808991-4-jouni.hogander@intel.com> (raw)
In-Reply-To: <20240105141504.2808991-1-jouni.hogander@intel.com>
ALPM Entry Check represents the number of lines needed to put the main link
to sleep and keep it in the sleep state before it can be taken out of the
SLEEP state (eDP requires the main link to be in the SLEEP state for a
minimum of 5us).
Bspec: 71477
Signed-off-by: Jouni Högander <jouni.hogander@intel.com>
---
.../drm/i915/display/intel_display_types.h | 3 ++
drivers/gpu/drm/i915/display/intel_psr.c | 28 +++++++++++++++++++
2 files changed, 31 insertions(+)
diff --git a/drivers/gpu/drm/i915/display/intel_display_types.h b/drivers/gpu/drm/i915/display/intel_display_types.h
index 889a8b34b7ac..7eddef859ff4 100644
--- a/drivers/gpu/drm/i915/display/intel_display_types.h
+++ b/drivers/gpu/drm/i915/display/intel_display_types.h
@@ -1680,6 +1680,9 @@ struct intel_pps {
struct alpm_parameters {
u8 io_wake_lines;
u8 fast_wake_lines;
+
+ /* LNL and beyond */
+ u8 check_entry_lines;
};
struct intel_psr {
diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b/drivers/gpu/drm/i915/display/intel_psr.c
index 1709ebb31215..7fbd18f21c3b 100644
--- a/drivers/gpu/drm/i915/display/intel_psr.c
+++ b/drivers/gpu/drm/i915/display/intel_psr.c
@@ -1099,6 +1099,28 @@ static bool _compute_psr2_sdp_prior_scanline_indication(struct intel_dp *intel_d
return true;
}
+static bool _lnl_compute_alpm_params(struct intel_dp *intel_dp,
+ struct intel_crtc_state *crtc_state)
+{
+ struct drm_i915_private *i915 = dp_to_i915(intel_dp);
+ struct alpm_parameters *alpm_params = &intel_dp->psr.alpm_params;
+ int check_entry_lines;
+
+ /* ALPM Entry Check = 2 + CEILING( 5us /tline ) */
+ check_entry_lines = 2 +
+ intel_usecs_to_scanlines(&crtc_state->hw.adjusted_mode, 5);
+
+ if (check_entry_lines > 15)
+ return false;
+
+ if (i915->display.params.psr_safest_params)
+ check_entry_lines = 15;
+
+ alpm_params->check_entry_lines = check_entry_lines;
+
+ return true;
+}
+
static bool _compute_alpm_params(struct intel_dp *intel_dp,
struct intel_crtc_state *crtc_state)
{
@@ -1114,6 +1136,8 @@ static bool _compute_alpm_params(struct intel_dp *intel_dp,
* it is not enough -> use 45 us.
*/
fast_wake_time = 45;
+
+ /* TODO: Check how we can use ALPM_CTL fast wake extended field */
max_wake_lines = 12;
} else {
io_wake_time = 50;
@@ -1130,6 +1154,10 @@ static bool _compute_alpm_params(struct intel_dp *intel_dp,
fast_wake_lines > max_wake_lines)
return false;
+ if (DISPLAY_VER(i915) >= 20 && !_lnl_compute_alpm_params(intel_dp,
+ crtc_state))
+ return false;
+
if (i915->display.params.psr_safest_params)
io_wake_lines = fast_wake_lines = max_wake_lines;
--
2.34.1
next prev parent reply other threads:[~2024-01-05 14:15 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-05 14:15 [PATCH v2 0/4] ALPM AUX Wake Configuration Jouni Högander
2024-01-05 14:15 ` [PATCH v2 1/4] drm/i915/alpm: Add ALPM register definitions Jouni Högander
2024-01-24 6:16 ` Murthy, Arun R
2024-01-05 14:15 ` [PATCH v2 2/4] drm/i915/psr: Add alpm_parameters struct Jouni Högander
2024-01-24 9:17 ` Murthy, Arun R
2024-01-24 9:24 ` Hogander, Jouni
2024-01-24 9:28 ` Murthy, Arun R
2024-01-24 9:39 ` Hogander, Jouni
2024-01-05 14:15 ` Jouni Högander [this message]
2024-01-29 2:08 ` [PATCH v2 3/4] drm/i915/alpm: Calculate ALPM Entry check Murthy, Arun R
2024-01-29 7:33 ` Hogander, Jouni
2024-01-05 14:15 ` [PATCH v2 4/4] drm/i915/alpm: Alpm aux wake configuration for lnl Jouni Högander
2024-01-30 8:28 ` Murthy, Arun R
2024-01-30 9:13 ` Hogander, Jouni
2024-01-05 16:10 ` ✗ Fi.CI.CHECKPATCH: warning for ALPM AUX Wake Configuration (rev2) Patchwork
2024-01-05 16:10 ` ✗ Fi.CI.SPARSE: " Patchwork
2024-01-05 16:23 ` ✓ Fi.CI.BAT: success " Patchwork
2024-01-06 9:27 ` ✗ Fi.CI.IGT: 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=20240105141504.2808991-4-jouni.hogander@intel.com \
--to=jouni.hogander@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
/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