• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /****************************************************************************
2  ****************************************************************************
3  ***
4  ***   This header was automatically generated from a Linux kernel header
5  ***   of the same name, to make information necessary for userspace to
6  ***   call into the kernel available to libc.  It contains only constants,
7  ***   structures, and macros generated from the original header, and thus,
8  ***   contains no copyrightable information.
9  ***
10  ***   To edit the content of this header, modify the corresponding
11  ***   source file (e.g. under external/kernel-headers/original/) then
12  ***   run bionic/libc/kernel/tools/update_all.py
13  ***
14  ***   Any manual change here will be lost the next time this script will
15  ***   be run. You've been warned!
16  ***
17  ****************************************************************************
18  ****************************************************************************/
19 #ifndef _TTM_PLACEMENT_USER_H_
20 #define _TTM_PLACEMENT_USER_H_
21 #ifndef _KERNEL
22 #include <stdint.h>
23 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
24 #else
25 #include <linux/kernel.h>
26 #endif
27 #include "ttm/ttm_placement.h"
28 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
29 #define TTM_PLACEMENT_MAJOR 0
30 #define TTM_PLACEMENT_MINOR 1
31 #define TTM_PLACEMENT_PL 0
32 #define TTM_PLACEMENT_DATE "080819"
33 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
34 struct ttm_pl_create_req {
35  uint64_t size;
36  uint32_t placement;
37  uint32_t page_alignment;
38 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
39 };
40 struct ttm_pl_create_ub_req {
41  uint64_t size;
42  uint64_t user_address;
43  int32_t fd;
44 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
45  uint32_t placement;
46  uint32_t page_alignment;
47 };
48 struct ttm_pl_rep {
49 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
50  uint64_t gpu_offset;
51  uint64_t bo_size;
52  uint64_t map_handle;
53  uint32_t placement;
54 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
55  uint32_t handle;
56  uint32_t sync_object_arg;
57  uint32_t pad64;
58 };
59 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
60 struct ttm_pl_setstatus_req {
61  uint32_t set_placement;
62  uint32_t clr_placement;
63  uint32_t handle;
64 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
65  uint32_t pad64;
66 };
67 struct ttm_pl_reference_req {
68  uint32_t handle;
69 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
70  uint32_t pad64;
71 };
72 #define TTM_PL_SYNCCPU_MODE_READ TTM_ACCESS_READ
73 #define TTM_PL_SYNCCPU_MODE_WRITE TTM_ACCESS_WRITE
74 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
75 #define TTM_PL_SYNCCPU_MODE_NO_BLOCK (1 << 2)
76 #define TTM_PL_SYNCCPU_MODE_TRYCACHED (1 << 3)
77 struct ttm_pl_synccpu_arg {
78  uint32_t handle;
79 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
80  uint32_t access_mode;
81  enum {
82  TTM_PL_SYNCCPU_OP_GRAB,
83  TTM_PL_SYNCCPU_OP_RELEASE
84 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
85  } op;
86  uint32_t pad64;
87 };
88 #define TTM_PL_WAITIDLE_MODE_LAZY (1 << 0)
89 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
90 #define TTM_PL_WAITIDLE_MODE_NO_BLOCK (1 << 1)
91 struct ttm_pl_waitidle_arg {
92  uint32_t handle;
93  uint32_t mode;
94 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
95 };
96 union ttm_pl_create_arg {
97  struct ttm_pl_create_req req;
98  struct ttm_pl_rep rep;
99 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
100 };
101 union ttm_pl_reference_arg {
102  struct ttm_pl_reference_req req;
103  struct ttm_pl_rep rep;
104 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
105 };
106 union ttm_pl_setstatus_arg {
107  struct ttm_pl_setstatus_req req;
108  struct ttm_pl_rep rep;
109 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
110 };
111 union ttm_pl_create_ub_arg {
112  struct ttm_pl_create_ub_req req;
113  struct ttm_pl_rep rep;
114 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
115 };
116 #define TTM_PL_CREATE 0x00
117 #define TTM_PL_REFERENCE 0x01
118 #define TTM_PL_UNREF 0x02
119 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
120 #define TTM_PL_SYNCCPU 0x03
121 #define TTM_PL_WAITIDLE 0x04
122 #define TTM_PL_SETSTATUS 0x05
123 #define TTM_PL_CREATE_UB 0x06
124 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
125 #endif
126 
127