From mboxrd@z Thu Jan 1 00:00:00 1970 From: Claude Code Review Bot To: dri-devel-reviews@example.com Subject: Claude review: accel/amdxdna: Add expandable device heap support Date: Sat, 16 May 2026 08:50:25 +1000 Message-ID: In-Reply-To: <20260515161922.744647-1-lizhi.hou@amd.com> References: <20260515161922.744647-1-lizhi.hou@amd.com> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit MIME-Version: 1.0 Overall Series Review Subject: accel/amdxdna: Add expandable device heap support Author: Lizhi Hou Patches: 2 Reviewed: 2026-05-16T08:50:25.638886 --- This single patch converts the amdxdna driver from a single, fixed-size device heap per client to an expandable heap backed by an xarray of heap chunks. The design is reasonable: start with a small heap, grow on demand via userspace IOCTL, and register new chunks with firmware via `MSG_OP_ADD_HOST_BUFFER`. However, there are several locking concerns, a potential off-by-one in the xarray iteration range, missing pin/unpin symmetry for the sync BO path, and some questionable error handling changes that deserve attention. The patch is a V2 fixing a memory leak and flush-BO scoping, but introduces new issues in those fixes and in the core heap expansion logic. It needs another revision. --- --- Generated by Claude Code Patch Reviewer