]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
drm/xe: Take job list lock in xe_sched_add_pending_job
authorMatthew Brost <matthew.brost@intel.com>
Thu, 3 Oct 2024 00:16:56 +0000 (17:16 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 1 Nov 2024 01:02:31 +0000 (02:02 +0100)
commit6eb07e6d26fbfbb0301505fe8810a6ac6426a32a
tree470be83ebbabbde125c5b4ccd1ee594c604c19f5
parentf7ca00ae97617c34eabdc8b6d1d4ecb0bbc94f97
drm/xe: Take job list lock in xe_sched_add_pending_job

[ Upstream commit ed931fb40e353586f26c3327813d142f782f5f78 ]

A fragile micro optimization in xe_sched_add_pending_job relied on both
the GPU scheduler being stopped and fence signaling stopped to safely
add a job to the pending list without the job list lock in
xe_sched_add_pending_job. Remove this optimization and just take the job
list lock.

Fixes: 7ddb9403dd74 ("drm/xe: Sample ctx timestamp to determine if jobs have timed out")
Signed-off-by: Matthew Brost <matthew.brost@intel.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20241003001657.3517883-2-matthew.brost@intel.com
(cherry picked from commit 90521df5fc43980e4575bd8c5b1cb62afe1a9f5f)
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/xe/xe_gpu_scheduler.h