public inbox for drm-ai-reviews@public-inbox.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH] drm/msm: Fix GMEM_BASE for A650
@ 2026-03-14  4:14 Alexander Koskovich
  2026-03-16  2:09 ` Claude review: " Claude Code Review Bot
  2026-03-16  2:09 ` Claude Code Review Bot
  0 siblings, 2 replies; 3+ messages in thread
From: Alexander Koskovich @ 2026-03-14  4:14 UTC (permalink / raw)
  To: Rob Clark, Sean Paul, Konrad Dybcio, Akhil P Oommen,
	Dmitry Baryshkov, Abhinav Kumar, Jessica Zhang, Marijn Suijten,
	David Airlie, Simona Vetter
  Cc: linux-arm-msm, dri-devel, freedreno, linux-kernel,
	Alexander Koskovich

Commit dc220915ddb2 ("drm/msm: Fix GMEM_BASE for gen8") changed the
GMEM_BASE check from adreno_is_a650_family() & adreno_is_a740_family()
to family >= ADRENO_6XX_GEN4.

This inadvertently excluded A650 (ADRENO_6XX_GEN3), causing it to report
an incorrect GMEM_BASE which results in severe rendering corruption.

Update check to also include ADRENO_6XX_GEN3 to fix A650.

Fixes: dc220915ddb2 ("drm/msm: Fix GMEM_BASE for gen8")
Signed-off-by: Alexander Koskovich <akoskovich@pm.me>
---
 drivers/gpu/drm/msm/adreno/adreno_gpu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/msm/adreno/adreno_gpu.c b/drivers/gpu/drm/msm/adreno/adreno_gpu.c
index d5fe6f6f0dec..0ac3fba5c277 100644
--- a/drivers/gpu/drm/msm/adreno/adreno_gpu.c
+++ b/drivers/gpu/drm/msm/adreno/adreno_gpu.c
@@ -376,7 +376,7 @@ int adreno_get_param(struct msm_gpu *gpu, struct msm_context *ctx,
 		*value = adreno_gpu->info->gmem;
 		return 0;
 	case MSM_PARAM_GMEM_BASE:
-		if (adreno_gpu->info->family >= ADRENO_6XX_GEN4)
+		if (adreno_gpu->info->family >= ADRENO_6XX_GEN3)
 			*value = 0;
 		else
 			*value = 0x100000;

---
base-commit: 1f318b96cc84d7c2ab792fcc0bfd42a7ca890681
change-id: 20260314-fix-gmem-base-a650-cfd9bfcea425

Best regards,
-- 
Alexander Koskovich <akoskovich@pm.me>



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

* Claude review: drm/msm: Fix GMEM_BASE for A650
  2026-03-14  4:14 [PATCH] drm/msm: Fix GMEM_BASE for A650 Alexander Koskovich
@ 2026-03-16  2:09 ` Claude Code Review Bot
  2026-03-16  2:09 ` Claude Code Review Bot
  1 sibling, 0 replies; 3+ messages in thread
From: Claude Code Review Bot @ 2026-03-16  2:09 UTC (permalink / raw)
  To: dri-devel-reviews

Overall Series Review

Subject: drm/msm: Fix GMEM_BASE for A650
Author: Alexander Koskovich <akoskovich@pm.me>
Patches: 1
Reviewed: 2026-03-16T12:09:19.699308

---

This is a single-patch fix for a regression introduced by commit dc220915ddb2. The analysis is straightforward and correct. The original code used `adreno_is_a650_family()` which covers both `ADRENO_6XX_GEN3` (a650) and `ADRENO_6XX_GEN4` (a660), plus `adreno_is_a740_family()`. When that was refactored to a `>=` comparison, it was changed to `>= ADRENO_6XX_GEN4`, which excluded GEN3 (a650). The fix correctly changes the threshold to `>= ADRENO_6XX_GEN3`.

The patch is correct and should be applied.

---
Generated by Claude Code Patch Reviewer

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

* Claude review: drm/msm: Fix GMEM_BASE for A650
  2026-03-14  4:14 [PATCH] drm/msm: Fix GMEM_BASE for A650 Alexander Koskovich
  2026-03-16  2:09 ` Claude review: " Claude Code Review Bot
@ 2026-03-16  2:09 ` Claude Code Review Bot
  1 sibling, 0 replies; 3+ messages in thread
From: Claude Code Review Bot @ 2026-03-16  2:09 UTC (permalink / raw)
  To: dri-devel-reviews

Patch Review

**Correctness: Good.** The enum in `adreno_gpu.h:47-50` shows:
```
ADRENO_6XX_GEN1,  /* a630 family */
ADRENO_6XX_GEN2,  /* a640 family */
ADRENO_6XX_GEN3,  /* a650 family */
ADRENO_6XX_GEN4,  /* a660 family */
```

The `adreno_is_a650_family()` helper at `adreno_gpu.h:540-541` explicitly includes both GEN3 and GEN4:
```c
return gpu->info->family == ADRENO_6XX_GEN3 ||
       gpu->info->family == ADRENO_6XX_GEN4;
```

So the original intent was to return `GMEM_BASE = 0` for a650 family and above. The regressing commit changed the `>=` threshold to `ADRENO_6XX_GEN4`, excluding GEN3 (a650). Changing it to `>= ADRENO_6XX_GEN3` restores the correct behavior and is also a cleaner expression than the original pair of `adreno_is_a650_family() || adreno_is_a740_family()` checks, since all families from GEN3 onward should use GMEM_BASE of 0.

**Commit message:** Clear and well-written. Correctly identifies the regressing commit, the root cause, and the symptom (rendering corruption). Has the appropriate `Fixes:` tag.

**No issues found.** This is a clean, minimal one-line regression fix.

Reviewed-by worthy. No changes requested.

---
Generated by Claude Code Patch Reviewer

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

end of thread, other threads:[~2026-03-16  2:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-14  4:14 [PATCH] drm/msm: Fix GMEM_BASE for A650 Alexander Koskovich
2026-03-16  2:09 ` Claude review: " Claude Code Review Bot
2026-03-16  2:09 ` 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