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/mediatek: Set dedicated DMA device and drop custom GEM callbacks Date: Thu, 12 Mar 2026 07:08:42 +1000 Message-ID: In-Reply-To: <20260311094929.3393338-4-wenst@chromium.org> References: <20260311094929.3393338-1-wenst@chromium.org> <20260311094929.3393338-4-wenst@chromium.org> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit MIME-Version: 1.0 Patch Review This is the big payoff patch, deleting 231 lines of custom GEM code (`mtk_gem.c` and `mtk_gem.h`). The key change is: ```c - for (i = 0; i < private->data->mmsys_dev_num; i++) - private->all_drm_private[i]->dma_dev = dma_dev; + drm_dev_set_dma_dev(drm, dma_dev); ``` The old code stored the DMA device in every `mtk_drm_private` instance. The new code calls the core API once on the DRM device. The driver ops are simplified to use the standard `DRM_GEM_DMA_DRIVER_OPS` macro, and the custom `mtk_gem_prime_import` / `mtk_gem_prime_import_sg_table` / `mtk_gem_dumb_create` are all dropped. The commit message honestly documents the behavioral difference: the `VM_DONTDUMP` and `VM_IO` flags that were set by the custom `mtk_gem_object_mmap` will no longer be set by the standard `drm_gem_dma_mmap` helper. The reasoning that `VM_IO` doesn't make sense for `dma_alloc_attrs()` buffers is correct. No issues. This is a clean simplification. --- Generated by Claude Code Patch Reviewer