Commit | Line | Data |
---|---|---|
9952f691 | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
6579324a TB |
2 | /* |
3 | * Tegra host1x Channel | |
4 | * | |
5 | * Copyright (c) 2010-2013, NVIDIA Corporation. | |
6579324a TB |
6 | */ |
7 | ||
8 | #ifndef __HOST1X_CHANNEL_H | |
9 | #define __HOST1X_CHANNEL_H | |
10 | ||
11 | #include <linux/io.h> | |
8474b025 | 12 | #include <linux/kref.h> |
6579324a TB |
13 | |
14 | #include "cdma.h" | |
15 | ||
16 | struct host1x; | |
8474b025 | 17 | struct host1x_channel; |
6579324a | 18 | |
8474b025 MP |
19 | struct host1x_channel_list { |
20 | struct host1x_channel *channels; | |
21 | unsigned long *allocated_channels; | |
22 | }; | |
6579324a | 23 | |
8474b025 MP |
24 | struct host1x_channel { |
25 | struct kref refcount; | |
6579324a | 26 | unsigned int id; |
6579324a TB |
27 | struct mutex submitlock; |
28 | void __iomem *regs; | |
caccddcf | 29 | struct host1x_client *client; |
6579324a TB |
30 | struct device *dev; |
31 | struct host1x_cdma cdma; | |
32 | }; | |
33 | ||
34 | /* channel list operations */ | |
8474b025 MP |
35 | int host1x_channel_list_init(struct host1x_channel_list *chlist, |
36 | unsigned int num_channels); | |
37 | void host1x_channel_list_free(struct host1x_channel_list *chlist); | |
38 | struct host1x_channel *host1x_channel_get_index(struct host1x *host, | |
39 | unsigned int index); | |
6579324a TB |
40 | |
41 | #endif |