From mboxrd@z Thu Jan 1 00:00:00 1970 From: Claude Code Review Bot To: dri-devel-reviews@example.com Subject: Claude review: drm/msm/a6xx: Add missing aperture_lock init Date: Wed, 25 Mar 2026 07:43:57 +1000 Message-ID: In-Reply-To: <20260323161603.1165108-1-robin.clark@oss.qualcomm.com> References: <20260323161603.1165108-1-robin.clark@oss.qualcomm.com> <20260323161603.1165108-1-robin.clark@oss.qualcomm.com> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit MIME-Version: 1.0 Patch Review **Correctness:** The fix is correct. The `aperture_lock` spinlock field in `struct a6xx_gpu` (declared at `a6xx_gpu.h:112`) is used in `a8xx_gpu.c` at lines 40, 50, 77, and 80 via `spin_lock_irqsave()`/`spin_unlock_irqrestore()`, but was never initialized. Using an uninitialized spinlock is undefined behavior and can lead to lockups or data corruption, especially with `CONFIG_DEBUG_SPINLOCK` enabled. **Placement:** The init is correctly placed in `a6xx_gpu_init()` right next to the existing `mutex_init(&a6xx_gpu->gmu.lock)` at line 2658, which is the natural location for lock initialization in this function. ``` mutex_init(&a6xx_gpu->gmu.lock); + spin_lock_init(&a6xx_gpu->aperture_lock); ``` **Fixes tag:** The `Fixes: 288a93200892 ("drm/msm/adreno: Introduce A8x GPU Support")` tag correctly identifies the commit that introduced the field and its usage without the corresponding initialization. **No issues found.** This is a clean, minimal fix. Reviewed-by worthy. --- Generated by Claude Code Patch Reviewer