This patch series completes the long-standing effort to eliminate usage of the legacy struct_mutex from i915 driver.
Historically, struct_mutex was used to serialize access to global driver state across the DRM subsystem. Over time, it has been gradually replaced by more fine-grained and localized locking mechanism. The i915 driver was the last remaining user of this lock, and even there, its usage had become redundant or outdated. Specifically, the mutex was only still used in two places: i915_irq.c and intel_guc_log.c. In both cases, the lock could either be removed or replaced with a more appropriate lock. This series performs the following steps: * Moves struct_mutex from drm_device to drm_i915_private, since i915 was its only remaining user. * Removes or replaces all remaining uses of struct_mutex in i915 driver. * Updates or removes comments referring to struct_mutex to prevent future confusion. * Deletes the lock entirely from the i915 driver once no longer in use. * Cleans up the corresponding TODO entry in Documentation/gpu/todo.rst and comments about struct_mutex in Documentation/gpu/i915.rst. Some additional notes: * In intel_guc_log.c, a missing destructor for a lock was identified. Since the series introduces a new lock in that area, this issue was addressed first, to the two locks do not lack memory in kernel. * Comments referencing struct_mutex were spread across various parts of i915 codebase. To improve clarity, they were cleaned up across three separate patches. The only remianig reference to struct_mutex is in a comment in i915_gem_execbuffer.c, inside the eb_relocate_vma() function. It was kept because the intended locking mechanism for that case is unclear. Luiz Otavio Mello (9): drm/i915: Move struct_mutex to drm_i915_private drm/i915: Remove struct_mutex in i915_irq.c drm/i915: Change mutex initialization in intel_guc_log drm/i915: Replace struct_mutex with guc_lock in intel_guc_log drm/i915: Change comments about legacy struct_mutex 1/3 drm/i915: Change comments about legacy struct_mutex 2/3 drm/i915: Change comments about legacy struct_mutex 3/3 drm/i915: Remove unused struct_mutex from drm_i915_private drm/i915: Remove todo and comments about struct_mutex Documentation/gpu/i915.rst | 7 ------ Documentation/gpu/todo.rst | 25 ------------------- drivers/gpu/drm/drm_drv.c | 2 -- drivers/gpu/drm/i915/display/intel_fbc.c | 6 +---- .../gpu/drm/i915/gem/i915_gem_execbuffer.c | 2 +- drivers/gpu/drm/i915/gem/i915_gem_object.c | 4 +-- drivers/gpu/drm/i915/gem/i915_gem_shrinker.c | 4 +-- drivers/gpu/drm/i915/gem/i915_gem_wait.c | 8 +++--- drivers/gpu/drm/i915/gt/intel_reset_types.h | 2 +- drivers/gpu/drm/i915/gt/uc/intel_guc_log.c | 12 ++++++--- drivers/gpu/drm/i915/gt/uc/intel_guc_log.h | 8 ++++++ drivers/gpu/drm/i915/i915_drv.h | 3 +-- drivers/gpu/drm/i915/i915_gem.c | 3 +-- drivers/gpu/drm/i915/i915_irq.c | 6 ----- include/drm/drm_device.h | 10 -------- 15 files changed, 30 insertions(+), 72 deletions(-) -- 2.50.1