diff options
Diffstat (limited to 'bmm_drv.h')
-rw-r--r-- | bmm_drv.h | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/bmm_drv.h b/bmm_drv.h new file mode 100644 index 0000000..77855d4 --- /dev/null +++ b/bmm_drv.h @@ -0,0 +1,42 @@ +/* + * bmm_drv.h + * + * Copyright (C) 2013 Russell King + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * Alternatively, you can distribute this file under the GNU Lesser + * General Public License version 2.1 as published by the Free Software + * Foundation. + */ +#ifndef __BMM_DRV_H__ +#define __BMM_DRV_H__ + +#include <stdint.h> + +#define BMM_DEVICE_FILE "/dev/bmm" +#define BMM_MINOR 94 + +/* ioctl commands */ +struct bmm_dmabuf_alloc { + uint64_t size; + uint64_t align; + uint32_t attr; + int32_t fd; +}; + +struct bmm_dmabuf_flush { + uint64_t size; + uint64_t offset; + uint64_t ptr; + int32_t fd; + uint32_t direction; +}; + +#define BMEM_IOCTL_MAGIC 'G' +#define BMM_DMABUF_ALLOC _IOWR(BMEM_IOCTL_MAGIC, 64, struct bmm_dmabuf_alloc) +#define BMM_DMABUF_FLUSH _IOW(BMEM_IOCTL_MAGIC, 65, struct bmm_dmabuf_flush) + +#endif /* __BMM_DRV_H__ */ |