drm/dp_mst: Fix flushing the delayed port/mstb destroy work
authorImre Deak <imre.deak@intel.com>
Wed, 10 Jun 2020 13:47:04 +0000 (16:47 +0300)
committerImre Deak <imre.deak@intel.com>
Thu, 11 Jun 2020 12:38:12 +0000 (15:38 +0300)
commit72822c3bfa8ef7c997692acd580c73c263107592
tree66687138540c44f1139f9aab387890a9b6846569
parentd8bd15b37d328a935a4fc695fed8b19157503950
drm/dp_mst: Fix flushing the delayed port/mstb destroy work

Atm, a pending delayed destroy work during module removal will be
canceled, leaving behind MST ports, mstbs. Fix this by using a dedicated
workqueue which will be drained of requeued items as well when
destroying it.

v2:
- Check if wq is NULL before calling destroy_workqueue().

Cc: Lyude Paul <lyude@redhat.com>
Cc: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com>
Reviewed-by: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200610134704.25270-1-imre.deak@intel.com
drivers/gpu/drm/drm_dp_mst_topology.c
include/drm/drm_dp_mst_helper.h