Commit ac9ef327 authored by Jouni Högander's avatar Jouni Högander

drm/i915/psr: Panel replay has to be enabled before link training

Panel replay has to be enabled on sink side before link training. Take this
into account in fastset check and in initial fastset check.
Signed-off-by: default avatarJouni Högander <jouni.hogander@intel.com>
Reviewed-by: default avatarAnimesh Manna <animesh.manna@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240405113602.992714-9-jouni.hogander@intel.com
parent 88ae6c65
...@@ -5298,6 +5298,18 @@ intel_pipe_config_compare(const struct intel_crtc_state *current_config, ...@@ -5298,6 +5298,18 @@ intel_pipe_config_compare(const struct intel_crtc_state *current_config,
PIPE_CONF_CHECK_CSC(output_csc); PIPE_CONF_CHECK_CSC(output_csc);
} }
/*
* Panel replay has to be enabled before link training. PSR doesn't have
* this requirement -> check these only if using panel replay
*/
if (current_config->has_panel_replay || pipe_config->has_panel_replay) {
PIPE_CONF_CHECK_BOOL(has_psr);
PIPE_CONF_CHECK_BOOL(has_psr2);
PIPE_CONF_CHECK_BOOL(enable_psr2_sel_fetch);
PIPE_CONF_CHECK_BOOL(enable_psr2_su_region_et);
PIPE_CONF_CHECK_BOOL(has_panel_replay);
}
PIPE_CONF_CHECK_BOOL(double_wide); PIPE_CONF_CHECK_BOOL(double_wide);
if (dev_priv->display.dpll.mgr) if (dev_priv->display.dpll.mgr)
......
...@@ -3386,6 +3386,14 @@ bool intel_dp_initial_fastset_check(struct intel_encoder *encoder, ...@@ -3386,6 +3386,14 @@ bool intel_dp_initial_fastset_check(struct intel_encoder *encoder,
fastset = false; fastset = false;
} }
if (CAN_PANEL_REPLAY(intel_dp)) {
drm_dbg_kms(&i915->drm,
"[ENCODER:%d:%s] Forcing full modeset to compute panel replay state\n",
encoder->base.base.id, encoder->base.name);
crtc_state->uapi.mode_changed = true;
fastset = false;
}
return fastset; return fastset;
} }
......
...@@ -192,9 +192,6 @@ ...@@ -192,9 +192,6 @@
#define CAN_PSR(intel_dp) ((intel_dp)->psr.sink_support && \ #define CAN_PSR(intel_dp) ((intel_dp)->psr.sink_support && \
(intel_dp)->psr.source_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)
bool intel_encoder_can_psr(struct intel_encoder *encoder) bool intel_encoder_can_psr(struct intel_encoder *encoder)
{ {
if (intel_encoder_is_dp(encoder) || encoder->type == INTEL_OUTPUT_DP_MST) if (intel_encoder_is_dp(encoder) || encoder->type == INTEL_OUTPUT_DP_MST)
......
...@@ -21,6 +21,9 @@ struct intel_encoder; ...@@ -21,6 +21,9 @@ struct intel_encoder;
struct intel_plane; struct intel_plane;
struct intel_plane_state; struct intel_plane_state;
#define CAN_PANEL_REPLAY(intel_dp) ((intel_dp)->psr.sink_panel_replay_support && \
(intel_dp)->psr.source_panel_replay_support)
bool intel_encoder_can_psr(struct intel_encoder *encoder); bool intel_encoder_can_psr(struct intel_encoder *encoder);
void intel_psr_init_dpcd(struct intel_dp *intel_dp); void intel_psr_init_dpcd(struct intel_dp *intel_dp);
void intel_psr_enable_sink(struct intel_dp *intel_dp, void intel_psr_enable_sink(struct intel_dp *intel_dp,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment