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 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 44 uint32_t placement; 45 uint32_t page_alignment; 46 }; 47 struct ttm_pl_rep { 48 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 49 uint64_t gpu_offset; 50 uint64_t bo_size; 51 uint64_t map_handle; 52 uint32_t placement; 53 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 54 uint32_t handle; 55 uint32_t sync_object_arg; 56 uint32_t pad64; 57 }; 58 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 59 struct ttm_pl_setstatus_req { 60 uint32_t set_placement; 61 uint32_t clr_placement; 62 uint32_t handle; 63 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 64 uint32_t pad64; 65 }; 66 struct ttm_pl_reference_req { 67 uint32_t handle; 68 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 69 uint32_t pad64; 70 }; 71 #define TTM_PL_SYNCCPU_MODE_READ TTM_ACCESS_READ 72 #define TTM_PL_SYNCCPU_MODE_WRITE TTM_ACCESS_WRITE 73 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 74 #define TTM_PL_SYNCCPU_MODE_NO_BLOCK (1 << 2) 75 #define TTM_PL_SYNCCPU_MODE_TRYCACHED (1 << 3) 76 struct ttm_pl_synccpu_arg { 77 uint32_t handle; 78 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 79 uint32_t access_mode; 80 enum { 81 TTM_PL_SYNCCPU_OP_GRAB, 82 TTM_PL_SYNCCPU_OP_RELEASE 83 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 84 } op; 85 uint32_t pad64; 86 }; 87 #define TTM_PL_WAITIDLE_MODE_LAZY (1 << 0) 88 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 89 #define TTM_PL_WAITIDLE_MODE_NO_BLOCK (1 << 1) 90 struct ttm_pl_waitidle_arg { 91 uint32_t handle; 92 uint32_t mode; 93 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 94 }; 95 union ttm_pl_create_arg { 96 struct ttm_pl_create_req req; 97 struct ttm_pl_rep rep; 98 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 99 }; 100 union ttm_pl_reference_arg { 101 struct ttm_pl_reference_req req; 102 struct ttm_pl_rep rep; 103 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 104 }; 105 union ttm_pl_setstatus_arg { 106 struct ttm_pl_setstatus_req req; 107 struct ttm_pl_rep rep; 108 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 109 }; 110 union ttm_pl_create_ub_arg { 111 struct ttm_pl_create_ub_req req; 112 struct ttm_pl_rep rep; 113 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 114 }; 115 #define TTM_PL_CREATE 0x00 116 #define TTM_PL_REFERENCE 0x01 117 #define TTM_PL_UNREF 0x02 118 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 119 #define TTM_PL_SYNCCPU 0x03 120 #define TTM_PL_WAITIDLE 0x04 121 #define TTM_PL_SETSTATUS 0x05 122 #define TTM_PL_CREATE_UB 0x06 123 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 124 #endif 125 126