Lines Matching refs:bo

70     struct radeon_bo_gem *bo;  in bo_open()  local
73 bo = (struct radeon_bo_gem*)calloc(1, sizeof(struct radeon_bo_gem)); in bo_open()
74 if (bo == NULL) { in bo_open()
78 bo->base.bom = bom; in bo_open()
79 bo->base.handle = 0; in bo_open()
80 bo->base.size = size; in bo_open()
81 bo->base.alignment = alignment; in bo_open()
82 bo->base.domains = domains; in bo_open()
83 bo->base.flags = flags; in bo_open()
84 bo->base.ptr = NULL; in bo_open()
85 atomic_set(&bo->reloc_in_cs, 0); in bo_open()
86 bo->map_count = 0; in bo_open()
94 free(bo); in bo_open()
97 bo->base.handle = open_arg.handle; in bo_open()
98 bo->base.size = open_arg.size; in bo_open()
99 bo->name = handle; in bo_open()
105 args.initial_domain = bo->base.domains; in bo_open()
110 bo->base.handle = args.handle; in bo_open()
115 fprintf(stderr, " domains : %d\n", bo->base.domains); in bo_open()
116 free(bo); in bo_open()
120 radeon_bo_ref((struct radeon_bo*)bo); in bo_open()
121 return (struct radeon_bo*)bo; in bo_open()
310 radeon_gem_name_bo(struct radeon_bo *bo) in radeon_gem_name_bo() argument
312 struct radeon_bo_gem *bo_gem = (struct radeon_bo_gem*)bo; in radeon_gem_name_bo()
317 radeon_gem_get_reloc_in_cs(struct radeon_bo *bo) in radeon_gem_get_reloc_in_cs() argument
319 struct radeon_bo_gem *bo_gem = (struct radeon_bo_gem*)bo; in radeon_gem_get_reloc_in_cs()
324 radeon_gem_get_kernel_name(struct radeon_bo *bo, uint32_t *name) in radeon_gem_get_kernel_name() argument
326 struct radeon_bo_gem *bo_gem = (struct radeon_bo_gem*)bo; in radeon_gem_get_kernel_name()
327 struct radeon_bo_int *boi = (struct radeon_bo_int *)bo; in radeon_gem_get_kernel_name()
335 flink.handle = bo->handle; in radeon_gem_get_kernel_name()
346 radeon_gem_set_domain(struct radeon_bo *bo, uint32_t read_domains, uint32_t write_domain) in radeon_gem_set_domain() argument
348 struct radeon_bo_int *boi = (struct radeon_bo_int *)bo; in radeon_gem_set_domain()
352 args.handle = bo->handle; in radeon_gem_set_domain()
363 drm_public int radeon_gem_prime_share_bo(struct radeon_bo *bo, int *handle) in radeon_gem_prime_share_bo() argument
365 struct radeon_bo_gem *bo_gem = (struct radeon_bo_gem*)bo; in radeon_gem_prime_share_bo()
368 ret = drmPrimeHandleToFD(bo_gem->base.bom->fd, bo->handle, DRM_CLOEXEC, handle); in radeon_gem_prime_share_bo()
375 struct radeon_bo_gem *bo; in radeon_gem_bo_open_prime() local
379 bo = (struct radeon_bo_gem*)calloc(1, sizeof(struct radeon_bo_gem)); in radeon_gem_bo_open_prime()
380 if (bo == NULL) { in radeon_gem_bo_open_prime()
384 bo->base.bom = bom; in radeon_gem_bo_open_prime()
385 bo->base.handle = 0; in radeon_gem_bo_open_prime()
386 bo->base.size = size; in radeon_gem_bo_open_prime()
387 bo->base.alignment = 0; in radeon_gem_bo_open_prime()
388 bo->base.domains = RADEON_GEM_DOMAIN_GTT; in radeon_gem_bo_open_prime()
389 bo->base.flags = 0; in radeon_gem_bo_open_prime()
390 bo->base.ptr = NULL; in radeon_gem_bo_open_prime()
391 atomic_set(&bo->reloc_in_cs, 0); in radeon_gem_bo_open_prime()
392 bo->map_count = 0; in radeon_gem_bo_open_prime()
396 free(bo); in radeon_gem_bo_open_prime()
400 bo->base.handle = handle; in radeon_gem_bo_open_prime()
401 bo->name = handle; in radeon_gem_bo_open_prime()
403 radeon_bo_ref((struct radeon_bo *)bo); in radeon_gem_bo_open_prime()
404 return (struct radeon_bo *)bo; in radeon_gem_bo_open_prime()