mirror of
https://github.com/torvalds/linux.git
synced 2026-10-28 09:35:02 +01:00
drm/v3d: Remove the now-redundant reset lock
`reset_lock` was taken by v3d_gpu_reset_for_timeout() to keep the timeout handlers of different queues from parking the schedulers and resetting the GPU at once. Now that all of the queues share an ordered workqueue for their timeout work, those handlers can no longer run concurrently and the lock guards nothing. Reviewed-by: Iago Toral Quiroga <itoral@igalia.com> Signed-off-by: Maíra Canal <mcanal@igalia.com> Link: https://patch.msgid.link/20260728-v3d-order-global-reset-v1-2-e47be838158d@igalia.com
This commit is contained in:
parent
65221358b6
commit
bfae5a8ac5
|
|
@ -200,12 +200,6 @@ struct v3d_dev {
|
|||
/* Protects bo_stats */
|
||||
struct mutex bo_lock;
|
||||
|
||||
/* Lock taken when resetting the GPU, to keep multiple
|
||||
* processes from trying to park the scheduler threads and
|
||||
* reset at once.
|
||||
*/
|
||||
struct mutex reset_lock;
|
||||
|
||||
/* Ordered workqueue shared by every queue's scheduler timeout work.
|
||||
* V3D reset is global to all queues, so the timeout handlers must not
|
||||
* run concurrently.
|
||||
|
|
|
|||
|
|
@ -322,9 +322,6 @@ v3d_gem_init(struct drm_device *dev)
|
|||
spin_lock_init(&v3d->mm_lock);
|
||||
spin_lock_init(&v3d->perfmon_state.lock);
|
||||
ret = drmm_mutex_init(dev, &v3d->bo_lock);
|
||||
if (ret)
|
||||
goto err_stats;
|
||||
ret = drmm_mutex_init(dev, &v3d->reset_lock);
|
||||
if (ret)
|
||||
goto err_stats;
|
||||
ret = drmm_mutex_init(dev, &v3d->sched_lock);
|
||||
|
|
|
|||
|
|
@ -689,8 +689,6 @@ v3d_gpu_reset_for_timeout(struct v3d_dev *v3d, struct drm_sched_job *sched_job,
|
|||
struct v3d_job *job = to_v3d_job(sched_job);
|
||||
enum v3d_queue i;
|
||||
|
||||
mutex_lock(&v3d->reset_lock);
|
||||
|
||||
/* block scheduler */
|
||||
for (i = 0; i < V3D_MAX_QUEUES; i++)
|
||||
drm_sched_stop(&v3d->queue[i].sched, sched_job);
|
||||
|
|
@ -713,8 +711,6 @@ v3d_gpu_reset_for_timeout(struct v3d_dev *v3d, struct drm_sched_job *sched_job,
|
|||
for (i = 0; i < V3D_MAX_QUEUES; i++)
|
||||
drm_sched_start(&v3d->queue[i].sched, 0);
|
||||
|
||||
mutex_unlock(&v3d->reset_lock);
|
||||
|
||||
return DRM_GPU_SCHED_STAT_RESET;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user