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. Reviewed-by: Suraj Kandpal <suraj.kandpal@intel.com> Signed-off-by: Imre Deak <imre.deak@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240712135724.660399-2-imre.deak@intel.com
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user