Lines Matching refs:gem_obj

67 	struct drm_gem_object *gem_obj;  in __drm_gem_cma_create()  local
71 gem_obj = drm->driver->gem_create_object(drm, size); in __drm_gem_cma_create()
72 if (IS_ERR(gem_obj)) in __drm_gem_cma_create()
73 return ERR_CAST(gem_obj); in __drm_gem_cma_create()
74 cma_obj = to_drm_gem_cma_obj(gem_obj); in __drm_gem_cma_create()
79 gem_obj = &cma_obj->base; in __drm_gem_cma_create()
82 if (!gem_obj->funcs) in __drm_gem_cma_create()
83 gem_obj->funcs = &drm_gem_cma_default_funcs; in __drm_gem_cma_create()
86 drm_gem_private_object_init(drm, gem_obj, size); in __drm_gem_cma_create()
91 ret = drm_gem_object_init(drm, gem_obj, size); in __drm_gem_cma_create()
96 ret = drm_gem_create_mmap_offset(gem_obj); in __drm_gem_cma_create()
98 drm_gem_object_release(gem_obj); in __drm_gem_cma_create()
179 struct drm_gem_object *gem_obj; in drm_gem_cma_create_with_handle() local
186 gem_obj = &cma_obj->base; in drm_gem_cma_create_with_handle()
192 ret = drm_gem_handle_create(file_priv, gem_obj, handle); in drm_gem_cma_create_with_handle()
194 drm_gem_object_put(gem_obj); in drm_gem_cma_create_with_handle()
211 struct drm_gem_object *gem_obj = &cma_obj->base; in drm_gem_cma_free() local
214 if (gem_obj->import_attach) { in drm_gem_cma_free()
216 dma_buf_vunmap(gem_obj->import_attach->dmabuf, &map); in drm_gem_cma_free()
217 drm_prime_gem_destroy(gem_obj, cma_obj->sgt); in drm_gem_cma_free()
220 dma_free_noncoherent(gem_obj->dev->dev, cma_obj->base.size, in drm_gem_cma_free()
224 dma_free_wc(gem_obj->dev->dev, cma_obj->base.size, in drm_gem_cma_free()
228 drm_gem_object_release(gem_obj); in drm_gem_cma_free()