diff options
Diffstat (limited to 'drivers/video/tegra/host/host1x/host1x_hwctx.h')
-rw-r--r-- | drivers/video/tegra/host/host1x/host1x_hwctx.h | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/drivers/video/tegra/host/host1x/host1x_hwctx.h b/drivers/video/tegra/host/host1x/host1x_hwctx.h new file mode 100644 index 00000000000..7587642d0e1 --- /dev/null +++ b/drivers/video/tegra/host/host1x/host1x_hwctx.h | |||
@@ -0,0 +1,65 @@ | |||
1 | /* | ||
2 | * drivers/video/tegra/host/host1x/host1x_hwctx.h | ||
3 | * | ||
4 | * Tegra Graphics Host HOST1X Hardware Context Interface | ||
5 | * | ||
6 | * Copyright (c) 2012, NVIDIA Corporation. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License as published by | ||
10 | * the Free Software Foundation; either version 2 of the License, or | ||
11 | * (at your option) any later version. | ||
12 | * | ||
13 | * This program is distributed in the hope that it will be useful, but WITHOUT | ||
14 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
15 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
16 | * more details. | ||
17 | * | ||
18 | * You should have received a copy of the GNU General Public License along | ||
19 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
20 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
21 | */ | ||
22 | |||
23 | #ifndef __NVHOST_HOST1X_HWCTX_H | ||
24 | #define __NVHOST_HOST1X_HWCTX_H | ||
25 | |||
26 | #include <linux/kref.h> | ||
27 | |||
28 | struct nvhost_hwctx_handler; | ||
29 | struct nvhost_channel; | ||
30 | |||
31 | #define to_host1x_hwctx_handler(handler) \ | ||
32 | container_of((handler), struct host1x_hwctx_handler, h) | ||
33 | #define to_host1x_hwctx(h) container_of((h), struct host1x_hwctx, hwctx) | ||
34 | #define host1x_hwctx_handler(_hwctx) to_host1x_hwctx_handler((_hwctx)->hwctx.h) | ||
35 | |||
36 | struct host1x_hwctx { | ||
37 | struct nvhost_hwctx hwctx; | ||
38 | |||
39 | u32 save_incrs; | ||
40 | u32 save_thresh; | ||
41 | u32 save_slots; | ||
42 | |||
43 | struct nvmap_handle_ref *restore; | ||
44 | u32 *restore_virt; | ||
45 | phys_addr_t restore_phys; | ||
46 | u32 restore_size; | ||
47 | u32 restore_incrs; | ||
48 | }; | ||
49 | |||
50 | struct host1x_hwctx_handler { | ||
51 | struct nvhost_hwctx_handler h; | ||
52 | |||
53 | u32 syncpt; | ||
54 | u32 waitbase; | ||
55 | u32 restore_size; | ||
56 | u32 restore_incrs; | ||
57 | struct nvmap_handle_ref *save_buf; | ||
58 | u32 save_incrs; | ||
59 | u32 save_thresh; | ||
60 | u32 save_slots; | ||
61 | phys_addr_t save_phys; | ||
62 | u32 save_size; | ||
63 | }; | ||
64 | |||
65 | #endif | ||