]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/dp_mst: Factor out function to queue a topology probe work
authorImre Deak <imre.deak@intel.com>
Mon, 22 Jul 2024 16:54:50 +0000 (19:54 +0300)
committerImre Deak <imre.deak@intel.com>
Wed, 31 Jul 2024 15:45:23 +0000 (18:45 +0300)
Factor out a function to queue a work for probing the topology, also
used by the next patch.

Cc: Lyude Paul <lyude@redhat.com>
Cc: dri-devel@lists.freedesktop.org
Reviewed-by: Lyude Paul <lyude@redhat.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240722165503.2084999-2-imre.deak@intel.com
drivers/gpu/drm/display/drm_dp_mst_topology.c

index 7f8e1cfbe19d9f2065112e4fb9e74dce8a1ae74a..eb1b7b286b7699fcef96c88d6f6612d1074c0a5a 100644 (file)
@@ -2692,6 +2692,11 @@ static void drm_dp_mst_link_probe_work(struct work_struct *work)
                drm_kms_helper_hotplug_event(dev);
 }
 
+static void drm_dp_mst_queue_probe_work(struct drm_dp_mst_topology_mgr *mgr)
+{
+       queue_work(system_long_wq, &mgr->work);
+}
+
 static bool drm_dp_validate_guid(struct drm_dp_mst_topology_mgr *mgr,
                                 u8 *guid)
 {
@@ -3685,7 +3690,7 @@ int drm_dp_mst_topology_mgr_set_mst(struct drm_dp_mst_topology_mgr *mgr, bool ms
                /* Write reset payload */
                drm_dp_dpcd_write_payload(mgr, 0, 0, 0x3f);
 
-               queue_work(system_long_wq, &mgr->work);
+               drm_dp_mst_queue_probe_work(mgr);
 
                ret = 0;
        } else {
@@ -3809,7 +3814,7 @@ int drm_dp_mst_topology_mgr_resume(struct drm_dp_mst_topology_mgr *mgr,
         * state of our in-memory topology back into sync with reality. So,
         * restart the probing process as if we're probing a new hub
         */
-       queue_work(system_long_wq, &mgr->work);
+       drm_dp_mst_queue_probe_work(mgr);
        mutex_unlock(&mgr->lock);
 
        if (sync) {