]> www.infradead.org Git - users/jedix/linux-maple.git/commit
drm/sched: Re-group and rename the entity run-queue lock
authorTvrtko Ursulin <tvrtko.ursulin@igalia.com>
Wed, 16 Oct 2024 12:20:12 +0000 (13:20 +0100)
committerPhilipp Stanner <pstanner@redhat.com>
Thu, 17 Oct 2024 10:19:16 +0000 (12:19 +0200)
commitf93126f5d55920d1447ef00a3fbe6706f40f53de
tree689e51826caffa59e051d4d530ee0d42d57d2ad8
parenta6f46283e952fe50dea5f932a1e4f0b6b2370968
drm/sched: Re-group and rename the entity run-queue lock

When writing to a drm_sched_entity's run-queue, writers are protected
through the lock drm_sched_entity.rq_lock. This naming, however,
frequently collides with the separate internal lock of struct
drm_sched_rq, resulting in uses like this:

spin_lock(&entity->rq_lock);
spin_lock(&entity->rq->lock);

Rename drm_sched_entity.rq_lock to improve readability. While at it,
re-order that struct's members to make it more obvious what the lock
protects.

v2:
 * Rename some rq_lock straddlers in kerneldoc, improve commit text. (Philipp)

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com>
Suggested-by: Christian König <christian.koenig@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: Luben Tuikov <ltuikov89@gmail.com>
Cc: Matthew Brost <matthew.brost@intel.com>
Cc: Philipp Stanner <pstanner@redhat.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
[pstanner: Fix typo in docstring]
Signed-off-by: Philipp Stanner <pstanner@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20241016122013.7857-5-tursulin@igalia.com
drivers/gpu/drm/scheduler/sched_entity.c
drivers/gpu/drm/scheduler/sched_main.c
include/drm/gpu_scheduler.h