Commit a4530e20 authored by Imre Deak's avatar Imre Deak

drm/i915/dp: Send only a single modeset-retry uevent for a commit

There are multiple failure cases a modeset-retry uevent can be sent for
a link (TBT tunnel BW allocation failure, unrecoverable link training
failure), a follow-up patch adding the handling for a new case where the
DP MST payload allocation fails. The uevent is the same in all cases,
sent to all the connectors on the link, so in case of multiple failures
there is no point in sending a separate uevent for each failure; prevent
this, sending only a single modeset-retry uevent for a commit.
Reviewed-by: default avatarArun R Murthy <arun.r.murthy@intel.com>
Signed-off-by: default avatarImre Deak <imre.deak@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240722165503.2084999-7-imre.deak@intel.com
parent a3f91f40
...@@ -1754,6 +1754,7 @@ struct intel_dp { ...@@ -1754,6 +1754,7 @@ struct intel_dp {
u8 lane_count; u8 lane_count;
u8 sink_count; u8 sink_count;
bool link_trained; bool link_trained;
bool needs_modeset_retry;
bool use_max_params; bool use_max_params;
u8 dpcd[DP_RECEIVER_CAP_SIZE]; u8 dpcd[DP_RECEIVER_CAP_SIZE];
u8 psr_dpcd[EDP_PSR_RECEIVER_CAP_SIZE]; u8 psr_dpcd[EDP_PSR_RECEIVER_CAP_SIZE];
......
...@@ -2876,6 +2876,11 @@ intel_dp_queue_modeset_retry_for_link(struct intel_atomic_state *state, ...@@ -2876,6 +2876,11 @@ intel_dp_queue_modeset_retry_for_link(struct intel_atomic_state *state,
struct intel_dp *intel_dp = enc_to_intel_dp(encoder); struct intel_dp *intel_dp = enc_to_intel_dp(encoder);
int i; int i;
if (intel_dp->needs_modeset_retry)
return;
intel_dp->needs_modeset_retry = true;
if (!intel_crtc_has_type(crtc_state, INTEL_OUTPUT_DP_MST)) { if (!intel_crtc_has_type(crtc_state, INTEL_OUTPUT_DP_MST)) {
intel_dp_queue_modeset_retry_work(intel_dp->attached_connector); intel_dp_queue_modeset_retry_work(intel_dp->attached_connector);
...@@ -3009,6 +3014,7 @@ void intel_dp_set_link_params(struct intel_dp *intel_dp, ...@@ -3009,6 +3014,7 @@ void intel_dp_set_link_params(struct intel_dp *intel_dp,
{ {
memset(intel_dp->train_set, 0, sizeof(intel_dp->train_set)); memset(intel_dp->train_set, 0, sizeof(intel_dp->train_set));
intel_dp->link_trained = false; intel_dp->link_trained = false;
intel_dp->needs_modeset_retry = false;
intel_dp->link_rate = link_rate; intel_dp->link_rate = link_rate;
intel_dp->lane_count = lane_count; intel_dp->lane_count = lane_count;
} }
......
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