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: Add support for Debug HFI Q Date: Wed, 25 Mar 2026 07:32:08 +1000 Message-ID: In-Reply-To: <20260324-a8xx-gpu-batch2-v1-4-fc95b8d9c017@oss.qualcomm.com> References: <20260324-a8xx-gpu-batch2-v1-0-fc95b8d9c017@oss.qualcomm.com> <20260324-a8xx-gpu-batch2-v1-4-fc95b8d9c017@oss.qualcomm.com> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Patch Review Adds a third HFI queue (Debug) for F2H messages from GMU firmware, useful f= or coredump debugging. **Bug:** The WARN_ON check is off-by-one: ```c WARN_ON(idx >=3D HFI_MAX_QUEUES); ``` At this point `idx` is 2 and `HFI_MAX_QUEUES` is 3, so `2 >=3D 3` is false = =E2=80=94 the WARN never fires. This check should be `WARN_ON(idx + 1 > HFI= _MAX_QUEUES)` or should appear *after* the idx++ to catch overflow, or bett= er yet, just use a `static_assert` or BUILD_BUG_ON at compile time since th= e array sizes are all compile-time constants. As written, the WARN_ON doesn= 't protect against anything. **Note:** The HFI memory BO size should be verified =E2=80=94 previously 2 = queues at 4K each (8K within the HFI BO), now 3 queues needing 12K of paylo= ad space plus the table header. The BO allocation happens elsewhere and sho= uld be checked to be large enough. --- Generated by Claude Code Patch Reviewer