]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
drm/xe: Use drmm_mutex_init for VRAM manager lock
authorTejas Upadhyay <tejas.upadhyay@intel.com>
Wed, 29 Apr 2026 09:31:39 +0000 (15:01 +0530)
committerTejas Upadhyay <tejas.upadhyay@intel.com>
Thu, 30 Apr 2026 10:12:21 +0000 (15:42 +0530)
commit438a9200d6abdae2be64a5ce085cee0244a7c231
tree351b543510024fa40dc55787d30eb6510731b142
parentd34b42ffb1dd15603fd20fb8c59891fd30e5988d
drm/xe: Use drmm_mutex_init for VRAM manager lock

Replace mutex_init()/mutex_destroy() with drmm_mutex_init() for the
VRAM manager lock. This leverages DRM managed infrastructure to
automatically destroy the mutex during device teardown, eliminating
manual mutex_destroy() calls in both the normal fini path and the
gpu_buddy_init() error path.

Assisted-by: Claude:claude-opus-4.6
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
Link: https://patch.msgid.link/20260429093138.3899280-2-tejas.upadhyay@intel.com
Signed-off-by: Tejas Upadhyay <tejas.upadhyay@intel.com>
drivers/gpu/drm/xe/xe_ttm_vram_mgr.c