public inbox for drm-ai-reviews@public-inbox.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH] drm/msm/a6xx: Add missing aperture_lock init
@ 2026-03-23 16:16 Rob Clark
  2026-03-23 17:42 ` Dmitry Baryshkov
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Rob Clark @ 2026-03-23 16:16 UTC (permalink / raw)
  To: dri-devel
  Cc: linux-arm-msm, freedreno, Rob Clark, Sean Paul, Konrad Dybcio,
	Akhil P Oommen, Dmitry Baryshkov, Abhinav Kumar, Jessica Zhang,
	Marijn Suijten, David Airlie, Simona Vetter, open list

Looks like this was somehow missed when introducing gen8 support.

Fixes: 288a93200892 ("drm/msm/adreno: Introduce A8x GPU Support")
Signed-off-by: Rob Clark <robin.clark@oss.qualcomm.com>
---
 drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gpu.c b/drivers/gpu/drm/msm/adreno/a6xx_gpu.c
index 2129d230a92b..a00215b7bd1e 100644
--- a/drivers/gpu/drm/msm/adreno/a6xx_gpu.c
+++ b/drivers/gpu/drm/msm/adreno/a6xx_gpu.c
@@ -2656,6 +2656,7 @@ static struct msm_gpu *a6xx_gpu_init(struct drm_device *dev)
 	gpu = &adreno_gpu->base;
 
 	mutex_init(&a6xx_gpu->gmu.lock);
+	spin_lock_init(&a6xx_gpu->aperture_lock);
 
 	adreno_gpu->registers = NULL;
 
-- 
2.53.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] drm/msm/a6xx: Add missing aperture_lock init
  2026-03-23 16:16 [PATCH] drm/msm/a6xx: Add missing aperture_lock init Rob Clark
@ 2026-03-23 17:42 ` Dmitry Baryshkov
  2026-03-23 17:55 ` Akhil P Oommen
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Dmitry Baryshkov @ 2026-03-23 17:42 UTC (permalink / raw)
  To: Rob Clark
  Cc: dri-devel, linux-arm-msm, freedreno, Sean Paul, Konrad Dybcio,
	Akhil P Oommen, Dmitry Baryshkov, Abhinav Kumar, Jessica Zhang,
	Marijn Suijten, David Airlie, Simona Vetter, open list

On Mon, Mar 23, 2026 at 09:16:02AM -0700, Rob Clark wrote:
> Looks like this was somehow missed when introducing gen8 support.
> 
> Fixes: 288a93200892 ("drm/msm/adreno: Introduce A8x GPU Support")
> Signed-off-by: Rob Clark <robin.clark@oss.qualcomm.com>
> ---
>  drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 1 +
>  1 file changed, 1 insertion(+)
> 

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>


-- 
With best wishes
Dmitry

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] drm/msm/a6xx: Add missing aperture_lock init
  2026-03-23 16:16 [PATCH] drm/msm/a6xx: Add missing aperture_lock init Rob Clark
  2026-03-23 17:42 ` Dmitry Baryshkov
@ 2026-03-23 17:55 ` Akhil P Oommen
  2026-03-24  9:23 ` Konrad Dybcio
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Akhil P Oommen @ 2026-03-23 17:55 UTC (permalink / raw)
  To: Rob Clark, dri-devel
  Cc: linux-arm-msm, freedreno, Sean Paul, Konrad Dybcio,
	Dmitry Baryshkov, Abhinav Kumar, Jessica Zhang, Marijn Suijten,
	David Airlie, Simona Vetter, open list

On 3/23/2026 9:46 PM, Rob Clark wrote:
> Looks like this was somehow missed when introducing gen8 support.
> 
> Fixes: 288a93200892 ("drm/msm/adreno: Introduce A8x GPU Support")
> Signed-off-by: Rob Clark <robin.clark@oss.qualcomm.com>

Reviewed-by: Akhil P Oommen <akhilpo@oss.qualcomm.com>

-Akhil.

