Skip to content

Commit d8bf2df

Browse files
Wayne Linalexdeucher
authored andcommitted
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/2171 Signed-off-by: Wayne Lin <[email protected]> Signed-off-by: Harry Wentland <[email protected]> Fixes: 4d07b0b ("drm/display/dp_mst: Move all payload info into the atomic state") Cc: [email protected] # 6.1 Acked-by: Harry Wentland <[email protected]> Reviewed-by: Lyude Paul <[email protected]> Tested-by: Didier Raboud <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent f85c5e2 commit d8bf2df

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/gpu/drm/display/drm_dp_mst_topology.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3372,6 +3372,9 @@ void drm_dp_remove_payload(struct drm_dp_mst_topology_mgr *mgr,
33723372

33733373
mgr->payload_count--;
33743374
mgr->next_start_slot -= payload->time_slots;
3375+
3376+
if (payload->delete)
3377+
drm_dp_mst_put_port_malloc(payload->port);
33753378
}
33763379
EXPORT_SYMBOL(drm_dp_remove_payload);
33773380

@@ -4327,7 +4330,6 @@ int drm_dp_atomic_release_time_slots(struct drm_atomic_state *state,
43274330

43284331
drm_dbg_atomic(mgr->dev, "[MST PORT:%p] TU %d -> 0\n", port, payload->time_slots);
43294332
if (!payload->delete) {
4330-
drm_dp_mst_put_port_malloc(port);
43314333
payload->pbn = 0;
43324334
payload->delete = true;
43334335
topology_state->payload_mask &= ~BIT(payload->vcpi - 1);

0 commit comments

Comments
 (0)