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: Allow IFPC with perfcntr stream Date: Wed, 27 May 2026 14:42:33 +1000 Message-ID: In-Reply-To: <20260526145137.160554-17-robin.clark@oss.qualcomm.com> References: <20260526145137.160554-1-robin.clark@oss.qualcomm.com> <20260526145137.160554-17-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 Final patch: instead of disabling IFPC entirely during global counter collection, only disable it momentarily during actual sampling (via `sysprof_setup(gpu, true/false)` around register reads in `sample_worker`). The `msm_gpu_sysprof_no_ifpc()` logic changes to only disable IFPC for legacy SYSPROF users, not for the new perfcntr stream. This is the payoff for all the IFPC restoration work in patches 14-15. --- **Summary of issues found**: 1. **Bug (Patch 13)**: The `allocated_counters` commit loop subtracts 1 from `nr_counters[i]` for ALL groups, including those not specified by the user (where `nr_counters[i]` is 0). This causes unsigned underflow, setting `allocated_counters` to a very large value for unspecified groups. This would likely cause `get_available_counters()` to return negative/wrong values for subsequent calls. 2. **Nit (Patch 13)**: Include style uses `"linux/..."` instead of the driver's prevailing `` style for kernel headers. --- Generated by Claude Code Patch Reviewer