diff options
| author | Jani Nikula <jani.nikula@intel.com> | 2025-11-11 12:32:07 +0200 |
|---|---|---|
| committer | Jani Nikula <jani.nikula@intel.com> | 2025-11-11 12:32:07 +0200 |
| commit | 1c1960f57151e36f550d1a53352f832d5aaa5f8f (patch) | |
| tree | 102cdd74d069bfcc1c83f99db00ae59f82515c5c /kernel/dma/contiguous.c | |
| parent | e109f644b871df8440c886a69cdce971ed533088 (diff) | |
| parent | e237dfe70867f02de223e36340fe5f8b0fe0eada (diff) | |
Merge drm/drm-next into drm-intel-next
Primarily sync with the drm_print.h changes from drm-misc.
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Diffstat (limited to 'kernel/dma/contiguous.c')
| -rw-r--r-- | kernel/dma/contiguous.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/kernel/dma/contiguous.c b/kernel/dma/contiguous.c index d9b9dcba6ff7..d8fd6f779f79 100644 --- a/kernel/dma/contiguous.c +++ b/kernel/dma/contiguous.c @@ -42,6 +42,7 @@ #include <linux/memblock.h> #include <linux/err.h> #include <linux/sizes.h> +#include <linux/dma-buf/heaps/cma.h> #include <linux/dma-map-ops.h> #include <linux/cma.h> #include <linux/nospec.h> @@ -241,6 +242,8 @@ void __init dma_contiguous_reserve(phys_addr_t limit) } if (selected_size && !dma_contiguous_default_area) { + int ret; + pr_debug("%s: reserving %ld MiB for global area\n", __func__, (unsigned long)selected_size / SZ_1M); @@ -248,6 +251,10 @@ void __init dma_contiguous_reserve(phys_addr_t limit) selected_limit, &dma_contiguous_default_area, fixed); + + ret = dma_heap_cma_register_heap(dma_contiguous_default_area); + if (ret) + pr_warn("Couldn't register default CMA heap."); } } @@ -493,6 +500,10 @@ static int __init rmem_cma_setup(struct reserved_mem *rmem) pr_info("Reserved memory: created CMA memory pool at %pa, size %ld MiB\n", &rmem->base, (unsigned long)rmem->size / SZ_1M); + err = dma_heap_cma_register_heap(cma); + if (err) + pr_warn("Couldn't register CMA heap."); + return 0; } RESERVEDMEM_OF_DECLARE(cma, "shared-dma-pool", rmem_cma_setup); |