|
1 | 1 | From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 |
2 | | -From: EvilOlaf <werner@armbian.com> |
3 | | -Date: Fri, 27 Mar 2026 15:19:07 +0100 |
4 | | -Subject: [ARCHEOLOGY] sunxi-6.18: drm/gem-dma: Support dedicated DMA device |
5 | | - for allocation |
| 2 | +From: Chen-Yu Tsai <wenst@chromium.org> |
| 3 | +Date: Wed, 11 Mar 2026 17:49:26 +0800 |
| 4 | +Subject: drm/gem-dma: Support dedicated DMA device for allocation and mapping |
6 | 5 |
|
7 | | -> X-Git-Archeology: - Revision 501ad529462d3159993b07485eb4d5f5746c3f46: https://github.com/armbian/build/commit/501ad529462d3159993b07485eb4d5f5746c3f46 |
8 | | -> X-Git-Archeology: Date: Fri, 27 Mar 2026 15:19:07 +0100 |
9 | | -> X-Git-Archeology: From: EvilOlaf <werner@armbian.com> |
10 | | -> X-Git-Archeology: Subject: sunxi-6.18: drm/gem-dma: Support dedicated DMA device for allocation |
11 | | -> X-Git-Archeology: |
12 | | -> X-Git-Archeology: - Revision d944703ab8a32e52838f921cb67dd2db6d26b5df: https://github.com/armbian/build/commit/d944703ab8a32e52838f921cb67dd2db6d26b5df |
13 | | -> X-Git-Archeology: Date: Fri, 27 Mar 2026 15:19:07 +0100 |
14 | | -> X-Git-Archeology: From: EvilOlaf <werner@armbian.com> |
15 | | -> X-Git-Archeology: Subject: sunxi-7.0: drm/gem-dma: Support dedicated DMA device for allocation |
16 | | -> X-Git-Archeology: |
| 6 | +Support for a dedicated DMA device for prime imports was added in commit |
| 7 | +143ec8d3f939 ("drm/prime: Support dedicated DMA device for dma-buf imports"). |
| 8 | +This allowed the DRM driver to provide a dedicated DMA device when its |
| 9 | +own underlying device was not capable of DMA, for example when it is a |
| 10 | +USB device (the original target) or a virtual device. The latter case is |
| 11 | +common on embedded SoCs, on which the display pipeline is composed of |
| 12 | +various fixed function blocks, and the DRM device is simply a made-up |
| 13 | +device, an address space managing the routing between the blocks, or |
| 14 | +whichever block the implementor thought made sense at the time. The |
| 15 | +point is that the chosen device is often not the actual device doing |
| 16 | +the DMA. Various drivers have used workarounds or reimplemented the |
| 17 | +GEM DMA helpers to get the DMA addresses and IOMMUs to work correctly. |
| 18 | + |
| 19 | +Add support for the dedicated DMA device to the GEM DMA helpers. |
| 20 | + |
| 21 | +No existing driver currently uses the GEM DMA helpers and calls |
| 22 | +drm_dev_set_dma_dev() to set a dedicated DMA device, so no existing |
| 23 | +users should be affected. |
| 24 | + |
| 25 | +Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de> |
| 26 | +Signed-off-by: Chen-Yu Tsai <wenst@chromium.org> |
| 27 | +Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> |
17 | 28 | --- |
18 | 29 | drivers/gpu/drm/drm_gem_dma_helper.c | 21 ++++++---- |
19 | 30 | 1 file changed, 12 insertions(+), 9 deletions(-) |
|
0 commit comments