/third_party/mesa3d/src/drm-shim/ |
D | device.c | 112 static struct shim_fd * 115 struct shim_fd *shim_fd = calloc(1, sizeof(*shim_fd)); in drm_shim_file_create() local 117 shim_fd->fd = fd; in drm_shim_file_create() 118 mtx_init(&shim_fd->handle_lock, mtx_plain); in drm_shim_file_create() 119 shim_fd->handles = _mesa_hash_table_create(NULL, in drm_shim_file_create() 123 return shim_fd; in drm_shim_file_create() 130 void drm_shim_fd_register(int fd, struct shim_fd *shim_fd) in drm_shim_fd_register() argument 132 if (!shim_fd) in drm_shim_fd_register() 133 shim_fd = drm_shim_file_create(fd); in drm_shim_fd_register() 135 _mesa_hash_table_insert(shim_device.fd_map, (void *)(uintptr_t)(fd + 1), shim_fd); in drm_shim_fd_register() [all …]
|
D | drm_shim.h | 63 struct shim_fd { struct 82 void drm_shim_fd_register(int fd, struct shim_fd *shim_fd); argument 83 struct shim_fd *drm_shim_fd_lookup(int fd); 85 void *drm_shim_mmap(struct shim_fd *shim_fd, size_t length, int prot, int flags, 91 struct shim_bo *drm_shim_bo_lookup(struct shim_fd *shim_fd, int handle); 92 int drm_shim_bo_get_handle(struct shim_fd *shim_fd, struct shim_bo *bo); 93 uint64_t drm_shim_bo_get_mmap_offset(struct shim_fd *shim_fd,
|
D | drm_shim.c | 367 struct shim_fd *shim_fd = drm_shim_fd_lookup(fd); in __fxstat() local 369 if (!shim_fd) in __fxstat() 383 struct shim_fd *shim_fd = drm_shim_fd_lookup(fd); in __fxstat64() local 385 if (!shim_fd) in __fxstat64() 467 struct shim_fd *shim_fd = drm_shim_fd_lookup(fd); in fstat() local 469 if (!shim_fd) in fstat() 483 struct shim_fd *shim_fd = drm_shim_fd_lookup(fd); in fstat64() local 485 if (!shim_fd) in fstat64() 650 struct shim_fd *shim_fd = drm_shim_fd_lookup(fd); in ioctl() local 651 if (!shim_fd) in ioctl() [all …]
|
/third_party/mesa3d/src/broadcom/drm-shim/ |
D | v3d.c | 38 struct v3d_bo *v3d_bo_lookup(struct shim_fd *shim_fd, int handle) in v3d_bo_lookup() argument 40 return v3d_bo(drm_shim_bo_lookup(shim_fd, handle)); in v3d_bo_lookup() 55 struct shim_fd *shim_fd = drm_shim_fd_lookup(fd); in v3d_ioctl_mmap_bo() local 57 struct shim_bo *bo = drm_shim_bo_lookup(shim_fd, map->handle); in v3d_ioctl_mmap_bo() 59 map->offset = drm_shim_bo_get_mmap_offset(shim_fd, bo); in v3d_ioctl_mmap_bo() 69 struct shim_fd *shim_fd = drm_shim_fd_lookup(fd); in v3d_ioctl_get_bo_offset() local 71 struct v3d_bo *bo = v3d_bo_lookup(shim_fd, get->handle); in v3d_ioctl_get_bo_offset()
|
D | v3dx.c | 107 v3d_simulator_copy_in_handle(struct shim_fd *shim_fd, int handle) in v3d_simulator_copy_in_handle() argument 112 struct v3d_bo *bo = v3d_bo_lookup(shim_fd, handle); in v3d_simulator_copy_in_handle() 118 v3d_simulator_copy_out_handle(struct shim_fd *shim_fd, int handle) in v3d_simulator_copy_out_handle() argument 123 struct v3d_bo *bo = v3d_bo_lookup(shim_fd, handle); in v3d_simulator_copy_out_handle() 131 struct shim_fd *shim_fd = drm_shim_fd_lookup(fd); in v3dX() local 136 v3d_simulator_copy_in_handle(shim_fd, bo_handles[i]); in v3dX() 178 v3d_simulator_copy_out_handle(shim_fd, bo_handles[i]); in v3dX() 186 struct shim_fd *shim_fd = drm_shim_fd_lookup(fd); in v3dX() local 189 v3d_simulator_copy_in_handle(shim_fd, submit->bo_handles[0]); in v3dX() 190 v3d_simulator_copy_in_handle(shim_fd, submit->bo_handles[1]); in v3dX() [all …]
|
D | v3d_noop.c | 61 struct shim_fd *shim_fd = drm_shim_fd_lookup(fd); in v3d_ioctl_create_bo() local 72 create->handle = drm_shim_bo_get_handle(shim_fd, &bo->base); in v3d_ioctl_create_bo() 82 struct shim_fd *shim_fd = drm_shim_fd_lookup(fd); in v3d_ioctl_get_bo_offset() local 84 struct shim_bo *bo = drm_shim_bo_lookup(shim_fd, args->handle); in v3d_ioctl_get_bo_offset() 96 struct shim_fd *shim_fd = drm_shim_fd_lookup(fd); in v3d_ioctl_mmap_bo() local 98 struct shim_bo *bo = drm_shim_bo_lookup(shim_fd, map->handle); in v3d_ioctl_mmap_bo() 100 map->offset = drm_shim_bo_get_mmap_offset(shim_fd, bo); in v3d_ioctl_mmap_bo()
|
D | vc4_noop.c | 42 struct shim_fd *shim_fd = drm_shim_fd_lookup(fd); in vc4_ioctl_create_bo() local 47 create->handle = drm_shim_bo_get_handle(shim_fd, bo); in vc4_ioctl_create_bo() 56 struct shim_fd *shim_fd = drm_shim_fd_lookup(fd); in vc4_ioctl_mmap_bo() local 58 struct shim_bo *bo = drm_shim_bo_lookup(shim_fd, map->handle); in vc4_ioctl_mmap_bo() 60 map->offset = drm_shim_bo_get_mmap_offset(shim_fd, bo); in vc4_ioctl_mmap_bo()
|
D | v3d.h | 61 struct v3d_bo *v3d_bo_lookup(struct shim_fd *shim_fd, int handle);
|
/third_party/mesa3d/src/nouveau/drm-shim/ |
D | nouveau_noop.c | 69 struct shim_fd *shim_fd = drm_shim_fd_lookup(fd); in nouveau_ioctl_gem_new() local 77 create->info.handle = drm_shim_bo_get_handle(shim_fd, &bo->base); in nouveau_ioctl_gem_new() 78 create->info.map_handle = drm_shim_bo_get_mmap_offset(shim_fd, &bo->base); in nouveau_ioctl_gem_new() 95 struct shim_fd *shim_fd = drm_shim_fd_lookup(fd); in nouveau_ioctl_gem_info() local 98 nouveau_shim_bo(drm_shim_bo_lookup(shim_fd, info->handle)); in nouveau_ioctl_gem_info() 99 info->map_handle = drm_shim_bo_get_mmap_offset(shim_fd, &bo->base); in nouveau_ioctl_gem_info() 120 struct shim_fd *shim_fd = drm_shim_fd_lookup(fd); in nouveau_ioctl_channel_alloc() local 134 alloc->notifier_handle = drm_shim_bo_get_handle(shim_fd, ¬ify->base); in nouveau_ioctl_channel_alloc()
|
/third_party/mesa3d/src/gallium/drivers/lima/drm-shim/ |
D | lima_noop.c | 64 struct shim_fd *shim_fd = drm_shim_fd_lookup(fd); in lima_ioctl_gem_create() local 70 create->handle = drm_shim_bo_get_handle(shim_fd, bo); in lima_ioctl_gem_create() 82 struct shim_fd *shim_fd = drm_shim_fd_lookup(fd); in lima_ioctl_gem_info() local 83 struct shim_bo *bo = drm_shim_bo_lookup(shim_fd, gem_info->handle); in lima_ioctl_gem_info() 86 gem_info->offset = drm_shim_bo_get_mmap_offset(shim_fd, bo); in lima_ioctl_gem_info()
|
/third_party/mesa3d/src/panfrost/drm-shim/ |
D | panfrost_noop.c | 78 struct shim_fd *shim_fd = drm_shim_fd_lookup(fd); in pan_ioctl_create_bo() local 84 create->handle = drm_shim_bo_get_handle(shim_fd, bo); in pan_ioctl_create_bo() 97 struct shim_fd *shim_fd = drm_shim_fd_lookup(fd); in pan_ioctl_mmap_bo() local 98 struct shim_bo *bo = drm_shim_bo_lookup(shim_fd, mmap_bo->handle); in pan_ioctl_mmap_bo() 100 mmap_bo->offset = drm_shim_bo_get_mmap_offset(shim_fd, bo); in pan_ioctl_mmap_bo()
|
/third_party/mesa3d/src/etnaviv/drm-shim/ |
D | etnaviv_noop.c | 164 struct shim_fd *shim_fd = drm_shim_fd_lookup(fd); in etnaviv_ioctl_gem_new() local 169 create->handle = drm_shim_bo_get_handle(shim_fd, bo); in etnaviv_ioctl_gem_new() 178 struct shim_fd *shim_fd = drm_shim_fd_lookup(fd); in etnaviv_ioctl_gem_info() local 180 struct shim_bo *bo = drm_shim_bo_lookup(shim_fd, args->handle); in etnaviv_ioctl_gem_info() 182 args->offset = drm_shim_bo_get_mmap_offset(shim_fd, bo); in etnaviv_ioctl_gem_info()
|
/third_party/mesa3d/src/intel/tools/ |
D | intel_noop_drm_shim.c | 64 struct shim_fd *shim_fd = drm_shim_fd_lookup(fd); in i915_ioctl_gem_create() local 70 create->handle = drm_shim_bo_get_handle(shim_fd, &bo->base); in i915_ioctl_gem_create() 80 struct shim_fd *shim_fd = drm_shim_fd_lookup(fd); in i915_ioctl_gem_mmap() local 82 struct shim_bo *bo = drm_shim_bo_lookup(shim_fd, mmap_arg->handle); in i915_ioctl_gem_mmap() 88 … bo->map = drm_shim_mmap(shim_fd, bo->size, PROT_READ | PROT_WRITE, MAP_SHARED, -1, (uintptr_t)bo); in i915_ioctl_gem_mmap() 98 struct shim_fd *shim_fd = drm_shim_fd_lookup(fd); in i915_ioctl_gem_userptr() local 104 userptr->handle = drm_shim_bo_get_handle(shim_fd, &bo->base); in i915_ioctl_gem_userptr()
|
/third_party/mesa3d/src/freedreno/drm-shim/ |
D | freedreno_noop.c | 71 struct shim_fd *shim_fd = drm_shim_fd_lookup(fd); in msm_ioctl_gem_new() local 83 create->handle = drm_shim_bo_get_handle(shim_fd, &bo->base); in msm_ioctl_gem_new() 93 struct shim_fd *shim_fd = drm_shim_fd_lookup(fd); in msm_ioctl_gem_info() local 95 struct shim_bo *bo = drm_shim_bo_lookup(shim_fd, args->handle); in msm_ioctl_gem_info() 99 args->value = drm_shim_bo_get_mmap_offset(shim_fd, bo); in msm_ioctl_gem_info()
|
/third_party/mesa3d/docs/relnotes/ |
D | 20.2.0.rst | 3066 - drm-shim: move handle lock to shim_fd
|