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/neutron: Add GEM buffer object support Date: Fri, 27 Feb 2026 12:10:08 +1000 Message-ID: In-Reply-To: <20260226-neutron-v1-5-46eccb3bb50a@nxp.com> References: <20260226-neutron-v1-0-46eccb3bb50a@nxp.com> <20260226-neutron-v1-5-46eccb3bb50a@nxp.com> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit MIME-Version: 1.0 Patch Review **UAPI: `DRM_IOCTL_NEUTRON_SYNC_BO` should be `DRM_IOW`, not `DRM_IOWR`:** ```c #define DRM_IOCTL_NEUTRON_SYNC_BO \ DRM_IOWR(DRM_COMMAND_BASE + DRM_NEUTRON_SYNC_BO, \ struct drm_neutron_sync_bo) ``` The `neutron_ioctl_sync_bo` function never writes anything back to the userspace struct. Using `DRM_IOWR` causes an unnecessary copy-out. This is a UAPI definition that's hard to change later, so best to fix it now. **The sync direction always uses `DMA_BIDIRECTIONAL`:** ```c case DRM_NEUTRON_SYNC_TO_DEVICE: dma_sync_single_for_device(drm->dev, start_addr, args->size, DMA_BIDIRECTIONAL); break; case DRM_NEUTRON_SYNC_FROM_DEVICE: dma_sync_single_for_cpu(drm->dev, start_addr, args->size, DMA_BIDIRECTIONAL); ``` Since the buffer is allocated with `DMA_BIDIRECTIONAL`, using `DMA_BIDIRECTIONAL` here is correct (the direction must match the allocation). This is fine. --- Generated by Claude Code Patch Reviewer