mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-28 11:18:45 +07:00
5b3ec8134f
Panfrost uses multiple schedulers (one for each slot, so 2 in reality),
and on a timeout has to stop all the schedulers to safely perform a
reset. However more than one scheduler can trigger a timeout at the same
time. This race condition results in jobs being freed while they are
still in use.
When stopping other slots use cancel_delayed_work_sync() to ensure that
any timeout started for that slot has completed. Also use
mutex_trylock() to obtain reset_lock. This means that only one thread
attempts the reset, the other threads will simply complete without doing
anything (the first thread will wait for this in the call to
cancel_delayed_work_sync()).
While we're here and since the function is already dependent on
sched_job not being NULL, let's remove the unnecessary checks.
Fixes:
|
||
---|---|---|
.. | ||
Kconfig | ||
Makefile | ||
panfrost_devfreq.c | ||
panfrost_devfreq.h | ||
panfrost_device.c | ||
panfrost_device.h | ||
panfrost_drv.c | ||
panfrost_features.h | ||
panfrost_gem_shrinker.c | ||
panfrost_gem.c | ||
panfrost_gem.h | ||
panfrost_gpu.c | ||
panfrost_gpu.h | ||
panfrost_issues.h | ||
panfrost_job.c | ||
panfrost_job.h | ||
panfrost_mmu.c | ||
panfrost_mmu.h | ||
panfrost_perfcnt.c | ||
panfrost_perfcnt.h | ||
panfrost_regs.h | ||
TODO |