From: jsg Date: Mon, 17 Apr 2023 05:32:30 +0000 (+0000) Subject: drm/i915/dp_mst: Fix payload removal during output disabling X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=e8d87bf3227dcea61e5efe88e3d7612f431f3e74;p=openbsd drm/i915/dp_mst: Fix payload removal during output disabling From Imre Deak 1297278ce23977853afeac7bfb65e42450a722dd in linux-6.1.y/6.1.24 eb50912ec931913e70640cecf75cb993fd26995f in mainline linux --- diff --git a/sys/dev/pci/drm/i915/display/intel_dp_mst.c b/sys/dev/pci/drm/i915/display/intel_dp_mst.c index 256afff75b0..9a6822256dd 100644 --- a/sys/dev/pci/drm/i915/display/intel_dp_mst.c +++ b/sys/dev/pci/drm/i915/display/intel_dp_mst.c @@ -364,10 +364,14 @@ static void intel_mst_disable_dp(struct intel_atomic_state *state, struct intel_dp *intel_dp = &dig_port->dp; struct intel_connector *connector = to_intel_connector(old_conn_state->connector); - struct drm_dp_mst_topology_state *mst_state = - drm_atomic_get_mst_topology_state(&state->base, &intel_dp->mst_mgr); - struct drm_dp_mst_atomic_payload *payload = - drm_atomic_get_mst_payload_state(mst_state, connector->port); + struct drm_dp_mst_topology_state *old_mst_state = + drm_atomic_get_old_mst_topology_state(&state->base, &intel_dp->mst_mgr); + struct drm_dp_mst_topology_state *new_mst_state = + drm_atomic_get_new_mst_topology_state(&state->base, &intel_dp->mst_mgr); + const struct drm_dp_mst_atomic_payload *old_payload = + drm_atomic_get_mst_payload_state(old_mst_state, connector->port); + struct drm_dp_mst_atomic_payload *new_payload = + drm_atomic_get_mst_payload_state(new_mst_state, connector->port); struct drm_i915_private *i915 = to_i915(connector->base.dev); drm_dbg_kms(&i915->drm, "active links %d\n", @@ -375,8 +379,8 @@ static void intel_mst_disable_dp(struct intel_atomic_state *state, intel_hdcp_disable(intel_mst->connector); - drm_dp_remove_payload(&intel_dp->mst_mgr, mst_state, - payload, payload); + drm_dp_remove_payload(&intel_dp->mst_mgr, new_mst_state, + old_payload, new_payload); intel_audio_codec_disable(encoder, old_crtc_state, old_conn_state); }