Message ID | 20240712135724.660399-2-imre.deak@intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [1/3] drm/i915/dp: Retrain SST links via a modeset commit | expand |
> -----Original Message----- > From: Intel-gfx <intel-gfx-bounces@lists.freedesktop.org> On Behalf Of Imre > Deak > Sent: Friday, July 12, 2024 7:27 PM > To: intel-gfx@lists.freedesktop.org > Subject: [PATCH 2/3] drm/i915/dp: Require a valid atomic state for SST link > training > > After the previous patch link training happens always with a valid atomic > state, so remove the NOTE comments and asserts which required a valid > state only for DP-MST and allowed for a NULL state for DP-SST. > > Signed-off-by: Imre Deak <imre.deak@intel.com> LGTM, Reviewed-by: Suraj Kandpal <suraj.kandpal@intel.com> > --- > drivers/gpu/drm/i915/display/intel_dp.c | 5 ----- > .../gpu/drm/i915/display/intel_dp_link_training.c | 14 -------------- > 2 files changed, 19 deletions(-) > > diff --git a/drivers/gpu/drm/i915/display/intel_dp.c > b/drivers/gpu/drm/i915/display/intel_dp.c > index f83128ac60756..0365fb1e77eae 100644 > --- a/drivers/gpu/drm/i915/display/intel_dp.c > +++ b/drivers/gpu/drm/i915/display/intel_dp.c > @@ -2866,7 +2866,6 @@ static void > intel_dp_queue_modeset_retry_work(struct intel_connector *connector) > drm_connector_put(&connector->base); > } > > -/* NOTE: @state is only valid for MST links and can be %NULL for SST. */ > void intel_dp_queue_modeset_retry_for_link(struct intel_atomic_state > *state, > struct intel_encoder *encoder, @@ - > 2875,7 +2874,6 @@ intel_dp_queue_modeset_retry_for_link(struct > intel_atomic_state *state, > struct intel_connector *connector; > struct intel_digital_connector_state *conn_state; > struct intel_dp *intel_dp = enc_to_intel_dp(encoder); > - struct drm_i915_private *i915 = dp_to_i915(intel_dp); > int i; > > if (!intel_crtc_has_type(crtc_state, INTEL_OUTPUT_DP_MST)) { @@ - > 2884,9 +2882,6 @@ intel_dp_queue_modeset_retry_for_link(struct > intel_atomic_state *state, > return; > } > > - if (drm_WARN_ON(&i915->drm, !state)) > - return; > - > for_each_new_intel_connector_in_state(state, connector, > conn_state, i) { > if (!conn_state->base.crtc) > continue; > diff --git a/drivers/gpu/drm/i915/display/intel_dp_link_training.c > b/drivers/gpu/drm/i915/display/intel_dp_link_training.c > index af0b71bdf1fcf..58dea87a9fa28 100644 > --- a/drivers/gpu/drm/i915/display/intel_dp_link_training.c > +++ b/drivers/gpu/drm/i915/display/intel_dp_link_training.c > @@ -1234,12 +1234,10 @@ static int > intel_dp_get_link_train_fallback_values(struct intel_dp *intel_dp, > return 0; > } > > -/* NOTE: @state is only valid for MST links and can be %NULL for SST. */ > static bool intel_dp_schedule_fallback_link_training(struct > intel_atomic_state *state, > struct intel_dp *intel_dp, > const struct > intel_crtc_state *crtc_state) { > - struct drm_i915_private *i915 = dp_to_i915(intel_dp); > struct intel_encoder *encoder = &dp_to_dig_port(intel_dp)->base; > > if (!intel_digital_port_connected(&dp_to_dig_port(intel_dp)->base)) > { @@ -1255,11 +1253,6 @@ static bool > intel_dp_schedule_fallback_link_training(struct intel_atomic_state * > return false; > } > > - if (drm_WARN_ON(&i915->drm, > - intel_crtc_has_type(crtc_state, > INTEL_OUTPUT_DP_MST) && > - !state)) > - return false; > - > /* Schedule a Hotplug Uevent to userspace to start modeset */ > intel_dp_queue_modeset_retry_for_link(state, encoder, crtc_state); > > @@ -1518,8 +1511,6 @@ intel_dp_128b132b_link_train(struct intel_dp > *intel_dp, > * retraining with reduced link rate/lane parameters if the link training > * fails. > * After calling this function intel_dp_stop_link_train() must be called. > - * > - * NOTE: @state is only valid for MST links and can be %NULL for SST. > */ > void intel_dp_start_link_train(struct intel_atomic_state *state, > struct intel_dp *intel_dp, > @@ -1536,11 +1527,6 @@ void intel_dp_start_link_train(struct > intel_atomic_state *state, > */ > int lttpr_count = intel_dp_init_lttpr_and_dprx_caps(intel_dp); > > - if (drm_WARN_ON(&i915->drm, > - intel_crtc_has_type(crtc_state, > INTEL_OUTPUT_DP_MST) && > - !state)) > - return; > - > if (lttpr_count < 0) > /* Still continue with enabling the port and link training. */ > lttpr_count = 0; > -- > 2.44.2
diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c index f83128ac60756..0365fb1e77eae 100644 --- a/drivers/gpu/drm/i915/display/intel_dp.c +++ b/drivers/gpu/drm/i915/display/intel_dp.c @@ -2866,7 +2866,6 @@ static void intel_dp_queue_modeset_retry_work(struct intel_connector *connector) drm_connector_put(&connector->base); } -/* NOTE: @state is only valid for MST links and can be %NULL for SST. */ void intel_dp_queue_modeset_retry_for_link(struct intel_atomic_state *state, struct intel_encoder *encoder, @@ -2875,7 +2874,6 @@ intel_dp_queue_modeset_retry_for_link(struct intel_atomic_state *state, struct intel_connector *connector; struct intel_digital_connector_state *conn_state; struct intel_dp *intel_dp = enc_to_intel_dp(encoder); - struct drm_i915_private *i915 = dp_to_i915(intel_dp); int i; if (!intel_crtc_has_type(crtc_state, INTEL_OUTPUT_DP_MST)) { @@ -2884,9 +2882,6 @@ intel_dp_queue_modeset_retry_for_link(struct intel_atomic_state *state, return; } - if (drm_WARN_ON(&i915->drm, !state)) - return; - for_each_new_intel_connector_in_state(state, connector, conn_state, i) { if (!conn_state->base.crtc) continue; diff --git a/drivers/gpu/drm/i915/display/intel_dp_link_training.c b/drivers/gpu/drm/i915/display/intel_dp_link_training.c index af0b71bdf1fcf..58dea87a9fa28 100644 --- a/drivers/gpu/drm/i915/display/intel_dp_link_training.c +++ b/drivers/gpu/drm/i915/display/intel_dp_link_training.c @@ -1234,12 +1234,10 @@ static int intel_dp_get_link_train_fallback_values(struct intel_dp *intel_dp, return 0; } -/* NOTE: @state is only valid for MST links and can be %NULL for SST. */ static bool intel_dp_schedule_fallback_link_training(struct intel_atomic_state *state, struct intel_dp *intel_dp, const struct intel_crtc_state *crtc_state) { - struct drm_i915_private *i915 = dp_to_i915(intel_dp); struct intel_encoder *encoder = &dp_to_dig_port(intel_dp)->base; if (!intel_digital_port_connected(&dp_to_dig_port(intel_dp)->base)) { @@ -1255,11 +1253,6 @@ static bool intel_dp_schedule_fallback_link_training(struct intel_atomic_state * return false; } - if (drm_WARN_ON(&i915->drm, - intel_crtc_has_type(crtc_state, INTEL_OUTPUT_DP_MST) && - !state)) - return false; - /* Schedule a Hotplug Uevent to userspace to start modeset */ intel_dp_queue_modeset_retry_for_link(state, encoder, crtc_state); @@ -1518,8 +1511,6 @@ intel_dp_128b132b_link_train(struct intel_dp *intel_dp, * retraining with reduced link rate/lane parameters if the link training * fails. * After calling this function intel_dp_stop_link_train() must be called. - * - * NOTE: @state is only valid for MST links and can be %NULL for SST. */ void intel_dp_start_link_train(struct intel_atomic_state *state, struct intel_dp *intel_dp, @@ -1536,11 +1527,6 @@ void intel_dp_start_link_train(struct intel_atomic_state *state, */ int lttpr_count = intel_dp_init_lttpr_and_dprx_caps(intel_dp); - if (drm_WARN_ON(&i915->drm, - intel_crtc_has_type(crtc_state, INTEL_OUTPUT_DP_MST) && - !state)) - return; - if (lttpr_count < 0) /* Still continue with enabling the port and link training. */ lttpr_count = 0;
After the previous patch link training happens always with a valid atomic state, so remove the NOTE comments and asserts which required a valid state only for DP-MST and allowed for a NULL state for DP-SST. Signed-off-by: Imre Deak <imre.deak@intel.com> --- drivers/gpu/drm/i915/display/intel_dp.c | 5 ----- .../gpu/drm/i915/display/intel_dp_link_training.c | 14 -------------- 2 files changed, 19 deletions(-)