diff options
author | Wayne Lin <Wayne.Lin@amd.com> | 2021-06-16 11:55:01 +0800 |
---|---|---|
committer | Lyude Paul <lyude@redhat.com> | 2021-06-16 12:57:46 -0400 |
commit | 3769e4c0af5b82c8ea21d037013cb9564dfaa51f (patch) | |
tree | c50833bb29955de61949eabbf8f8a1bc8c88c107 /samples | |
parent | 35d3e8cb35e75450f87f87e3d314e2d418b6954b (diff) |
drm/dp_mst: Avoid to mess up payload table by ports in stale topologydrm-misc-next-fixes-2021-06-16
[Why]
After unplug/hotplug hub from the system, userspace might start to
clear stale payloads gradually. If we call drm_dp_mst_deallocate_vcpi()
to release stale VCPI of those ports which are not relating to current
topology, we have chane to wrongly clear active payload table entry for
current topology.
E.g.
We have allocated VCPI 1 in current payload table and we call
drm_dp_mst_deallocate_vcpi() to clean VCPI 1 in stale topology. In
drm_dp_mst_deallocate_vcpi(), it will call drm_dp_mst_put_payload_id()
tp put VCPI 1 and which means ID 1 is available again. Thereafter, if we
want to allocate a new payload stream, it will find ID 1 is available by
drm_dp_mst_assign_payload_id(). However, ID 1 is being used
[How]
Check target sink is relating to current topology or not before doing
any payload table update.
Searching upward to find the target sink's relevant root branch device.
If the found root branch device is not the same root of current
topology, don't update payload table.
Changes since v1:
* Change debug macro to use drm_dbg_kms() instead
* Amend the commit message to add Cc tag.
Signed-off-by: Wayne Lin <Wayne.Lin@amd.com>
Cc: stable@vger.kernel.org
Signed-off-by: Lyude Paul <lyude@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210616035501.3776-3-Wayne.Lin@amd.com
Reviewed-by: Lyude Paul <lyude@redhat.com>
Diffstat (limited to 'samples')
0 files changed, 0 insertions, 0 deletions