blob: 77855d4a983d445498ae51192a3900209be9bc79 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
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__ */
|