All of 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: mika.kahola@intel.com, "Jouni Högander" <jouni.hogander@intel.com>
Subject: [PATCH v2] drm/i915/psr: Do not read PSR2_SU_STATUS on AlderLake and onwards
Date: Fri, 16 May 2025 09:30:19 +0300	[thread overview]
Message-ID: <20250516063019.2126702-1-jouni.hogander@intel.com> (raw)

Bspec comment on PSR2_SU_STATUS:

"This register has been tied-off since DG2/ADL-P (it returns zeros only)
and it has been removed on Xe2_LPD."

v2: fix inversed logic

Bspec: 69889
Signed-off-by: Jouni Högander <jouni.hogander@intel.com>
---
 drivers/gpu/drm/i915/display/intel_psr.c | 34 ++++++++++++++----------
 1 file changed, 20 insertions(+), 14 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b/drivers/gpu/drm/i915/display/intel_psr.c
index 430ad4ef7146..cd833b63ea6b 100644
--- a/drivers/gpu/drm/i915/display/intel_psr.c
+++ b/drivers/gpu/drm/i915/display/intel_psr.c
@@ -4021,24 +4021,30 @@ static int intel_psr_status(struct seq_file *m, struct intel_dp *intel_dp)
 		int frame;
 
 		/*
-		 * Reading all 3 registers before hand to minimize crossing a
-		 * frame boundary between register reads
+		 * PSR2_SU_STATUS register has been tied-off since DG2/ADL-P
+		 * (it returns zeros only) and it has been removed on Xe2_LPD.
 		 */
-		for (frame = 0; frame < PSR2_SU_STATUS_FRAMES; frame += 3) {
-			val = intel_de_read(display,
-					    PSR2_SU_STATUS(display, cpu_transcoder, frame));
-			su_frames_val[frame / 3] = val;
-		}
+		if (DISPLAY_VER(display) < 13) {
+			/*
+			 * Reading all 3 registers before hand to minimize crossing a
+			 * frame boundary between register reads
+			 */
+			for (frame = 0; frame < PSR2_SU_STATUS_FRAMES; frame += 3) {
+				val = intel_de_read(display,
+						    PSR2_SU_STATUS(display, cpu_transcoder, frame));
+				su_frames_val[frame / 3] = val;
+			}
 
-		seq_puts(m, "Frame:\tPSR2 SU blocks:\n");
+			seq_puts(m, "Frame:\tPSR2 SU blocks:\n");
 
-		for (frame = 0; frame < PSR2_SU_STATUS_FRAMES; frame++) {
-			u32 su_blocks;
+			for (frame = 0; frame < PSR2_SU_STATUS_FRAMES; frame++) {
+				u32 su_blocks;
 
-			su_blocks = su_frames_val[frame / 3] &
-				    PSR2_SU_STATUS_MASK(frame);
-			su_blocks = su_blocks >> PSR2_SU_STATUS_SHIFT(frame);
-			seq_printf(m, "%d\t%d\n", frame, su_blocks);
+				su_blocks = su_frames_val[frame / 3] &
+					PSR2_SU_STATUS_MASK(frame);
+				su_blocks = su_blocks >> PSR2_SU_STATUS_SHIFT(frame);
+				seq_printf(m, "%d\t%d\n", frame, su_blocks);
+			}
 		}
 
 		seq_printf(m, "PSR2 selective fetch: %s\n",
-- 
2.43.0


             reply	other threads:[~2025-05-16  6:30 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-16  6:30 Jouni Högander [this message]
2025-05-16  6:37 ` ✓ CI.Patch_applied: success for drm/i915/psr: Do not read PSR2_SU_STATUS on AlderLake and onwards (rev2) Patchwork
2025-05-16  6:37 ` ✓ CI.checkpatch: " Patchwork
2025-05-16  6:38 ` ✓ CI.KUnit: " Patchwork
2025-05-16  6:51 ` ✓ CI.Build: " Patchwork
2025-05-16  6:55 ` ✓ CI.Hooks: " Patchwork
2025-05-16  6:56 ` ✓ CI.checksparse: " Patchwork
2025-05-16  7:19 ` ✓ Xe.CI.BAT: " Patchwork
2025-05-16  7:20 ` ✓ i915.CI.BAT: " Patchwork
2025-05-16  9:25 ` ✗ i915.CI.Full: failure " Patchwork
2025-05-19  6:45   ` Hogander, Jouni
2025-05-16 12:17 ` [PATCH v2] drm/i915/psr: Do not read PSR2_SU_STATUS on AlderLake and onwards Kahola, Mika
2025-05-16 12:41   ` Naladala, Ramanaidu
2025-05-19  7:01   ` Hogander, Jouni
2025-05-16 22:00 ` ✗ Xe.CI.Full: failure for drm/i915/psr: Do not read PSR2_SU_STATUS on AlderLake and onwards (rev2) Patchwork
2025-05-19  6:35   ` Hogander, Jouni
2025-05-27  2:24 ` ✗ CI.Patch_applied: " 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=20250516063019.2126702-1-jouni.hogander@intel.com \
    --to=jouni.hogander@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-xe@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.