aboutsummaryrefslogtreecommitdiff
path: root/scripts/ld-version.sh
diff options
context:
space:
mode:
authorSumit Semwal <sumit.semwal@linaro.org>2014-09-09 14:16:48 +0530
committerSumit Semwal <sumit.semwal@linaro.org>2014-10-10 23:43:56 +0530
commite82ac22698d8571f44c8a8df533d628d764f42f9 (patch)
tree1bfbaab89639d00b5d38418ac17b7f2e9d9e4bf3 /scripts/ld-version.sh
parent2cbdc368dc97eedbeee140c9d3c2b0fe37e61941 (diff)
cenalloc: Constraint-Enabled Allocation helpers for dma-buf
Devices sharing buffers using dma-buf could benefit from sharing their constraints via struct device, and dma-buf framework would manage the common constraints for all attached devices per buffer. With that information, we could have a 'generic' allocator helper in the form of a central dma-buf exporter, which can create dma-bufs, and allocate backing storage at the time of first call to dma_buf_map_attachment. This allocation would utilise the constraint-mask by matching it to the right allocator from a pool of allocators, and then allocating buffer backing storage from this allocator. The pool of allocators could be platform-dependent, allowing for platforms to hide the specifics of these allocators from the devices that access the dma-buf buffers. A sample sequence could be: - get handle to cenalloc_device, - create a dmabuf using cenalloc_buffer_create; - use this dmabuf to attach each device, which has its constraints set in the constraints mask (dev->dma_params->access_constraints_mask) - at each dma_buf_attach() call, dma-buf will check to see if the constraint mask for the device requesting attachment is compatible with the constraints of devices already attached to the dma-buf; returns an error if it isn't. - after all devices have attached, the first call to dma_buf_map_attachment() will allocate the backing storage for the buffer. - follow the dma-buf api for map / unmap etc usage. - detach all attachments, - call cenalloc_buffer_free to free the buffer if refcount reaches zero; ** IMPORTANT** This mechanism of delayed allocation based on constraint-enablement will work *ONLY IF* the first map_attachment() call is made AFTER all attach() calls are done. Signed-off-by: Sumit Semwal <sumit.semwal@linaro.org> Cc: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: linux-media@vger.kernel.org Cc: dri-devel@lists.freedesktop.org Cc: linaro-mm-sig@lists.linaro.org
Diffstat (limited to 'scripts/ld-version.sh')
0 files changed, 0 insertions, 0 deletions