[PATCH 1/1] drm/i915/display: Add no_psr_reason to PSR debugfs
Michał Grzelak
michal.grzelak at intel.com
Wed May 7 18:26:52 UTC 2025
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 at 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
---------------------------------------------------------------------
Intel Technology Poland sp. z o.o.
ul. Slowackiego 173 | 80-298 Gdansk | Sad Rejonowy Gdansk Polnoc | VII Wydzial Gospodarczy Krajowego Rejestru Sadowego - KRS 101882 | NIP 957-07-52-316 | Kapital zakladowy 200.000 PLN.
Spolka oswiadcza, ze posiada status duzego przedsiebiorcy w rozumieniu ustawy z dnia 8 marca 2013 r. o przeciwdzialaniu nadmiernym opoznieniom w transakcjach handlowych.
Ta wiadomosc wraz z zalacznikami jest przeznaczona dla okreslonego adresata i moze zawierac informacje poufne. W razie przypadkowego otrzymania tej wiadomosci, prosimy o powiadomienie nadawcy oraz trwale jej usuniecie; jakiekolwiek przegladanie lub rozpowszechnianie jest zabronione.
This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). If you are not the intended recipient, please contact the sender and delete all copies; any review or distribution by others is strictly prohibited.
More information about the Intel-gfx-trybot
mailing list