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: Add basic perfcntr infrastructure Date: Wed, 27 May 2026 14:42:31 +1000 Message-ID: In-Reply-To: <20260526145137.160554-11-robin.clark@oss.qualcomm.com> References: <20260526145137.160554-1-robin.clark@oss.qualcomm.com> <20260526145137.160554-11-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 Creates `msm_perfcntr.c` with init/cleanup and resume/suspend hooks. Key structures: - `msm_perfcntr_group_state` - per-group tracking of allocated counters and countables - `msm_perfcntr_state` - global state with a flex array of group states The init function allocates the state with `countables` arrays sized per-group. The `msm_perfcntr_group_idx()` and `msm_perfcntr_counter_base()` helpers handle the indirection from stream group index to GPU group index, accounting for previously-reserved counters. The WARN_ON bounds checks look correct. One nit: `adreno_recover()` calls `msm_perfcntr_resume()` - this is correct since it needs to re-program SEL regs after a GPU reset. --- Generated by Claude Code Patch Reviewer