]> Gentwo Git Trees - linux/.git/commit
drm/i915: Replace struct_mutex in intel_guc_log
authorLuiz Otavio Mello <luiz.mello@estudante.ufscar.br>
Mon, 8 Sep 2025 13:15:12 +0000 (09:15 -0400)
committerRodrigo Vivi <rodrigo.vivi@intel.com>
Tue, 9 Sep 2025 14:36:10 +0000 (10:36 -0400)
commit1bd3db82e9f39c45ce035ac07e7acd9a4cd2e1d3
tree57716f977e755391f93c8a9dc502f0a39227657d
parent1bafff0252e3e46286f558ba67d63bc16e8685cd
drm/i915: Replace struct_mutex in intel_guc_log

Remove the use of struct_mutex from intel_guc_log.c and replace it with
a dedicated lock, guc_lock, defined within the intel_guc_log struct.
    
The struct_mutex was previously used to protect concurrent access and
modification of intel_guc_log->level in intel_guc_log_set_level().
However, it was suggested that the lock should reside within the
intel_guc_log struct itself.
    
Initialize the new guc_lock in intel_guc_log_init_early(), alongside the
existing relay.lock. The lock is initialized using drmm_mutex_init(),
which also ensures it is properly destroyed when the driver is unloaded.

Signed-off-by: Luiz Otavio Mello <luiz.mello@estudante.ufscar.br>
Suggested-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://lore.kernel.org/r/20250908131518.36625-5-luiz.mello@estudante.ufscar.br
Acked-by: Tvrtko Ursulin <tursulin@ursulin.net>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
drivers/gpu/drm/i915/gt/uc/intel_guc_log.c
drivers/gpu/drm/i915/gt/uc/intel_guc_log.h