[PATCH v2 3/4] drm/mediatek: Set dedicated DMA device and drop custom GEM callbacks

Chun-Kuang Hu chunkuang.hu at kernel.org
Sun Mar 22 06:57:52 PDT 2026


Chen-Yu Tsai <wenst at chromium.org> 於 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 <chunkuang.hu at kernel.org>

>
> Reviewed-by: Thomas Zimmermann <tzimmermann at suse.de>
> Signed-off-by: Chen-Yu Tsai <wenst at chromium.org>
> ---
> Changes since v1:
> - Also remove reference to mtk_gem.c from the Makefile
> ---
>



More information about the Linux-mediatek mailing list