Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Jouni Högander" <jouni.hogander@intel.com>
To: intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org
Cc: "Jouni Högander" <jouni.hogander@intel.com>
Subject: [PATCH 1/4] drm/i915/psr: Add helper for checking if vblank evasion is needed by PSR
Date: Tue, 25 Nov 2025 08:32:50 +0200	[thread overview]
Message-ID: <20251125063253.328023-2-jouni.hogander@intel.com> (raw)
In-Reply-To: <20251125063253.328023-1-jouni.hogander@intel.com>

PSR2_MAN_TRK_CTL[SF Continuous full frame] is sampled on the rising edge of
delayed vblank. SW must ensure this bit is not changing around that
bit. Due to this PSR2 Selective Fetch needs vblank evasion.

Due to this add helper for intel_pipe_update_start usage to choose if
vblank evasion is needed by PSR.

Bspec: 50424
Signed-off-by: Jouni Högander <jouni.hogander@intel.com>
---
 drivers/gpu/drm/i915/display/intel_psr.c | 15 +++++++++++++++
 drivers/gpu/drm/i915/display/intel_psr.h |  1 +
 2 files changed, 16 insertions(+)

diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b/drivers/gpu/drm/i915/display/intel_psr.c
index 08bca4573974..18d5fe992f58 100644
--- a/drivers/gpu/drm/i915/display/intel_psr.c
+++ b/drivers/gpu/drm/i915/display/intel_psr.c
@@ -4540,3 +4540,18 @@ int intel_psr_min_guardband(struct intel_crtc_state *crtc_state)
 
 	return psr_min_guardband;
 }
+
+bool intel_psr_needs_evasion(const struct intel_crtc_state *crtc_state)
+{
+	struct intel_display *display = to_intel_display(crtc_state);
+	struct intel_encoder *encoder;
+	struct intel_dp *intel_dp;
+
+	for_each_intel_encoder_mask_with_psr(display->drm, encoder,
+					     crtc_state->uapi.encoder_mask) {
+		intel_dp = enc_to_intel_dp(encoder);
+
+		break;
+	}
+	return intel_dp->psr.psr2_sel_fetch_enabled;
+}
diff --git a/drivers/gpu/drm/i915/display/intel_psr.h b/drivers/gpu/drm/i915/display/intel_psr.h
index 620b35928832..8c09a9f8a00e 100644
--- a/drivers/gpu/drm/i915/display/intel_psr.h
+++ b/drivers/gpu/drm/i915/display/intel_psr.h
@@ -86,5 +86,6 @@ bool intel_psr_needs_alpm_aux_less(struct intel_dp *intel_dp,
 void intel_psr_compute_config_late(struct intel_dp *intel_dp,
 				   struct intel_crtc_state *crtc_state);
 int intel_psr_min_guardband(struct intel_crtc_state *crtc_state);
+bool intel_psr_needs_evasion(const struct intel_crtc_state *crtc_state);
 
 #endif /* __INTEL_PSR_H__ */
-- 
2.43.0


  reply	other threads:[~2025-11-25  6:33 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-25  6:32 [PATCH 0/4] Selective Fetch and async flip Jouni Högander
2025-11-25  6:32 ` Jouni Högander [this message]
2025-11-25 10:19   ` [PATCH 1/4] drm/i915/psr: Add helper for checking if vblank evasion is needed by PSR Jani Nikula
2025-11-26 13:32   ` kernel test robot
2025-11-25  6:32 ` [PATCH 2/4] drm/i915/psr: Perform vblank evasion on async flip as well for PSR Jouni Högander
2025-11-25 21:19   ` Ville Syrjälä
2025-11-27 10:57     ` Hogander, Jouni
2025-11-27 11:36       ` Hogander, Jouni
2025-11-27 22:02       ` Ville Syrjälä
2025-11-28 14:40         ` Hogander, Jouni
2025-12-01 11:36           ` Hogander, Jouni
2025-11-25  6:32 ` [PATCH 3/4] drm/i915/psr: Perform full frame update on async flip Jouni Högander
2025-11-25  6:32 ` [PATCH 4/4] drm/i915/psr: Allow async flip when Selective Fetch enabled Jouni Högander
2025-11-25 10:39 ` ✓ CI.KUnit: success for Selective Fetch and async flip Patchwork
2025-11-25 10:55 ` ✗ CI.checksparse: warning " Patchwork
2025-11-25 14:23 ` ✗ 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=20251125063253.328023-2-jouni.hogander@intel.com \
    --to=jouni.hogander@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-xe@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