From: "Michał Grzelak" <michal.grzelak@intel.com>
To: intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org
Cc: "Michał Grzelak" <michal.grzelak@intel.com>
Subject: [PATCH v1 1/1] drm/i915/display: Add no_psr_reason to PSR debugfs
Date: Tue, 13 May 2025 13:35:26 +0200 [thread overview]
Message-ID: <20250513113526.2758433-2-michal.grzelak@intel.com> (raw)
In-Reply-To: <20250513113526.2758433-1-michal.grzelak@intel.com>
There is no reason in debugfs why PSR has been disabled. Add
no_psr_reason field into struct intel_psr. Write the reason,
e.g. PSR setup timing not met, into proper PSR debugfs file.
Signed-off-by: Michał Grzelak <michal.grzelak@intel.com>
---
.../gpu/drm/i915/display/intel_display_types.h | 2 ++
drivers/gpu/drm/i915/display/intel_psr.c | 15 ++++++++-------
2 files changed, 10 insertions(+), 7 deletions(-)
diff --git a/drivers/gpu/drm/i915/display/intel_display_types.h b/drivers/gpu/drm/i915/display/intel_display_types.h
index 7415564d058a..7d598357a702 100644
--- a/drivers/gpu/drm/i915/display/intel_display_types.h
+++ b/drivers/gpu/drm/i915/display/intel_display_types.h
@@ -1653,6 +1653,8 @@ struct intel_psr {
bool link_ok;
u8 active_non_psr_pipes;
+
+ const char *no_psr_reason;
};
struct intel_dp {
diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b/drivers/gpu/drm/i915/display/intel_psr.c
index ccd66bbc72f7..f0fdff236fef 100644
--- a/drivers/gpu/drm/i915/display/intel_psr.c
+++ b/drivers/gpu/drm/i915/display/intel_psr.c
@@ -1577,6 +1577,7 @@ static bool _psr_compute_config(struct intel_dp *intel_dp,
if (entry_setup_frames >= 0) {
intel_dp->psr.entry_setup_frames = entry_setup_frames;
} else {
+ intel_dp->psr.no_psr_reason = "PSR setup timing not met";
drm_dbg_kms(display->drm,
"PSR condition failed: PSR setup timing not met\n");
return false;
@@ -3918,12 +3919,7 @@ static void intel_psr_print_mode(struct intel_dp *intel_dp,
struct seq_file *m)
{
struct intel_psr *psr = &intel_dp->psr;
- const char *status, *mode, *region_et;
-
- if (psr->enabled)
- status = " enabled";
- else
- status = "disabled";
+ const char *mode, *region_et;
if (psr->panel_replay_enabled && psr->sel_update_enabled)
mode = "Panel Replay Selective Update";
@@ -3941,7 +3937,12 @@ static void intel_psr_print_mode(struct intel_dp *intel_dp,
else
region_et = "";
- seq_printf(m, "PSR mode: %s%s%s\n", mode, status, region_et);
+ if (psr->enabled) {
+ seq_puts(m, "PSR enabled\n");
+ seq_printf(m, "PSR mode: %s%s\n", mode, region_et);
+ } else {
+ seq_printf(m, "PSR disabled: %s\n", psr->no_psr_reason);
+ }
}
static int intel_psr_status(struct seq_file *m, struct intel_dp *intel_dp)
--
2.45.2
next prev parent reply other threads:[~2025-05-13 11:35 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-13 11:35 [PATCH v1 0/1] drm/i915/display: Add no_psr_reason to PSR debugfs Michał Grzelak
2025-05-13 11:35 ` Michał Grzelak [this message]
2025-05-13 12:23 ` [PATCH v1 1/1] " Jani Nikula
2025-05-14 9:41 ` ✓ CI.Patch_applied: success for " Patchwork
2025-05-14 9:41 ` ✓ CI.checkpatch: " Patchwork
2025-05-14 9:42 ` ✓ CI.KUnit: " Patchwork
2025-05-14 9:52 ` ✓ CI.Build: " Patchwork
2025-05-14 9:55 ` ✓ CI.Hooks: " Patchwork
2025-05-14 9:56 ` ✓ CI.checksparse: " Patchwork
2025-05-14 10:32 ` ✓ Xe.CI.BAT: " Patchwork
2025-05-14 14:11 ` ✗ Xe.CI.Full: failure " Patchwork
2025-05-26 23:16 ` ✓ CI.Patch_applied: success " Patchwork
2025-05-26 23:16 ` ✓ CI.checkpatch: " Patchwork
2025-05-26 23:17 ` ✓ CI.KUnit: " Patchwork
2025-05-26 23:27 ` ✓ CI.Build: " 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=20250513113526.2758433-2-michal.grzelak@intel.com \
--to=michal.grzelak@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