intel-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drm/i915/psr: Request modeset on initial commit to compute PSR state
@ 2024-01-23  7:11 Jouni Högander
  2024-01-23  7:41 ` Ville Syrjälä
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Jouni Högander @ 2024-01-23  7:11 UTC (permalink / raw)
  To: intel-gfx

We want to request full modeset in initial fast check to force PSR state
computation. Otherwise PSR is not enabled on initial commit but on first
commit with modeset or fastset. With this change Initial commit will still
end up using fastset (unless something else requires full modeset) as PSR
parameters are not anymore part of intel_pipe_config_compare.

Cc: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com>

Fixes: a480dd59fe25 ("drm/i915/display: No need for full modeset due to psr")
Signed-off-by: Jouni Högander <jouni.hogander@intel.com>
---
 drivers/gpu/drm/i915/display/intel_dp.c  | 8 ++++++++
 drivers/gpu/drm/i915/display/intel_psr.c | 3 ---
 drivers/gpu/drm/i915/display/intel_psr.h | 3 +++
 3 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
index ab415f41924d..143981b91e8b 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.c
+++ b/drivers/gpu/drm/i915/display/intel_dp.c
@@ -3326,6 +3326,14 @@ bool intel_dp_initial_fastset_check(struct intel_encoder *encoder,
 		fastset = false;
 	}
 
+	if (CAN_PSR(intel_dp)) {
+		drm_dbg_kms(&i915->drm, "[ENCODER:%d:%s] Forcing full modeset to compute PSR state\
+n",
+			    encoder->base.base.id, encoder->base.name);
+		crtc_state->uapi.mode_changed = true;
+		fastset = false;
+	}
+
 	return fastset;
 }
 
diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b/drivers/gpu/drm/i915/display/intel_psr.c
index 1010b8c405df..b6db7dbfaf1a 100644
--- a/drivers/gpu/drm/i915/display/intel_psr.c
+++ b/drivers/gpu/drm/i915/display/intel_psr.c
@@ -173,9 +173,6 @@
  * irrelevant for normal operation.
  */
 
-#define CAN_PSR(intel_dp) ((intel_dp)->psr.sink_support && \
-			   (intel_dp)->psr.source_support)
-
 #define CAN_PANEL_REPLAY(intel_dp) ((intel_dp)->psr.sink_panel_replay_support && \
 				    (intel_dp)->psr.source_panel_replay_support)
 
diff --git a/drivers/gpu/drm/i915/display/intel_psr.h b/drivers/gpu/drm/i915/display/intel_psr.h
index cde781df84d5..3d9920ebafab 100644
--- a/drivers/gpu/drm/i915/display/intel_psr.h
+++ b/drivers/gpu/drm/i915/display/intel_psr.h
@@ -21,6 +21,9 @@ struct intel_encoder;
 struct intel_plane;
 struct intel_plane_state;
 
+#define CAN_PSR(intel_dp) ((intel_dp)->psr.sink_support && \
+			   (intel_dp)->psr.source_support)
+
 bool intel_encoder_can_psr(struct intel_encoder *encoder);
 void intel_psr_init_dpcd(struct intel_dp *intel_dp);
 void intel_psr_pre_plane_update(struct intel_atomic_state *state,
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2024-01-24  9:15 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-23  7:11 [PATCH] drm/i915/psr: Request modeset on initial commit to compute PSR state Jouni Högander
2024-01-23  7:41 ` Ville Syrjälä
2024-01-23  7:57   ` Hogander, Jouni
2024-01-23  8:07     ` Ville Syrjälä
2024-01-23  8:17       ` Hogander, Jouni
2024-01-23  8:38         ` Ville Syrjälä
2024-01-24  9:15       ` Jani Nikula
2024-01-23  7:55 ` ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
2024-01-23  8:09 ` ✓ Fi.CI.BAT: success " Patchwork
2024-01-23 10:58 ` ✗ Fi.CI.IGT: failure " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).