1
2
3
4
5
6
7
8 #ifndef __HOST1X_CHANNEL_H
9 #define __HOST1X_CHANNEL_H
10
11 #include <linux/io.h>
12 #include <linux/kref.h>
13
14 #include "cdma.h"
15
16 struct host1x;
17 struct host1x_channel;
18
19 struct host1x_channel_list {
20 struct host1x_channel *channels;
21 unsigned long *allocated_channels;
22 };
23
24 struct host1x_channel {
25 struct kref refcount;
26 unsigned int id;
27 struct mutex submitlock;
28 void __iomem *regs;
29 struct device *dev;
30 struct host1x_cdma cdma;
31 };
32
33
34 int host1x_channel_list_init(struct host1x_channel_list *chlist,
35 unsigned int num_channels);
36 void host1x_channel_list_free(struct host1x_channel_list *chlist);
37 struct host1x_channel *host1x_channel_get_index(struct host1x *host,
38 unsigned int index);
39
40 #endif