/* * 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 #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__ */