linux/Documentation
Maxime Ripard 4f5f8baf73 dma-buf: heaps: cma: Create CMA heap for each CMA reserved region
Aside from the main CMA region, it can be useful to allow userspace to
allocate from the other CMA reserved regions.

Indeed, those regions can have specific properties that can be useful to
a specific us-case.

For example, one of them platform I've been with has ECC enabled on the
entire memory but for a specific region. Using that region to allocate
framebuffers can be particular beneficial because enabling the ECC has a
performance and memory footprint cost.

Thus, exposing these regions as heaps user-space can allocate from and
import wherever needed allows to cover that use-case.

For now, only shared-dma-pools regions with the reusable property (ie,
backed by CMA) are supported, but eventually we'll want to support other
DMA pools types.

Since we collected all the CMA regions created during boot, we can
simply iterate over all of them to create the heaps.

This has a weird interaction with the recent work on the CMA name, in
particular the backward compatibility code created by commit
854acbe75f ("dma-buf: heaps: Give default CMA heap a fixed name").

Indeed, the old name was either 'reserved', or the name of the
reserved-memory region device tree node if the linux,cma-default
property was set.

In both these cases, we have now collected this region during boot, and
we're using the same name. So we're now largely redundant with the
code to handle backward compatibility code, and we can thus remove it
and the associated Kconfig option.

Reviewed-by: T.J. Mercier <tjmercier@google.com>
Signed-off-by: Maxime Ripard <mripard@kernel.org>
Signed-off-by: Sumit Semwal <sumit.semwal@linaro.org>
   [sumits: rebased the doc to latest]
Link: https://lore.kernel.org/r/20251013-dma-buf-ecc-heap-v8-5-04ce150ea3d9@kernel.org
2025-10-18 21:31:22 +05:30
..
ABI VFIO updates for v6.18-rc1 part 2 2025-10-08 11:22:27 -07:00
accel Documentation: accel: amdxdna: Update compiler information 2025-08-21 08:25:31 -07:00
accounting docs: update delaytop documentation for new interactive features 2025-09-13 17:32:56 -07:00
admin-guide - Remove a bunch of asm implementing condition flags testing in KVM's 2025-10-11 11:19:16 -07:00
arch - Make TDX and kexec work together 2025-10-04 10:01:30 -07:00
block
bpf bpf: disable and remove registers chain based liveness 2025-09-19 09:27:23 -07:00
cdrom
core-api dma-mapping updates for Linux 6.18: 2025-10-03 17:41:12 -07:00
cpu-freq cpufreq: Drop unused symbol CPUFREQ_ETERNAL 2025-10-01 13:57:22 +02:00
crypto crypto: doc - Add explicit title heading to API docs 2025-09-28 11:54:48 +08:00
dev-tools It has been a relatively busy cycle in docsland, with changes all over: 2025-10-03 17:16:13 -07:00
devicetree dt-bindings: display: rockchip,dw-mipi-dsi: Document RK3368 DSI 2025-10-14 14:12:23 +02:00
doc-guide
driver-api pci-v6.18-changes 2025-10-06 10:41:03 -07:00
edac
fault-injection
fb fbdev fixes & enhancements for 6.18-rc1: 2025-10-10 09:36:23 -07:00
features OpenRISC updates for 6.18 2025-10-05 10:02:54 -07:00
filesystems VFIO updates for v6.18-rc1 2025-10-04 08:24:54 -07:00
firmware-guide
firmware_class
fpga
gpu Merge drm/drm-next into drm-misc-next 2025-10-13 09:19:19 +02:00
hid
hwmon hwmon: (cros_ec) register fans into thermal framework cooling devices 2025-09-25 08:08:14 -07:00
i2c i2c: i801: Add support for Intel Wildcat Lake-U 2025-09-28 00:45:53 +02:00
iio docs: iio: add documentation for ade9000 driver 2025-09-13 14:20:44 +01:00
images
infiniband
input Input: add INPUT_PROP_HAPTIC_TOUCHPAD 2025-09-15 14:32:54 +02:00
isdn
kbuild Kbuild updates for 6.18 2025-10-01 20:58:51 -07:00
kernel-hacking
leds
litmus-tests
livepatch
locking Documentation: locking: Add local_lock_nested_bh() to locktypes 2025-08-21 12:52:20 -06:00
maintainer docs: maintainer: Fix ambiguous subheading formatting 2025-09-18 10:26:45 -06:00
mhi
misc-devices
mm Only two patch series in this pull request: 2025-10-05 12:11:07 -07:00
netlabel
netlink Char/Misc/IIO/Binder changes for 6.18-rc1 2025-10-04 16:26:32 -07:00
networking RDMA v6.18 merge window pull request 2025-10-03 18:35:22 -07:00
nvdimm
nvme
PCI pci-v6.18-changes 2025-10-06 10:41:03 -07:00
pcmcia
peci
power It has been a relatively busy cycle in docsland, with changes all over: 2025-10-03 17:16:13 -07:00
process It has been a relatively busy cycle in docsland, with changes all over: 2025-10-03 17:16:13 -07:00
RCU RCU pull request for v6.18 2025-10-04 11:28:45 -07:00
rust
scheduler
scsi scsi: switch ->bios_param() to passing gendisk 2025-08-13 02:59:28 -04:00
security
sound ALSA: emu10k1: Fix typo in docs 2025-10-04 15:47:24 +02:00
sphinx docs: remove cdomain.py 2025-09-21 16:35:57 -06:00
sphinx-static
spi
staging It has been a relatively busy cycle in docsland, with changes all over: 2025-10-03 17:16:13 -07:00
sunrpc/xdr
target
tee Documentation: tee: Add Qualcomm TEE driver 2025-09-15 17:34:06 +02:00
timers
tools tools/rtla: Add remaining support for osnoise actions 2025-09-27 04:53:48 -04:00
trace Documentation: trace: histogram: Convert ftrace docs cross-reference 2025-09-18 11:49:26 -06:00
translations More power management updates for 6.18-rc1 2025-10-07 09:39:51 -07:00
usb
userspace-api dma-buf: heaps: cma: Create CMA heap for each CMA reserved region 2025-10-18 21:31:22 +05:30
virt Generic: 2025-10-06 12:37:34 -07:00
w1 docs: w1: ds2482: fix typo in buses 2025-09-16 10:00:57 -06:00
watchdog
wmi
.gitignore
.renames.txt docs: add Documentation/.renames.txt 2025-09-09 13:37:16 -06:00
atomic_bitops.txt
atomic_t.txt
Changes
CodingStyle
conf.py docs: conf.py: drop xindy rule 2025-08-29 16:45:09 -06:00
docutils.conf
index.rst
Kconfig
Makefile docs: add tools/docs/gen-redirects.py 2025-09-09 13:37:16 -06:00
memory-barriers.txt
SubmittingPatches
subsystem-apis.rst