]> git.baikalelectronics.ru Git - kernel.git/commit
drm/display/dp_mst: Fix payload addition on a disconnected sink
authorImre Deak <imre.deak@intel.com>
Wed, 14 Dec 2022 18:42:58 +0000 (20:42 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 11 Mar 2023 12:55:43 +0000 (13:55 +0100)
commite3aba17e471c30ac246b3dda10bf872c824c30ae
tree2792754fe4dd13e6661b7f5ee11e9a56db650505
parent760986f780ad04bba4c0dc08c1de78e10f4be176
drm/display/dp_mst: Fix payload addition on a disconnected sink

commit 48b5c43ac2f67d9fe3d79d97d00f44acd5395abf upstream.

If an MST stream is enabled on a disconnected sink, the payload for the
stream is not created and the MST manager's payload count/next start VC
slot is not updated. Since the payload's start VC slot may still contain
a valid value (!= -1) the subsequent disabling of such a stream could
cause an incorrect decrease of the payload count/next start VC slot in
drm_dp_remove_payload() and hence later payload additions will fail.

Fix the above by marking the payload as invalid in the above case, so
that it's skipped during payload removal. While at it add a debug print
for this case.

Cc: Lyude Paul <lyude@redhat.com>
Cc: <stable@vger.kernel.org> # v6.1+
Signed-off-by: Imre Deak <imre.deak@intel.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20221214184258.2869417-3-imre.deak@intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/display/drm_dp_mst_topology.c