1 #ifndef NOUVEAU_DEVICE 2 #define NOUVEAU_DEVICE 1 3 4 #include "nouveau_private.h" 5 #include "nv_device_info.h" 6 #include "util/simple_mtx.h" 7 8 #include <stddef.h> 9 10 struct _drmDevice; 11 struct hash_table; 12 13 #ifdef __cplusplus 14 extern "C" { 15 #endif 16 17 #define NOUVEAU_WS_DEVICE_KERNEL_RESERVATION_START (1ull << 39) 18 19 struct nouveau_ws_device { 20 int fd; 21 22 struct nv_device_info info; 23 24 uint32_t max_push; 25 26 simple_mtx_t bos_lock; 27 struct hash_table *bos; 28 29 bool has_vm_bind; 30 }; 31 32 struct nouveau_ws_device *nouveau_ws_device_new(struct _drmDevice *drm_device); 33 void nouveau_ws_device_destroy(struct nouveau_ws_device *); 34 35 uint64_t nouveau_ws_device_vram_used(struct nouveau_ws_device *); 36 uint64_t nouveau_ws_device_timestamp(struct nouveau_ws_device *device); 37 bool nouveau_ws_device_has_tiled_bo(struct nouveau_ws_device *device); 38 39 #ifdef __cplusplus 40 } 41 #endif 42 43 #endif 44