From: "Jouni Högander" <jouni.hogander@intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: animesh.manna@intel.com, mika.kahola@intel.com,
"Jouni Högander" <jouni.hogander@intel.com>
Subject: [PATCH 4/9] drm/i915/psr: Disable Panel Replay if PSR mode is set via module parameter
Date: Tue, 18 Jun 2024 08:30:21 +0300 [thread overview]
Message-ID: <20240618053026.3268759-5-jouni.hogander@intel.com> (raw)
In-Reply-To: <20240618053026.3268759-1-jouni.hogander@intel.com>
If user is specifically limiting PSR mode to PSR1 or PSR2: disable Panel
Replay. With default value -1 all modes are allowed including Panel
Replay. Disabling PSR using value 0 disables Panel Replay as well.
Also own compute config helper is added for Panel Replay. This makes sense
because number of Panel Replay specific checks are increasing.
v2: Squash adding Panel Replay compute config helper
Signed-off-by: Jouni Högander <jouni.hogander@intel.com>
---
.../drm/i915/display/intel_display_params.c | 3 +--
drivers/gpu/drm/i915/display/intel_psr.c | 27 +++++++++++++++++--
2 files changed, 26 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/i915/display/intel_display_params.c b/drivers/gpu/drm/i915/display/intel_display_params.c
index aebdb7b59dbf..79107607a6ff 100644
--- a/drivers/gpu/drm/i915/display/intel_display_params.c
+++ b/drivers/gpu/drm/i915/display/intel_display_params.c
@@ -106,8 +106,7 @@ intel_display_param_named_unsafe(enable_fbc, int, 0400,
intel_display_param_named_unsafe(enable_psr, int, 0400,
"Enable PSR "
- "(0=disabled, 1=enable up to PSR1 and Panel Replay full frame update, "
- "2=enable up to PSR2 and Panel Replay Selective Update) "
+ "(0=disabled, 1=enable up to PSR1, 2=enable up to PSR2) "
"Default: -1 (use per-chip default)");
intel_display_param_named(psr_safest_params, bool, 0400,
diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b/drivers/gpu/drm/i915/display/intel_psr.c
index 2a33e35ceeff..cfce0fe05d92 100644
--- a/drivers/gpu/drm/i915/display/intel_psr.c
+++ b/drivers/gpu/drm/i915/display/intel_psr.c
@@ -235,6 +235,15 @@ static bool psr2_global_enabled(struct intel_dp *intel_dp)
}
}
+static bool panel_replay_global_enabled(struct intel_dp *intel_dp)
+{
+ struct drm_i915_private *i915 = dp_to_i915(intel_dp);
+
+ if (i915->display.params.enable_psr != -1)
+ return false;
+ return true;
+}
+
static u32 psr_irq_psr_error_bit_get(struct intel_dp *intel_dp)
{
struct drm_i915_private *dev_priv = dp_to_i915(intel_dp);
@@ -1455,6 +1464,21 @@ static bool _psr_compute_config(struct intel_dp *intel_dp,
return true;
}
+static bool _panel_replay_compute_config(struct intel_dp *intel_dp)
+{
+ struct drm_i915_private *i915 = dp_to_i915(intel_dp);
+
+ if (!CAN_PANEL_REPLAY(intel_dp))
+ return false;
+
+ if (!panel_replay_global_enabled(intel_dp)) {
+ drm_dbg_kms(&i915->drm, "Panel Replay disabled by flag\n");
+ return false;
+ }
+
+ return true;
+}
+
void intel_psr_compute_config(struct intel_dp *intel_dp,
struct intel_crtc_state *crtc_state,
struct drm_connector_state *conn_state)
@@ -1490,8 +1514,7 @@ void intel_psr_compute_config(struct intel_dp *intel_dp,
return;
}
- if (CAN_PANEL_REPLAY(intel_dp))
- crtc_state->has_panel_replay = true;
+ crtc_state->has_panel_replay = _panel_replay_compute_config(intel_dp);
crtc_state->has_psr = crtc_state->has_panel_replay ? true :
_psr_compute_config(intel_dp, crtc_state);
--
2.34.1
next prev parent reply other threads:[~2024-06-18 5:31 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-18 5:30 [PATCH 0/9] Panel Replay eDP more prepare patches Jouni Högander
2024-06-18 5:30 ` [PATCH 1/9] drm/i915/psr: Set SU area width as pipe src width Jouni Högander
2024-06-18 10:23 ` Kahola, Mika
2024-06-18 5:30 ` [PATCH 2/9] drm/i915/display: Wa 16021440873 is writing wrong register Jouni Högander
2024-06-18 13:29 ` Kahola, Mika
2024-06-19 9:51 ` Jani Nikula
2024-06-19 12:11 ` Hogander, Jouni
2024-06-18 5:30 ` [PATCH 3/9] drm/i915/alpm: Fix port clock usage in AUX Less wake time calculation Jouni Högander
2024-06-18 5:30 ` Jouni Högander [this message]
2024-06-18 12:00 ` [PATCH 4/9] drm/i915/psr: Disable Panel Replay if PSR mode is set via module parameter Manna, Animesh
2024-06-18 5:30 ` [PATCH 5/9] drm/i915/psr: Disable PSR2 SU Region ET if enable_psr module parameter is set Jouni Högander
2024-06-18 12:03 ` Manna, Animesh
2024-06-18 5:30 ` [PATCH 6/9] drm/i915/psr: Disable PSR/Panel Replay on sink side for PSR only Jouni Högander
2024-06-18 5:30 ` [PATCH 7/9] drm/i915/psr: Add new debug bit to disable Panel Replay Jouni Högander
2024-06-18 5:30 ` [PATCH 8/9] Revert "drm/i915/psr: Disable early transport by default" Jouni Högander
2024-06-18 5:30 ` [PATCH 9/9] intel_alpm: Fix wrong offset for PORT_ALPM_* registers Jouni Högander
2024-06-18 11:58 ` Manna, Animesh
2024-06-18 6:06 ` ✗ Fi.CI.CHECKPATCH: warning for Panel Replay eDP more prepare patches Patchwork
2024-06-18 6:06 ` ✗ Fi.CI.SPARSE: " Patchwork
2024-06-18 6:14 ` ✓ Fi.CI.BAT: success " Patchwork
2024-06-18 10:26 ` ✗ Fi.CI.IGT: failure " Patchwork
2024-06-19 5:16 ` Hogander, Jouni
2024-06-19 5:24 ` [PATCH 0/9] " Hogander, Jouni
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=20240618053026.3268759-5-jouni.hogander@intel.com \
--to=jouni.hogander@intel.com \
--cc=animesh.manna@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=mika.kahola@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