staging: ion: refactor ion's dmabuf manipulators into a separate file.
This patch is preparatory work for making ion heaps modular. The patch itself doesn't make any significant changes except for re-organizing the buffer manipulator functions in a single file. This will be helpful later when we specifically export some of these functions to be used by a heap module. Bug: 133508579 Test: ion-unit-tests Change-Id: I52ecea78a179c936006a21beb7630009984cb22f Co-developed-by: Isaac J. Manjarres <isaacm@codeaurora.org> Signed-off-by: Sandeep Patil <sspatil@google.com>
This commit is contained in:
committed by
Alistair Delva
parent
d6aced53bb
commit
144555039f
@@ -10,8 +10,18 @@
|
||||
#include <linux/err.h>
|
||||
|
||||
#ifdef CONFIG_ION
|
||||
/*
|
||||
* Allocates an ION buffer.
|
||||
|
||||
|
||||
/**
|
||||
* ion_alloc - Allocates an ion buffer of given size from given heap
|
||||
*
|
||||
* @len: size of the buffer to be allocated.
|
||||
* @heap_id_mask: a bitwise maks of heap ids to allocate from
|
||||
* @flags: ION_BUFFER_XXXX flags for the new buffer.
|
||||
*
|
||||
* The function exports a dma_buf object for the new ion buffer internally
|
||||
* and returns that to the caller. So, the buffer is ready to be used by other
|
||||
* drivers immediately. Returns ERR_PTR in case of failure.
|
||||
*/
|
||||
struct dma_buf *ion_alloc(size_t len, unsigned int heap_id_mask,
|
||||
unsigned int flags);
|
||||
@@ -22,5 +32,7 @@ static inline struct dma_buf *ion_alloc(size_t len, unsigned int heap_id_mask,
|
||||
{
|
||||
return ERR_PTR(-ENOMEM);
|
||||
}
|
||||
|
||||
|
||||
#endif /* CONFIG_ION */
|
||||
#endif /* _ION_KERNEL_H */
|
||||
|
||||
Reference in New Issue
Block a user