]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
drm/xe: Use usleep_range for accurate long-running workload timeslicing
authorMatthew Brost <matthew.brost@intel.com>
Fri, 12 Dec 2025 18:28:42 +0000 (10:28 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 8 Jan 2026 09:14:55 +0000 (10:14 +0100)
commitdd3278ebfc04e94da425cf249c2e08ec46339dab
tree75f0b38660c34d2dd7496f0d7e7f83180459abdc
parentd420cea5199a00b7adfa9b52ce819914f742172c
drm/xe: Use usleep_range for accurate long-running workload timeslicing

commit 80f9c601d9c4d26f00356c0a9c461650e7089273 upstream.

msleep is not very accurate in terms of how long it actually sleeps,
whereas usleep_range is precise. Replace the timeslice sleep for
long-running workloads with the more accurate usleep_range to avoid
jitter if the sleep period is less than 20ms.

Fixes: dd08ebf6c352 ("drm/xe: Introduce a new DRM driver for Intel GPUs")
Cc: stable@vger.kernel.org
Signed-off-by: Matthew Brost <matthew.brost@intel.com>
Reviewed-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Link: https://patch.msgid.link/20251212182847.1683222-3-matthew.brost@intel.com
(cherry picked from commit ca415c4d4c17ad676a2c8981e1fcc432221dce79)
Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/xe/xe_guc_submit.c