Android ION for drivers/staging
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest115 patches 13 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/115 | gpu: ion: Add ION Memory Managerdrivers/ drivers/ drivers/ +10 more | +2377 | 17 replies | |
| 2/115 | gpu: ion: ion_carveout_heap: fix for 3.4drivers/ | +2 | 0 replies | |
| 3/115 | ion: Switch map/unmap dma api to sg_tablesdrivers/ drivers/ drivers/ +1 more | +53 | 0 replies | |
| 4/115 | ion: Add reserve function to iondrivers/ drivers/ | +28 | 0 replies | |
| 5/115 | gpu: ion: several bugfixes and enhancements of IONdrivers/ | +39 | 0 replies | |
| 6/115 | ion: Switch ion to use dma-bufdrivers/ drivers/ drivers/ | +236 | 0 replies | |
| 7/115 | gpu: ion: Use alloc_pages instead of vmalloc from the system heapdrivers/ | +61 | 0 replies | |
| 8/115 | gpu: ion: support begin/end and kmap/kunmap dma_buf opsdrivers/ | +62 | 0 replies | |
| 9/115 | gpu: ion: Allocate the sg_table at creation time rather than dynamicallydrivers/ | +41 | 0 replies | |
| 10/115 | gpu: ion: Get an sg_table from an ion handledrivers/ drivers/ | +14 | 0 replies | |
| 11/115 | gpu: ion: fill in buffer->{dev,size} before mapping new buffersdrivers/ | +3 | 0 replies | |
| 12/115 | gpu: ion: Set the dma_address of the sg list at alloc timedrivers/ | +12 | 0 replies | |
| 13/115 | gpu: ion: ion_system_heap: Change allocations to GFP_HIGHUSERdrivers/ | +1 | 0 replies | |
| 14/115 | gpu: ion: Loop on the handle count when destroyingdrivers/ | +1 | 0 replies | |
| 15/115 | gpu: ion: Map only the vma size givendrivers/ | +1 | 0 replies | |
| 16/115 | gpu: ion: Add cache maintenance to ion.drivers/ drivers/ drivers/ +2 more | +210 | 0 replies | |
| 17/115 | gpu: ion: Modify the system heap to try to allocate large/huge pagesdrivers/ | +90 | 0 replies | |
| 18/115 | gpu: ion: Add explicit sync ioctldrivers/ drivers/ | +47 | 0 replies | |
| 19/115 | gpu: ion: do not ask for compound pages in system heapdrivers/ | +1 | 0 replies | |
| 20/115 | gpu: ion: Add missing argument to WARN calldrivers/ | +2 | 0 replies | |
| 21/115 | gpu: ion: Add EXPORT_SYMBOL to functionsdrivers/ | +9 | 0 replies | |
| 22/115 | gpu: ion: IOCTL return success when error occursdrivers/ | +8 | 0 replies | |
| 23/115 | gpu: ion: Don't call ion_buffer_put on error pathdrivers/ | +2 | 0 replies | |
| 24/115 | gpu: ion: Only map as much of the vma as the user requesteddrivers/ | +2 | 0 replies | |
| 25/115 | gpu: ion: Switch to using kmalloc rather than kmap during allocationdrivers/ | +3 | 0 replies | |
| 26/115 | gpu: ion: fix page offset in dma_buf_kmap()drivers/ | +1 | 0 replies | |
| 27/115 | gpu: ion: Fix race between ion_import and ion_freedrivers/ | +1 | 0 replies | |
| 28/115 | gpu: ion: Fix bug in ion_freedrivers/ | +1 | 0 replies | |
| 29/115 | gpu: ion: Add debug information for orphaned handlesdrivers/ drivers/ | +72 | 0 replies | |
| 30/115 | gpu: ion: Fix memory leak of dirty bitsdrivers/ | +14 | 0 replies | |
| 31/115 | gpu: ion: Add support for cached mappings that don't faultdrivers/ drivers/ | +21 | 0 replies | |
| 32/115 | gpu: ion: optimize system heap for non fault buffersdrivers/ drivers/ drivers/ | +51 | 0 replies | |
| 33/115 | gpu: ion: Stop trying to allocate from an order on first failuredrivers/ | +9 | 0 replies | |
| 34/115 | gpu: ion: ion_system_heap: Fix bug preventing compilationdrivers/ | +2 | 0 replies | |
| 35/115 | gpu: ion: use vmalloc to allocate page array to map kerneldrivers/ | +5 | 0 replies | |
| 36/115 | gpu: ion: Add ion_page_pool.drivers/ drivers/ drivers/ | +209 | 0 replies | |
| 37/115 | gpu: ion: Use the ion_page_pool from the system heapdrivers/ drivers/ drivers/ | +180 | 0 replies | |
| 38/115 | gpu: ion: Modify gfp flags in ion_system_heapdrivers/ | +18 | 0 replies | |
| 39/115 | gpu: ion: Fix several issues with page pooldrivers/ drivers/ drivers/ | +65 | 0 replies | |
| 40/115 | gpu: ion: Fix lockdep issue in ion_page_pooldrivers/ | +3 | 0 replies | |
| 41/115 | gpu: ion: Switch to using a single shrink functiondrivers/ drivers/ | +123 | 0 replies | |
| 42/115 | gpu: ion: Refactor lockingdrivers/ | +25 | 0 replies | |
| 43/115 | gpu: ion: Clear GFP_WAIT flag on high order allocationsdrivers/ | +1 | 0 replies | |
| 44/115 | gpu: ion: Don't flush allocatoins that come from the page poolsdrivers/ | +5 | 0 replies | |
| 45/115 | gpu: ion: Fix bug in ion_system_heap map_userdrivers/ | +15 | 0 replies | |
| 46/115 | gpu: ion: Fix bug in zeroing pages in system heapdrivers/ | +1 | 0 replies | |
| 47/115 | gpu: ion: fix carveout opsdrivers/ | +2 | 0 replies | |
| 48/115 | gpu: ion: fix compilation warningdrivers/ | +2 | 0 replies | |
| 49/115 | gpu: ion: Modify reserve function for carveouts with no start addressdrivers/ | +26 | 0 replies | |
| 50/115 | gpu: ion: Fix bug where MAP ioctl was no longer supporteddrivers/ | +1 | 0 replies | |
| 51/115 | gpu: ion: Switch heap rbtree to a prio listdrivers/ drivers/ | +10 | 0 replies | |
| 52/115 | gpu: ion: Refactor common mapping functions out of system heapdrivers/ drivers/ drivers/ | +91 | 0 replies | |
| 53/115 | gpu: ion: Add chunk heapdrivers/ drivers/ drivers/ +2 more | +189 | 0 replies | |
| 54/115 | gpu: ion: Clarify variable names and comments around heap ids v typesdrivers/ drivers/ | +47 | 0 replies | |
| 55/115 | gpu: ion: Export ion_client_createdrivers/ | +1 | 0 replies | |
| 56/115 | gpu: ion: Remove heapmask from clientdrivers/ drivers/ | +5 | 0 replies | |
| 57/115 | gpu: ion: Modify zeroing code so it only allocates address space oncedrivers/ | +21 | 0 replies | |
| 58/115 | gpu: ion: Refactor the code to zero buffersdrivers/ drivers/ drivers/ +1 more | +48 | 0 replies | |
| 59/115 | gpu: ion: Only flush buffers in the chunk heap if they were used cacheddrivers/ | +3 | 0 replies | |
| 60/115 | gpu: ion: Add support for sharing buffers with dma buf kernel handlesdrivers/ drivers/ | +30 | 0 replies | |
| 61/115 | gpu: ion: Make ion_free asynchronousdrivers/ drivers/ drivers/ +2 more | +126 | 0 replies | |
| 62/115 | gpu: ion: fix kfree/list_del orderdrivers/ | +1 | 0 replies | |
| 63/115 | gpu: ion: ion_chunk_heap: Zero chunk heap memory at creation timedrivers/ | +32 | 0 replies | |
| 64/115 | gpu: ion: Fix bug in ion shrinkerdrivers/ | +1 | 0 replies | |
| 65/115 | gpu: ion: Also shrink memory cached in the deferred free listdrivers/ drivers/ drivers/ +2 more | +278 | 0 replies | |
| 66/115 | gpu: ion: __dma_page_cpu_to_dev -> arm_dma_ops.sync_single_for_device hackdrivers/ drivers/ drivers/ | +13 | 0 replies | |
| 67/115 | gpu: ion: Remove __GFP_NO_KSWAPDdrivers/ | +2 | 0 replies | |
| 68/115 | ion: Add Kconfig dependency to ARMdrivers/ | +1 | 0 replies | |
| 69/115 | gpu: ion: fix ion_platform_data definitiondrivers/ | +1 | 0 replies | |
| 70/115 | gpu: ion: add CMA heapdrivers/ drivers/ drivers/ +2 more | +249 | 0 replies | |
| 71/115 | gpu: ion: Fix performance issue in faulting codedrivers/ drivers/ drivers/ +2 more | +99 | 0 replies | |
| 72/115 | ion: chunk_heap: fix leak in allocated counterdrivers/ | +9 | 0 replies | |
| 73/115 | ion: add free list size to heap debug filesdrivers/ | +3 | 0 replies | |
| 74/115 | ion: convert map_kernel to return ERR_PTRdrivers/ drivers/ | +9 | 0 replies | |
| 75/115 | ion: remove IS_ERR_OR_NULLdrivers/ drivers/ | +18 | 0 replies | |
| 76/115 | ion: replace userspace handle cookies with idrdrivers/ | +71 | 0 replies | |
| 77/115 | ion: index client->handles rbtree by bufferdrivers/ | +12 | 0 replies | |
| 78/115 | ion: don't use id 0 for handle cookiedrivers/ | +1 | 0 replies | |
| 79/115 | ion: add new ion_user_handle_t type for the user-space tokendrivers/ drivers/ | +7 | 0 replies | |
| 80/115 | ion: change ion_user_handle_t definition to intdrivers/ drivers/ | +6 | 0 replies | |
| 81/115 | ion: add compat_ioctldrivers/ drivers/ drivers/ +1 more | +207 | 0 replies | |
| 82/115 | gpu: ion: delete ion_system_mapper.cdrivers/ | +0 | 0 replies | |
| 83/115 | ion: move userspace api into uapi/ion.hdrivers/ drivers/ drivers/ | +198 | 0 replies | |
| 84/115 | ion: Fix compat support to use proper compat ioctl numbersdrivers/ | +12 | 0 replies | |
| 85/115 | ion: hold reference to handle after ion_uhandle_getdrivers/ | +41 | 0 replies | |
| 86/115 | ion: fix crash when alloc len is -1drivers/ | +3 | 0 replies | |
| 87/115 | ion: fix dma APIsdrivers/ drivers/ drivers/ +2 more | +42 | 0 replies | |
| 88/115 | ion: convert sg_dma_len(sg) to sg->lengthdrivers/ drivers/ drivers/ +1 more | +10 | 0 replies | |
| 89/115 | ion: check invalid values in ion_system_heapdrivers/ | +14 | 0 replies | |
| 90/115 | ion: add test device for unit tests to interact with dma_bufsdrivers/ drivers/ drivers/ +1 more | +360 | 0 replies | |
| 91/115 | ion: update idr to avoid deprecated apisdrivers/ | +5 | 0 replies | |
| 92/115 | ion: don't use __arm_ioremap to map pagesdrivers/ drivers/ | +3 | 0 replies | |
| 93/115 | ion: don't use phys_to_page or __phys_to_pfndrivers/ drivers/ drivers/ | +6 | 0 replies | |
| 94/115 | ion: fix printk warningsdrivers/ drivers/ drivers/ +1 more | +16 | 1 reply | |
| 95/115 | gpu: ion: remove unnecessary function from system heapdrivers/ | +1 | 0 replies | |
| 96/115 | ion: clean up ioctlsdrivers/ | +59 | 0 replies | |
| 97/115 | gpu: ion: fix use-after-free in ion_heap_freelist_draindrivers/ | +1 | 0 replies | |
| 98/115 | ion: Fix two small issues in system_heap allocationdrivers/ | +2 | 0 replies | |
| 99/115 | ion: drop dependency on ARMdrivers/ | +0 | 0 replies | |
| 100/115 | ion: add alignment check to carveout heapdrivers/ | +3 | 0 replies | |
| 101/115 | ion: optimize ion_heap_buffer_zerodrivers/ | +22 | 0 replies | |
| 102/115 | ion: free low memory from page pools firstdrivers/ | +3 | 0 replies | |
| 103/115 | ion: check return value from remap_pfn_rangedrivers/ | +4 | 0 replies | |
| 104/115 | ion: use vm_insert_pfn for faulted pagesdrivers/ | +6 | 0 replies | |
| 105/115 | ion: remove ion_heap_alloc_pagesdrivers/ drivers/ drivers/ | +1 | 0 replies | |
| 106/115 | ion: allow cached mappings of chunk and system heap buffersdrivers/ drivers/ | +0 | 0 replies | |
| 107/115 | ion: use alloc_pages in system contig heapdrivers/ | +48 | 0 replies | |
| 108/115 | ion: fix sparse warningsdrivers/ drivers/ drivers/ +4 more | +37 | 0 replies | |
| 109/115 | ion: carveout heap: zero buffers on free, fix memory leakdrivers/ | +48 | 0 replies | |
| 110/115 | ion: add helper to zero contiguous region of pagesdrivers/ drivers/ drivers/ +1 more | +58 | 0 replies | |
| 111/115 | ion: add alignment check to chunk heapdrivers/ | +3 | 0 replies | |
| 112/115 | ion: fix bugs in cma heapdrivers/ | +14 | 0 replies | |
| 113/115 | ion: Cleanup whitespace issues and other checkpatch problemsdrivers/ drivers/ drivers/ +5 more | +37 | 0 replies | |
| 114/115 | ion: Improve ION config descriptiondrivers/ | +6 | 0 replies | |
| 115/115 | ion: Update system heap shrinker to use the new count/scan interfacedrivers/ | +28 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 000/115] Android ION for drivers/staging
This patchset is to submit the Android ION code to drivers/staging.
ION is a constraint aware memory allocator used by Android in order to allocate memory that can be properly shared between a number of devices that possibly have different memory access constraints.
You can read some background on ION as well as some problematic aspects of ION in my lwn summary here:
https://lwn.net/Articles/565469/
Recently, Colin Cross has put in quite a bit of effort to resolve a number of the issues identified in that article as well as other.
While a number of issues remain, including negative sentiments from upstream maintainers about the interface, ION provides functionality (constraints based allocation), which is not currently available upstream.
As discussed at Linux Plumbers this year (https://lwn.net/Articles/569704/)
it was proposed to merge the ION code into staging. This will allow for better visibility to the upstream community, allowing further review and understanding of the code, but it will also aid in the design of dma-buf constraint-aware memory allocation helpers, allowing us to share the backing heap allocation implementations.
In order to preserve authorship history, I've taken all the ION changes in AOSP's common.git android-3.10 branch up to commit 8f1c42284159ebd6 (Improve ION config descriptions). The only modifications to the patches that I've made is pushing down Colin's patch to migrate ION to staging (ION was originally implemented in drivers/gpu/ion) so all the patches apply to staging from the start.
I've also had to add a single patch (the last one) which moves ION to use the new scan/count shrinker api introduced in 3.12.
Other then this one change, the only diff from AOSP's 3.10 branch are corrected path names in the header comment. ie:
- * drivers/gpu/ion/ion.c
+ * drivers/staging/android/ion/ion.c
This is a fairly large patchset, and is also available here:
http://git.linaro.org/git/people/john.stultz/android-dev.git dev/ion-staging
Please let me know if you have any thoughts or objections.
thanks
-john
Arve Hjønnevåg (2):
gpu: ion: __dma_page_cpu_to_dev -> arm_dma_ops.sync_single_for_device
hack
gpu: ion: Remove __GFP_NO_KSWAPD
Benjamin Gaignard (4):
gpu: ion: fix carveout ops
gpu: ion: fix compilation warning
gpu: ion: fix ion_platform_data definition
gpu: ion: add CMA heap
Colin Cross (36):
gpu: ion: ion_carveout_heap: fix for 3.4
ion: chunk_heap: fix leak in allocated counter
ion: add free list size to heap debug files
ion: convert map_kernel to return ERR_PTR
ion: remove IS_ERR_OR_NULL
ion: replace userspace handle cookies with idr
ion: index client->handles rbtree by buffer
ion: don't use id 0 for handle cookie
gpu: ion: delete ion_system_mapper.c
ion: move userspace api into uapi/ion.h
ion: hold reference to handle after ion_uhandle_get
ion: fix crash when alloc len is -1
ion: fix dma APIs
ion: convert sg_dma_len(sg) to sg->length
ion: check invalid values in ion_system_heap
ion: add test device for unit tests to interact with dma_bufs
ion: update idr to avoid deprecated apis
ion: don't use __arm_ioremap to map pages
ion: don't use phys_to_page or __phys_to_pfn
ion: fix printk warnings
gpu: ion: remove unnecessary function from system heap
ion: clean up ioctls
ion: drop dependency on ARM
ion: add alignment check to carveout heap
ion: optimize ion_heap_buffer_zero
ion: free low memory from page pools first
ion: check return value from remap_pfn_range
ion: use vm_insert_pfn for faulted pages
ion: remove ion_heap_alloc_pages
ion: allow cached mappings of chunk and system heap buffers
ion: use alloc_pages in system contig heap
ion: fix sparse warnings
ion: carveout heap: zero buffers on free, fix memory leak
ion: add helper to zero contiguous region of pages
ion: add alignment check to chunk heap
ion: fix bugs in cma heap
Dima Zavin (1):
gpu: ion: do not ask for compound pages in system heap
Greg Hackmann (2):
gpu: ion: fill in buffer->{dev,size} before mapping new buffers
gpu: ion: fix page offset in dma_buf_kmap()
JP Abgrall (1):
gpu: ion: fix kfree/list_del order
Johan Mossberg (2):
gpu: ion: Export ion_client_create
gpu: ion: Add support for sharing buffers with dma buf kernel handles
John Stultz (6):
ion: Add Kconfig dependency to ARM
ion: Fix compat support to use proper compat ioctl numbers
ion: Fix two small issues in system_heap allocation
ion: Cleanup whitespace issues and other checkpatch problems
ion: Improve ION config description
ion: Update system heap shrinker to use the new count/scan interface
KyongHo Cho (1):
gpu: ion: several bugfixes and enhancements of ION
Laura Abbott (3):
gpu: ion: Loop on the handle count when destroying
gpu: ion: Map only the vma size given
gpu: ion: Don't call ion_buffer_put on error path
Mitchel Humpherys (1):
gpu: ion: fix use-after-free in ion_heap_freelist_drain
Olav Haugan (3):
gpu: ion: Add missing argument to WARN call
gpu: ion: Add EXPORT_SYMBOL to functions
gpu: ion: IOCTL return success when error occurs
Rebecca Schultz Zavin (50):
gpu: ion: Add ION Memory Manager
ion: Switch map/unmap dma api to sg_tables
ion: Add reserve function to ion
ion: Switch ion to use dma-buf
gpu: ion: Use alloc_pages instead of vmalloc from the system heap
gpu: ion: support begin/end and kmap/kunmap dma_buf ops
gpu: ion: Allocate the sg_table at creation time rather than
dynamically
gpu: ion: Get an sg_table from an ion handle
gpu: ion: Set the dma_address of the sg list at alloc time
gpu: ion: ion_system_heap: Change allocations to GFP_HIGHUSER
gpu: ion: Add cache maintenance to ion.
gpu: ion: Modify the system heap to try to allocate large/huge pages
gpu: ion: Add explicit sync ioctl
gpu: ion: Only map as much of the vma as the user requested
gpu: ion: Switch to using kmalloc rather than kmap during allocation
gpu: ion: Fix race between ion_import and ion_free
gpu: ion: Fix bug in ion_free
gpu: ion: Add debug information for orphaned handles
gpu: ion: Fix memory leak of dirty bits
gpu: ion: Add support for cached mappings that don't fault
gpu: ion: optimize system heap for non fault buffers
gpu: ion: Stop trying to allocate from an order on first failure
gpu: ion: ion_system_heap: Fix bug preventing compilation
gpu: ion: use vmalloc to allocate page array to map kernel
gpu: ion: Add ion_page_pool.
gpu: ion: Use the ion_page_pool from the system heap
gpu: ion: Modify gfp flags in ion_system_heap
gpu: ion: Fix several issues with page pool
gpu: ion: Fix lockdep issue in ion_page_pool
gpu: ion: Switch to using a single shrink function
gpu: ion: Refactor locking
gpu: ion: Clear GFP_WAIT flag on high order allocations
gpu: ion: Don't flush allocatoins that come from the page pools
gpu: ion: Fix bug in ion_system_heap map_user
gpu: ion: Fix bug in zeroing pages in system heap
gpu: ion: Modify reserve function for carveouts with no start address
gpu: ion: Fix bug where MAP ioctl was no longer supported
gpu: ion: Switch heap rbtree to a prio list
gpu: ion: Refactor common mapping functions out of system heap
gpu: ion: Add chunk heap
gpu: ion: Clarify variable names and comments around heap ids v types
gpu: ion: Remove heapmask from client
gpu: ion: Modify zeroing code so it only allocates address space once
gpu: ion: Refactor the code to zero buffers
gpu: ion: Only flush buffers in the chunk heap if they were used
cached
gpu: ion: Make ion_free asynchronous
gpu: ion: ion_chunk_heap: Zero chunk heap memory at creation time
gpu: ion: Fix bug in ion shrinker
gpu: ion: Also shrink memory cached in the deferred free list
gpu: ion: Fix performance issue in faulting code
Rom Lemarchand (3):
ion: add new ion_user_handle_t type for the user-space token
ion: change ion_user_handle_t definition to int
ion: add compat_ioctl
drivers/staging/android/Kconfig | 2 + drivers/staging/android/Makefile | 2 + drivers/staging/android/ion/Kconfig | 24 + drivers/staging/android/ion/Makefile | 7 + drivers/staging/android/ion/compat_ion.c | 177 +++ drivers/staging/android/ion/compat_ion.h | 30 + drivers/staging/android/ion/ion.c | 1549 +++++++++++++++++++++++ drivers/staging/android/ion/ion.h | 204 +++ drivers/staging/android/ion/ion_carveout_heap.c | 194 +++ drivers/staging/android/ion/ion_chunk_heap.c | 195 +++ drivers/staging/android/ion/ion_cma_heap.c | 218 ++++ drivers/staging/android/ion/ion_heap.c | 314 +++++ drivers/staging/android/ion/ion_page_pool.c | 195 +++ drivers/staging/android/ion/ion_priv.h | 360 ++++++ drivers/staging/android/ion/ion_system_heap.c | 483 +++++++ drivers/staging/android/ion/ion_test.c | 281 ++++ drivers/staging/android/ion/tegra/Makefile | 1 + drivers/staging/android/ion/tegra/tegra_ion.c | 96 ++ drivers/staging/android/uapi/ion.h | 196 +++ drivers/staging/android/uapi/ion_test.h | 71 ++ 20 files changed, 4599 insertions(+) create mode 100644 drivers/staging/android/ion/Kconfig create mode 100644 drivers/staging/android/ion/Makefile create mode 100644 drivers/staging/android/ion/compat_ion.c create mode 100644 drivers/staging/android/ion/compat_ion.h create mode 100644 drivers/staging/android/ion/ion.c create mode 100644 drivers/staging/android/ion/ion.h create mode 100644 drivers/staging/android/ion/ion_carveout_heap.c create mode 100644 drivers/staging/android/ion/ion_chunk_heap.c create mode 100644 drivers/staging/android/ion/ion_cma_heap.c create mode 100644 drivers/staging/android/ion/ion_heap.c create mode 100644 drivers/staging/android/ion/ion_page_pool.c create mode 100644 drivers/staging/android/ion/ion_priv.h create mode 100644 drivers/staging/android/ion/ion_system_heap.c create mode 100644 drivers/staging/android/ion/ion_test.c create mode 100644 drivers/staging/android/ion/tegra/Makefile create mode 100644 drivers/staging/android/ion/tegra/tegra_ion.c create mode 100644 drivers/staging/android/uapi/ion.h create mode 100644 drivers/staging/android/uapi/ion_test.h
Signature · 1 line
1.8.3.2