dma-buf: heaps: Use constant name for CMA heap
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v4 Latest3 patches 2 repliesIn review
- v33 patches 3 repliesSuperseded
- v22 patches 13 repliesSuperseded
Earlier versions · 1
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v1 | 2 patches | 0 replies | Superseded |
Changes in v4 from the cover letter
- Fix ERR_PTR() usage for negative return value.
Patches in v4 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | Documentation: dma-buf: heaps: Fix code markupDocumentation/ | +3 | 0 replies | |
| 2/3 | dma-buf: heaps: Parameterize heap name in __add_cma_heap()drivers/ | +11 | 0 replies | |
| 3/3 | dma-buf: heaps: Give default CMA heap a fixed nameDocumentation/ drivers/ drivers/ | +34 | 0 replies |
Reviews trailers per patch
All 3 patches have a Reviewed-by or Acked-by.
| Patch | Maxime Ripard |
|---|---|
| 1/3 | R-b |
| 2/3 | R-b |
| 3/3 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v4 0/3] dma-buf: heaps: Use constant name for CMA heap
Hi all,
This patch series is based on a previous discussion around CMA heap naming. [1] The heap's name depends on the device name, which is generally "reserved", "linux,cma", or "default-pool", but could be any arbitrary name given to the default CMA area in the devicetree. For a consistent userspace interface, the series introduces a constant name for the CMA heap, and for backwards compatibility, an additional Kconfig that controls the creation of a legacy-named heap with the same CMA backing.
The ideas to handle backwards compatibility in [1] are to either use a symlink or add a heap node with a duplicate minor. However, I assume that we don't want to create symlinks in /dev from module initcalls, and attempting to duplicate minors would cause device_create() to fail. Because of these drawbacks, after brainstorming with Maxime Ripard, I went with creating a new node in devtmpfs with its own minor. This admittedly makes it a little unclear that the old and new nodes are backed by the same heap when both are present. The only approach that I think would provide total clarity on this in userspace is symlinking, which seemed like a fairly involved solution for devtmpfs, but if I'm wrong on this, please let me know.
Changelog:
v4:
- Fix ERR_PTR() usage for negative return value.
v3:
- Extract documentation markup fix to separate patch.
- Adjust DEFAULT_CMA_NAME per discussion in [2].
- Warn if the legacy heap name and the default heap name are the same.
- Fix DMABUF_HEAPS_CMA_LEGACY prompt.
- Touch up commit log wording.
v2:
- Use tabs instead of spaces for large vertical alignment.
[1]: https://lore.kernel.org/all/[email protected]/
[2]: https://lore.kernel.org/all/CANDhNCroe6ZBtN_o=c71kzFFaWK-fF5rCdnr9P5h1sgPOWSGSw@mail.gmail.com/
Jared Kangas (3):
Documentation: dma-buf: heaps: Fix code markup
dma-buf: heaps: Parameterize heap name in __add_cma_heap()
dma-buf: heaps: Give default CMA heap a fixed name
Documentation/userspace-api/dma-buf-heaps.rst | 11 +++--- drivers/dma-buf/heaps/Kconfig | 10 ++++++ drivers/dma-buf/heaps/cma_heap.c | 36 +++++++++++++++---- 3 files changed, 46 insertions(+), 11 deletions(-)
Signature · 1 line
2.49.0