summaryrefslogtreecommitdiff
path: root/bmm_lib.h
AgeCommit message (Collapse)Author
2013-12-08BMMv2: dma_buf based BMMHEADv2.0.0masterRussell King
This is a complete redesign and rewrite of libbmm. This implementation is based upon dma_bufs - where a dma_buf is a kernel-side buffer which can be passed to and from other subsystems. libbmm becomes a provider of dma_bufs - it permits userspace to allocate such things. When a dma_buf is allocated, userspace is handed a file descriptor which is unique to this buffer. This file descriptor can then be passed into other subsystems, which can then request access to this buffer. The file descriptor supports very few operations - it can be mmap()d to provide userspace access to the buffer, and it can be closed when it is no longer required. Internally in the kernel, dma_bufs are reference counted, so the dma_buf will only be freed when the last user gives up its reference.
2013-12-08Add dma_buf export API by physical addressv1.1.3Russell King
Add an API to export BMM buffers by passing in a physical address. This allows a BMM buffer without a virtual mapping to be passed to other device drivers.
2013-06-23Turn on compiler warnings and fix themRussell King
Fix the "warning: function declaration isn't a prototype" warnings in the bmm_lib code, printf formats in the test code, and make test functions static.
2013-06-23Add bmm_malloc_aligned_phys() APIRussell King
Vmeta really wants the physical and virtual address of the buffer. Adjust the BMM API to give that to it.
2013-06-22Add dma_buf export APIRussell King
Add an API to allow bmm buffers to be exported as dma_buf objects, so they can be imported into DRM without needing to resort to passing physical addresses around.
2012-12-05Remove unused bmm_get_kern_paddr() functionRussell King
Userspace should not be dealing with kernel space addresses at all. Thankfully this function is unused, so we can merely delete it.
2012-10-25Add aligned malloc function [new kernel required]Russell King
vmeta wants to allocate memory with specific alignments. Rather than having vmeta request more memory of bmm, and then doing alignment on the result, provide a proper API to do this task. This requires an updated kernel.
2012-10-25Make physical addresses 'unsigned long'Russell King
Rather than having physical addresses be a void * pointer, make them integer like; they're really just numbers because we can't ever dereference them and they certainly aren't pointer-like.
2012-10-22Remove bmm_dma_memcpy() and bmm_dma_sync()Russell King
2012-10-22Move private definitions to bmm_lib_priv.hRussell King
2012-10-22Initial libbmm git checkinRussell King