> ---
>  drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gpu.c b/drivers/gpu/drm/msm/adreno/a6xx_gpu.c
> index 2129d230a92b..a00215b7bd1e 100644
> --- a/drivers/gpu/drm/msm/adreno/a6xx_gpu.c
> +++ b/drivers/gpu/drm/msm/adreno/a6xx_gpu.c
> @@ -2656,6 +2656,7 @@ static struct msm_gpu *a6xx_gpu_init(struct drm_device *dev)
>  	gpu = &adreno_gpu->base;
>  
>  	mutex_init(&a6xx_gpu->gmu.lock);
> +	spin_lock_init(&a6xx_gpu->aperture_lock);
>  
>  	adreno_gpu->registers = NULL;
>  


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] drm/msm/a6xx: Add missing aperture_lock init
  2026-03-23 16:16 [PATCH] drm/msm/a6xx: Add missing aperture_lock init Rob Clark
  2026-03-23 17:42 ` Dmitry Baryshkov
  2026-03-23 17:55 ` Akhil P Oommen
@ 2026-03-24  9:23 ` Konrad Dybcio
  2026-03-24 21:43 ` Claude review: " Claude Code Review Bot
  2026-03-24 21:43 ` Claude Code Review Bot
  4 siblings, 0 replies; 6+ messages in thread
From: Konrad Dybcio @ 2026-03-24  9:23 UTC (permalink / raw)
  To: Rob Clark, dri-devel
  Cc: linux-arm-msm, freedreno, Sean Paul, Konrad Dybcio,
	Akhil P Oommen, Dmitry Baryshkov, Abhinav Kumar, Jessica Zhang,
	Marijn Suijten, David Airlie, Simona Vetter, open list

On 3/23/26 5:16 PM, Rob Clark wrote:
> Looks like this was somehow missed when introducing gen8 support.
> 
> Fixes: 288a93200892 ("drm/msm/adreno: Introduce A8x GPU Support")
> Signed-off-by: Rob Clark <robin.clark@oss.qualcomm.com>
> ---

Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>

Konrad

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Claude review: drm/msm/a6xx: Add missing aperture_lock init
  2026-03-23 16:16 [PATCH] drm/msm/a6xx: Add missing aperture_lock init Rob Clark
                   ` (3 preceding siblings ...)
  2026-03-24 21:43 ` Claude review: " Claude Code Review Bot
@ 2026-03-24 21:43 ` Claude Code Review Bot
  4 siblings, 0 replies; 6+ messages in thread
From: Claude Code Review Bot @ 2026-03-24 21:43 UTC (permalink / raw)
  To: dri-devel-reviews

Overall Series Review

Subject: drm/msm/a6xx: Add missing aperture_lock init
Author: Rob Clark <robin.clark@oss.qualcomm.com>
Patches: 4
Reviewed: 2026-03-25T07:43:57.609110

---

This is a single, straightforward one-liner bugfix that adds a missing `spin_lock_init()` for the `aperture_lock` spinlock in `struct a6xx_gpu`. The lock is declared in `a6xx_gpu.h:112` and actively used in `a8xx_gpu.c` (via `spin_lock_irqsave`/`spin_unlock_irqrestore`), but was never initialized. This is clearly a bug introduced when A8xx GPU support was added, and the fix is correct.

**Verdict: Patch looks good.** No issues found.

---
Generated by Claude Code Patch Reviewer

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Claude review: drm/msm/a6xx: Add missing aperture_lock init
  2026-03-23 16:16 [PATCH] drm/msm/a6xx: Add missing aperture_lock init Rob Clark
                   ` (2 preceding siblings ...)
  2026-03-24  9:23 ` Konrad Dybcio
@ 2026-03-24 21:43 ` Claude Code Review Bot
  2026-03-24 21:43 ` Claude Code Review Bot
  4 siblings, 0 replies; 6+ messages in thread
From: Claude Code Review Bot @ 2026-03-24 21:43 UTC (permalink / raw)
  To: dri-devel-reviews

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-03-24 21:43 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-23 16:16 [PATCH] drm/msm/a6xx: Add missing aperture_lock init Rob Clark
2026-03-23 17:42 ` Dmitry Baryshkov
2026-03-23 17:55 ` Akhil P Oommen
2026-03-24  9:23 ` Konrad Dybcio
2026-03-24 21:43 ` Claude review: " Claude Code Review Bot
2026-03-24 21:43 ` Claude Code Review Bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox