Age | Commit message (Collapse) | Author |
|
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.
|
|
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.
|
|
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.
|
|
Vmeta really wants the physical and virtual address of the buffer.
Adjust the BMM API to give that to it.
|
|
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.
|
|
Userspace should not be dealing with kernel space addresses at all.
Thankfully this function is unused, so we can merely delete it.
|
|
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.
|
|
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.
|
|
|
|
|
|
|