From: Claude Code Review Bot <claude-review@example.com>
To: dri-devel-reviews@example.com
Subject: Claude review: drm/msm/a6xx: Restore sysprof_active
Date: Sun, 12 Apr 2026 08:58:12 +1000 [thread overview]
Message-ID: <review-patch1-20260411150312.257937-1-robin.clark@oss.qualcomm.com> (raw)
In-Reply-To: <20260411150312.257937-1-robin.clark@oss.qualcomm.com>
Patch Review
**Correctness: Good.** The `.sysprof_setup` field belongs to `struct msm_gpu_funcs` (defined at `msm_gpu.h:95`), and the assignment is correctly placed inside the `.base = { }` initializer block of both `a6xx_gpu_funcs` and `a7xx_gpu_funcs`. The function `a6xx_gmu_sysprof_setup()` exists in `a6xx_gmu.c:2037` and is declared in `a6xx_gpu.h:274`.
The call site in `msm_submitqueue.c:44-45`:
```c
if (gpu->funcs->sysprof_setup)
gpu->funcs->sysprof_setup(gpu);
```
null-checks the pointer before calling, so the omission didn't cause a crash — it silently failed to block IFPC, causing perfcounter corruption during profiling.
**Placement within the initializer:** The new line is placed after `.progress` and before the closing `},` of the `.base` block, which is consistent with the existing ordering. Fine.
**Scope question:** The patch correctly skips `a6xx_gmuwrapper_funcs`, since that variant doesn't use the GMU and `a6xx_gmu_sysprof_setup()` accesses `a6xx_gpu->gmu` internals.
However, `a8xx_gpu_funcs` (at `a6xx_gpu.c:2820`) also uses the GMU (`pm_suspend = a6xx_gmu_pm_suspend`, `pm_resume = a6xx_gmu_pm_resume`) and has the same inline OOB handling in `a8xx_hw_init` (`a8xx_gpu.c:852-856`) that a6xx has in its hw_init (`a6xx_gpu.c:1610-1614`). The hw_init code only covers the resume/recovery path — it does not cover the dynamic case where userspace starts profiling while the GPU is already running, which is what `a6xx_gmu_sysprof_setup()` handles. Should `a8xx_gpu_funcs` also get `.sysprof_setup = a6xx_gmu_sysprof_setup`? If a8xx was added after the catalogue refactor, this would be a pre-existing gap rather than a regression, but it seems like the same bug.
**Fixes tag:** Correctly references the commit that caused the regression.
**Minor nit on subject line:** The subject says "Restore sysprof_active" but what's actually being restored is the `.sysprof_setup` vfunc assignment. `sysprof_active` is the refcount that the setup function reads — not the thing being restored. Very minor.
---
Generated by Claude Code Patch Reviewer
prev parent reply other threads:[~2026-04-11 22:58 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-11 15:03 [PATCH] drm/msm/a6xx: Restore sysprof_active Rob Clark
2026-04-11 21:18 ` Akhil P Oommen
2026-04-11 22:58 ` Claude review: " Claude Code Review Bot
2026-04-11 22:58 ` Claude Code Review Bot [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=review-patch1-20260411150312.257937-1-robin.clark@oss.qualcomm.com \
--to=claude-review@example.com \
--cc=dri-devel-reviews@example.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox