Chen-Yu Tsai <[email protected]> 於 2026年3月11日週三 上午9:50寫道: > > In commit 9b54a32c7c6a ("drm/mediatek: mtk_gem: Partial refactor and > use drm_gem_dma_object") the MediaTek DRM driver was refactored to use > drm_gem_dma_object, but custom callbacks were still needed to deal with > using the first device of the pipeline as the DMA device, instead of > the MMSYS device that the DRM driver binds to. > > Turns out there is already partial support for dedicated DMA devices in > the DRM subsystem for PRIME imports. The preceding patches add support > for dedicated DMA devices to the GEM DMA helpers. > > This allows us to just set the dedicated DMA device for the DRM device, > and drop all the custom GEM callbacks. Also drop the .dma_dev field > from the driver private data as it is no longer needed. > > There are slight differences in the mmap helper: the VM_DONTDUMP and > VM_IO flags are no longer set. Both were lifted from drm_gem_mmap_obj(). > VM_IO probably doesn't make sense since the buffer is allocated using > dma_alloc_attrs().
Acked-by: Chun-Kuang Hu <[email protected]> > > Reviewed-by: Thomas Zimmermann <[email protected]> > Signed-off-by: Chen-Yu Tsai <[email protected]> > --- > Changes since v1: > - Also remove reference to mtk_gem.c from the Makefile > --- >
