]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/self_refresh: replace use of system_wq with system_percpu_wq
authorMarco Crivellari <marco.crivellari@suse.com>
Thu, 30 Oct 2025 16:20:43 +0000 (17:20 +0100)
committerThomas Zimmermann <tzimmermann@suse.de>
Mon, 9 Feb 2026 08:41:12 +0000 (09:41 +0100)
Currently if a user enqueue a work item using schedule_delayed_work() the
used wq is "system_wq" (per-cpu wq) while queue_delayed_work() use
WORK_CPU_UNBOUND (used when a cpu is not specified). The same applies to
schedule_work() that is using system_wq and queue_work(), that makes use
again of WORK_CPU_UNBOUND.

This lack of consistency cannot be addressed without refactoring the API.

system_wq should be the per-cpu workqueue, yet in this name nothing makes
that clear, so replace system_wq with system_percpu_wq.

The old wq (system_wq) will be kept for a few release cycles.

Suggested-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Marco Crivellari <marco.crivellari@suse.com>
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Link: https://patch.msgid.link/20251030162043.292468-4-marco.crivellari@suse.com
drivers/gpu/drm/drm_self_refresh_helper.c

index c0948586b7fd6a93430292483dbdc68759fbd757..36f4237efd4d880a89b29a1591f47cf01724e7de 100644 (file)
@@ -218,7 +218,7 @@ void drm_self_refresh_helper_alter_state(struct drm_atomic_state *state)
                         ewma_psr_time_read(&sr_data->exit_avg_ms)) * 2;
                mutex_unlock(&sr_data->avg_mutex);
 
-               mod_delayed_work(system_wq, &sr_data->entry_work,
+               mod_delayed_work(system_percpu_wq, &sr_data->entry_work,
                                 msecs_to_jiffies(delay));
        }
 }