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 HFI support for CLX feature Date: Sat, 16 May 2026 08:47:13 +1000 Message-ID: In-Reply-To: <20260516-a8xx-clx-support-v1-1-62508bf651ac@oss.qualcomm.com> References: <20260516-a8xx-clx-support-v1-0-62508bf651ac@oss.qualcomm.com> <20260516-a8xx-clx-support-v1-1-62508bf651ac@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 **The HFI plumbing is correct.** The `a6xx_hfi_enable_clx()` / `a6xx_hfi_en= able_iff_pclx()` pair follows the same pattern as existing `a6xx_hfi_enable= _acd()`. The size calculation for the dynamically-allocated `a6xx_hfi_table= ` is correct, and `a6xx_hfi_send_msg()` fills in the header word. **Issue: `a6xx_limits_tbl.tbl` should be `const`-qualified.** In `a6xx_gpu.h`: ```c struct a6xx_limits_tbl { /** @tbl: List of limits table **/ struct a6xx_hfi_limits_tbl *tbl; ... }; ``` The `tbl` pointer should be `const struct a6xx_hfi_limits_tbl *tbl`, since: 1. The `DECLARE_ADRENO_LIMITS_TABLE` macro creates a `static const struct a= 6xx_limits_tbl`, so the compiler needs the member to accept a pointer to co= nst data. 2. The data is only ever read (`memcpy` source in `a6xx_hfi_enable_iff_pclx= `), never written. Without `const`, the assignment from the `static const` table data in patch= es 2/3 will produce a warning (discarding `const` qualifier) =E2=80=94 or w= orse, silently strip the constness. This should be: ```c const struct a6xx_hfi_limits_tbl *tbl; ``` **Minor: memcpy from const source is fine.** The `memcpy(&cmd, info->clx_tb= l, sizeof(cmd))` in `a6xx_hfi_enable_clx()` correctly copies the const cata= log data into a stack-local `cmd` before `a6xx_hfi_send_msg` mutates the he= ader =E2=80=94 good pattern. **Ordering is correct.** CLX is enabled after ACD and before IFPC in `a6xx_= hfi_start()`, which makes sense =E2=80=94 current limiting should be establ= ished before entering IFPC. --- Generated by Claude Code Patch Reviewer