Commit d8bf2df7 authored by Wayne Lin's avatar Wayne Lin Committed by Alex Deucher

drm/display/dp_mst: Correct the kref of port.

[why & how]
We still need to refer to port while removing payload at commit_tail.
we should keep the kref till then to release.

Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/2171Signed-off-by: default avatarWayne Lin <Wayne.Lin@amd.com>
Signed-off-by: default avatarHarry Wentland <harry.wentland@amd.com>
Fixes: 4d07b0bc ("drm/display/dp_mst: Move all payload info into the atomic state")
Cc: stable@vger.kernel.org # 6.1
Acked-by: default avatarHarry Wentland <harry.wentland@amd.com>
Reviewed-by: default avatarLyude Paul <lyude@redhat.com>
Tested-by: default avatarDidier Raboud <odyx@debian.org>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent f85c5e25
...@@ -3372,6 +3372,9 @@ void drm_dp_remove_payload(struct drm_dp_mst_topology_mgr *mgr, ...@@ -3372,6 +3372,9 @@ void drm_dp_remove_payload(struct drm_dp_mst_topology_mgr *mgr,
mgr->payload_count--; mgr->payload_count--;
mgr->next_start_slot -= payload->time_slots; mgr->next_start_slot -= payload->time_slots;
if (payload->delete)
drm_dp_mst_put_port_malloc(payload->port);
} }
EXPORT_SYMBOL(drm_dp_remove_payload); EXPORT_SYMBOL(drm_dp_remove_payload);
...@@ -4327,7 +4330,6 @@ int drm_dp_atomic_release_time_slots(struct drm_atomic_state *state, ...@@ -4327,7 +4330,6 @@ int drm_dp_atomic_release_time_slots(struct drm_atomic_state *state,
drm_dbg_atomic(mgr->dev, "[MST PORT:%p] TU %d -> 0\n", port, payload->time_slots); drm_dbg_atomic(mgr->dev, "[MST PORT:%p] TU %d -> 0\n", port, payload->time_slots);
if (!payload->delete) { if (!payload->delete) {
drm_dp_mst_put_port_malloc(port);
payload->pbn = 0; payload->pbn = 0;
payload->delete = true; payload->delete = true;
topology_state->payload_mask &= ~BIT(payload->vcpi - 1); topology_state->payload_mask &= ~BIT(payload->vcpi - 1);
......
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