summaryrefslogtreecommitdiff
path: root/bmm_lib_priv.h
diff options
context:
space:
mode:
authorRussell King <rmk+cubox@arm.linux.org.uk>2013-12-08 21:29:56 +0000
committerRussell King <rmk@arm.linux.org.uk>2013-12-08 22:02:42 +0000
commit6f2e8ec4c736fbffe3d0e0f1ec07f453910441a1 (patch)
tree3adfc685d5addab0a3d7a609a0d620b0046a6bee /bmm_lib_priv.h
parentdcad449e26e81b71e4a498dc5bfaf014a5566acd (diff)
BMMv2: dma_buf based BMMHEADv2.0.0master
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.
Diffstat (limited to 'bmm_lib_priv.h')
-rw-r--r--bmm_lib_priv.h51
1 files changed, 0 insertions, 51 deletions
diff --git a/bmm_lib_priv.h b/bmm_lib_priv.h
deleted file mode 100644
index 42d4e64..0000000
--- a/bmm_lib_priv.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * bmm_lib_priv.h
- *
- * Buffer Management Module
- *
- * User level BMM Defines/Globals/Functions
- *
- * Li Li (lea.li@marvell.com)
-
- *(C) Copyright 2007 Marvell International Ltd.
- * All Rights Reserved
- */
-
-#ifndef __BMM_LIB_PRIV_H__
-#define __BMM_LIB_PRIV_H__
-
-#define BMM_MINOR (94)
-
-typedef struct {
- unsigned long input; /* the starting address of the block of memory */
- unsigned long output; /* the starting address of the block of memory */
- unsigned long length; /* the length of the block of memory */
- unsigned long arg; /* the arg of cmd */
-} ioctl_arg_t;
-
-#define BMEM_IOCTL_MAGIC 'G'
-/* ioctl commands */
-#define BMM_MALLOC _IOWR(BMEM_IOCTL_MAGIC, 0, ioctl_arg_t)
-#define BMM_FREE _IOWR(BMEM_IOCTL_MAGIC, 1, ioctl_arg_t)
-#define BMM_GET_VIRT_ADDR _IOWR(BMEM_IOCTL_MAGIC, 2, ioctl_arg_t)
-#define BMM_GET_PHYS_ADDR _IOWR(BMEM_IOCTL_MAGIC, 3, ioctl_arg_t)
-#define BMM_GET_MEM_ATTR _IOWR(BMEM_IOCTL_MAGIC, 4, ioctl_arg_t)
-#define BMM_SET_MEM_ATTR _IOWR(BMEM_IOCTL_MAGIC, 5, ioctl_arg_t)
-#define BMM_GET_MEM_SIZE _IOWR(BMEM_IOCTL_MAGIC, 6, ioctl_arg_t)
-#define BMM_GET_TOTAL_SPACE _IOWR(BMEM_IOCTL_MAGIC, 7, ioctl_arg_t)
-#define BMM_GET_FREE_SPACE _IOWR(BMEM_IOCTL_MAGIC, 8, ioctl_arg_t)
-#define BMM_FLUSH_CACHE _IOWR(BMEM_IOCTL_MAGIC, 9, ioctl_arg_t)
-#define BMM_CONSISTENT_SYNC _IOWR(BMEM_IOCTL_MAGIC, 12, ioctl_arg_t)
-#define BMM_DUMP _IOWR(BMEM_IOCTL_MAGIC, 13, ioctl_arg_t)
-#define BMM_GET_ALLOCATED_SPACE _IOWR(BMEM_IOCTL_MAGIC, 14, ioctl_arg_t)
-#define BMM_GET_KERN_PHYS_ADDR _IOWR(BMEM_IOCTL_MAGIC, 15, ioctl_arg_t)
-#define BMM_SYNC_USER _IOWR(BMEM_IOCTL_MAGIC, 16, ioctl_arg_t)
-#define BMM_MALLOC_ALIGNED _IOWR(BMEM_IOCTL_MAGIC, 17, ioctl_arg_t)
-#define BMM_API_VERSION _IOWR(BMEM_IOCTL_MAGIC, 18, ioctl_arg_t)
-#define BMM_GET_DMABUF_FD _IOWR(BMEM_IOCTL_MAGIC, 19, ioctl_arg_t)
-#define BMM_FREE_PHYS _IOWR(BMEM_IOCTL_MAGIC, 20, ioctl_arg_t)
-#define BMM_GET_PHYS_DMABUF_FD _IOWR(BMEM_IOCTL_MAGIC, 21, ioctl_arg_t)
-
-#define BMM_DEVICE_FILE "/dev/bmm"
-
-#endif /* __BMM_LIB_PRIV_H__ */