| /linux/drivers/gpu/drm/loongson/ |
| H A D | lsdc_gem.c | 150 struct drm_gem_object *gobj; in lsdc_gem_object_create() local 165 gobj = &lbo->tbo.base; in lsdc_gem_object_create() 166 gobj->funcs = &lsdc_gem_object_funcs; in lsdc_gem_object_create() 173 return gobj; in lsdc_gem_object_create() 183 struct drm_gem_object *gobj; in lsdc_prime_import_sg_table() local 187 gobj = lsdc_gem_object_create(ddev, LSDC_GEM_DOMAIN_GTT, size, false, in lsdc_prime_import_sg_table() 191 if (IS_ERR(gobj)) { in lsdc_prime_import_sg_table() 193 return gobj; in lsdc_prime_import_sg_table() 196 lbo = gem_to_lsdc_bo(gobj); in lsdc_prime_import_sg_table() 199 return gobj; in lsdc_prime_import_sg_table() [all …]
|
| /linux/drivers/gpu/drm/tests/ |
| H A D | drm_exec_test.c | 57 struct drm_gem_object gobj = { }; in test_lock() local 61 drm_gem_private_object_init(priv->drm, &gobj, PAGE_SIZE); in test_lock() 65 ret = drm_exec_lock_obj(&exec, &gobj); in test_lock() 77 struct drm_gem_object gobj = { }; in test_lock_unlock() local 81 drm_gem_private_object_init(priv->drm, &gobj, PAGE_SIZE); in test_lock_unlock() 85 ret = drm_exec_lock_obj(&exec, &gobj); in test_lock_unlock() 91 drm_exec_unlock_obj(&exec, &gobj); in test_lock_unlock() 92 ret = drm_exec_lock_obj(&exec, &gobj); in test_lock_unlock() 104 struct drm_gem_object gobj = { }; in test_duplicates() local 108 drm_gem_private_object_init(priv->drm, &gobj, PAGE_SIZE); in test_duplicates() [all …]
|
| /linux/drivers/gpu/drm/radeon/ |
| H A D | radeon_fbdev.c | 41 static void radeon_fbdev_destroy_pinned_object(struct drm_gem_object *gobj) in radeon_fbdev_destroy_pinned_object() argument 43 struct radeon_bo *rbo = gem_to_radeon_bo(gobj); in radeon_fbdev_destroy_pinned_object() 52 drm_gem_object_put(gobj); in radeon_fbdev_destroy_pinned_object() 61 struct drm_gem_object *gobj = NULL; in radeon_fbdev_create_pinned_object() local 82 0, true, &gobj); in radeon_fbdev_create_pinned_object() 87 rbo = gem_to_radeon_bo(gobj); in radeon_fbdev_create_pinned_object() 131 *gobj_p = gobj; in radeon_fbdev_create_pinned_object() 135 radeon_fbdev_destroy_pinned_object(gobj); in radeon_fbdev_create_pinned_object() 175 struct drm_gem_object *gobj = drm_gem_fb_get_obj(fb, 0); in radeon_fbdev_fb_destroy() local 182 radeon_fbdev_destroy_pinned_object(gobj); in radeon_fbdev_fb_destroy() [all …]
|
| H A D | radeon_prime.c | 94 struct dma_buf *radeon_gem_prime_export(struct drm_gem_object *gobj, in radeon_gem_prime_export() argument 97 struct radeon_bo *bo = gem_to_radeon_bo(gobj); in radeon_gem_prime_export() 100 return drm_gem_prime_export(gobj, flags); in radeon_gem_prime_export()
|
| H A D | radeon_prime.h | 29 struct dma_buf *radeon_gem_prime_export(struct drm_gem_object *gobj,
|
| /linux/drivers/accel/amdxdna/ |
| H A D | amdxdna_gem.c | 254 static void amdxdna_gem_dev_obj_free(struct drm_gem_object *gobj) in amdxdna_gem_dev_obj_free() argument 256 struct amdxdna_dev *xdna = to_xdna_dev(gobj->dev); in amdxdna_gem_dev_obj_free() 257 struct amdxdna_gem_obj *abo = to_xdna_obj(gobj); in amdxdna_gem_dev_obj_free() 264 drm_gem_object_release(gobj); in amdxdna_gem_dev_obj_free() 324 static int amdxdna_gem_obj_mmap(struct drm_gem_object *gobj, in amdxdna_gem_obj_mmap() argument 327 struct amdxdna_dev *xdna = to_xdna_dev(gobj->dev); in amdxdna_gem_obj_mmap() 328 struct amdxdna_gem_obj *abo = to_xdna_obj(gobj); in amdxdna_gem_obj_mmap() 342 drm_vma_node_offset_addr(&gobj->vma_node), abo->type, in amdxdna_gem_obj_mmap() 343 vma->vm_start, gobj->size); in amdxdna_gem_obj_mmap() 353 struct drm_gem_object *gobj = dma_buf->priv; in amdxdna_gem_dmabuf_mmap() local [all …]
|
| H A D | amdxdna_ctx.c | 364 struct drm_gem_object *gobj; in amdxdna_hwctx_sync_debug_bo() local 370 gobj = drm_gem_object_lookup(client->filp, debug_bo_hdl); in amdxdna_hwctx_sync_debug_bo() 371 if (!gobj) in amdxdna_hwctx_sync_debug_bo() 374 abo = to_xdna_obj(gobj); in amdxdna_hwctx_sync_debug_bo() 385 drm_gem_object_put(gobj); in amdxdna_hwctx_sync_debug_bo() 406 struct drm_gem_object *gobj; in amdxdna_arg_bos_lookup() local 413 gobj = drm_gem_object_lookup(client->filp, bo_hdls[i]); in amdxdna_arg_bos_lookup() 414 if (!gobj) { in amdxdna_arg_bos_lookup() 418 abo = to_xdna_obj(gobj); in amdxdna_arg_bos_lookup() 423 job->bos[i] = gobj; in amdxdna_arg_bos_lookup() [all …]
|
| H A D | amdxdna_gem.h | 54 static inline struct amdxdna_gem_obj *to_xdna_obj(struct drm_gem_object *gobj) in to_xdna_obj() argument 56 return container_of(gobj, struct amdxdna_gem_obj, base.base); in to_xdna_obj()
|
| /linux/drivers/gpu/drm/amd/amdgpu/ |
| H A D | amdgpu_gem.c | 155 static void amdgpu_gem_object_free(struct drm_gem_object *gobj) in amdgpu_gem_object_free() argument 157 struct amdgpu_bo *aobj = gem_to_amdgpu_bo(gobj); in amdgpu_gem_object_free() 206 struct drm_gem_object *gobj; in amdgpu_gem_force_release() local 211 idr_for_each_entry(&file->object_idr, gobj, handle) { in amdgpu_gem_force_release() 213 drm_gem_object_put(gobj); in amdgpu_gem_force_release() 412 struct drm_gem_object *gobj; in amdgpu_gem_create_ioctl() local 457 flags, ttm_bo_type_device, resv, &gobj, fpriv->xcp_id + 1); in amdgpu_gem_create_ioctl() 474 struct amdgpu_bo *abo = gem_to_amdgpu_bo(gobj); in amdgpu_gem_create_ioctl() 483 r = drm_gem_handle_create(filp, gobj, &handle); in amdgpu_gem_create_ioctl() 485 drm_gem_object_put(gobj); in amdgpu_gem_create_ioctl() [all …]
|
| H A D | amdgpu_dma_buf.c | 378 struct dma_buf *amdgpu_gem_prime_export(struct drm_gem_object *gobj, in amdgpu_gem_prime_export() argument 381 struct amdgpu_bo *bo = gem_to_amdgpu_bo(gobj); in amdgpu_gem_prime_export() 400 buf = drm_gem_prime_export(gobj, flags); in amdgpu_gem_prime_export() 424 struct drm_gem_object *gobj; in amdgpu_dma_buf_create_obj() local 442 ttm_bo_type_sg, resv, &gobj, 0); in amdgpu_dma_buf_create_obj() 446 bo = gem_to_amdgpu_bo(gobj); in amdgpu_dma_buf_create_obj() 451 return gobj; in amdgpu_dma_buf_create_obj() 597 struct drm_gem_object *gobj; in amdgpu_dmabuf_is_xgmi_accessible() local 609 gobj = dma_buf->priv; in amdgpu_dmabuf_is_xgmi_accessible() 610 bo = gem_to_amdgpu_bo(gobj); in amdgpu_dmabuf_is_xgmi_accessible()
|
| H A D | amdgpu_bo_list.c | 91 struct drm_gem_object *gobj; in amdgpu_bo_list_create() local 95 gobj = drm_gem_object_lookup(filp, info[i].bo_handle); in amdgpu_bo_list_create() 96 if (!gobj) { in amdgpu_bo_list_create() 101 bo = amdgpu_bo_ref(gem_to_amdgpu_bo(gobj)); in amdgpu_bo_list_create() 102 drm_gem_object_put(gobj); in amdgpu_bo_list_create()
|
| H A D | amdgpu_gem.h | 34 #define gem_to_amdgpu_bo(gobj) container_of((gobj), struct amdgpu_bo, tbo.base) argument
|
| H A D | amdgpu_amdkfd_gpuvm.c | 841 struct drm_gem_object *gobj; in kfd_mem_attach_dmabuf() local 848 gobj = amdgpu_gem_prime_import(adev_to_drm(adev), mem->dmabuf); in kfd_mem_attach_dmabuf() 849 if (IS_ERR(gobj)) in kfd_mem_attach_dmabuf() 850 return PTR_ERR(gobj); in kfd_mem_attach_dmabuf() 852 *bo = gem_to_amdgpu_bo(gobj); in kfd_mem_attach_dmabuf() 1720 struct drm_gem_object *gobj = NULL; in amdgpu_amdkfd_gpuvm_alloc_memory_of_gpu() local 1813 bo_type, NULL, &gobj, xcp_id + 1); in amdgpu_amdkfd_gpuvm_alloc_memory_of_gpu() 1819 ret = drm_vma_node_allow(&gobj->vma_node, drm_priv); in amdgpu_amdkfd_gpuvm_alloc_memory_of_gpu() 1824 ret = drm_gem_handle_create(adev->kfd.client.file, gobj, &(*mem)->gem_handle); in amdgpu_amdkfd_gpuvm_alloc_memory_of_gpu() 1827 bo = gem_to_amdgpu_bo(gobj); in amdgpu_amdkfd_gpuvm_alloc_memory_of_gpu() [all …]
|
| H A D | amdgpu_dma_buf.h | 28 struct dma_buf *amdgpu_gem_prime_export(struct drm_gem_object *gobj,
|
| H A D | amdgpu_cs.c | 130 struct drm_gem_object *gobj; in amdgpu_cs_p1_user_fence() local 133 gobj = drm_gem_object_lookup(p->filp, data->handle); in amdgpu_cs_p1_user_fence() 134 if (gobj == NULL) in amdgpu_cs_p1_user_fence() 137 p->uf_bo = amdgpu_bo_ref(gem_to_amdgpu_bo(gobj)); in amdgpu_cs_p1_user_fence() 138 drm_gem_object_put(gobj); in amdgpu_cs_p1_user_fence() 1289 struct drm_gem_object *gobj; in amdgpu_cs_submit() local 1340 drm_exec_for_each_locked_object(&p->exec, index, gobj) { in amdgpu_cs_submit() 1342 ttm_bo_move_to_lru_tail_unlocked(&gem_to_amdgpu_bo(gobj)->tbo); in amdgpu_cs_submit() 1349 dma_resv_add_fence(gobj->resv, in amdgpu_cs_submit() 1355 dma_resv_add_fence(gobj->resv, p->fence, DMA_RESV_USAGE_WRITE); in amdgpu_cs_submit()
|
| /linux/include/media/ |
| H A D | media-entity.h | 441 static inline enum media_gobj_type media_type(struct media_gobj *gobj) in media_type() argument 443 return gobj->id >> MEDIA_BITS_PER_ID; in media_type() 451 static inline u32 media_id(struct media_gobj *gobj) in media_id() argument 453 return gobj->id & MEDIA_ID_MASK; in media_id() 629 #define gobj_to_entity(gobj) \ argument 630 container_of_const(gobj, struct media_entity, graph_obj) 638 #define gobj_to_pad(gobj) \ argument 639 container_of_const(gobj, struct media_pad, graph_obj) 647 #define gobj_to_link(gobj) \ argument 648 container_of_const(gobj, struct media_link, graph_obj) [all …]
|
| /linux/drivers/gpu/drm/qxl/ |
| H A D | qxl_gem.c | 32 void qxl_gem_object_free(struct drm_gem_object *gobj) in qxl_gem_object_free() argument 34 struct qxl_bo *qobj = gem_to_qxl_bo(gobj); in qxl_gem_object_free() 38 qdev = to_qxl(gobj->dev); in qxl_gem_object_free() 87 struct drm_gem_object **gobj, in qxl_gem_object_create_with_handle() argument 105 if (gobj) in qxl_gem_object_create_with_handle() 106 *gobj = local_gobj; in qxl_gem_object_create_with_handle()
|
| H A D | qxl_dumb.c | 37 struct drm_gem_object *gobj; in qxl_mode_dumb_create() local 66 args->size, &surf, &gobj, in qxl_mode_dumb_create() 70 qobj = gem_to_qxl_bo(gobj); in qxl_mode_dumb_create() 72 drm_gem_object_put(gobj); in qxl_mode_dumb_create()
|
| H A D | qxl_ioctl.c | 116 struct drm_gem_object *gobj; in qxlhw_handle_to_bo() local 120 gobj = drm_gem_object_lookup(file_priv, handle); in qxlhw_handle_to_bo() 121 if (!gobj) in qxlhw_handle_to_bo() 124 qobj = gem_to_qxl_bo(gobj); in qxlhw_handle_to_bo() 127 drm_gem_object_put(gobj); in qxlhw_handle_to_bo() 304 struct drm_gem_object *gobj = NULL; in qxl_update_area_ioctl() local 312 gobj = drm_gem_object_lookup(file, update_area->handle); in qxl_update_area_ioctl() 313 if (gobj == NULL) in qxl_update_area_ioctl() 316 qobj = gem_to_qxl_bo(gobj); in qxl_update_area_ioctl() 340 drm_gem_object_put(gobj); in qxl_update_area_ioctl()
|
| H A D | qxl_drv.h | 94 #define gem_to_qxl_bo(gobj) container_of((gobj), struct qxl_bo, tbo.base) argument 310 struct drm_gem_object **gobj, 312 void qxl_gem_object_free(struct drm_gem_object *gobj);
|
| /linux/drivers/media/mc/ |
| H A D | mc-entity.c | 93 static void dev_dbg_obj(const char *event_name, struct media_gobj *gobj) in dev_dbg_obj() argument 96 switch (media_type(gobj)) { in dev_dbg_obj() 98 dev_dbg(gobj->mdev->dev, in dev_dbg_obj() 100 event_name, media_id(gobj), in dev_dbg_obj() 101 gobj_to_entity(gobj)->name); in dev_dbg_obj() 105 struct media_link *link = gobj_to_link(gobj); in dev_dbg_obj() 107 dev_dbg(gobj->mdev->dev, in dev_dbg_obj() 109 event_name, media_id(gobj), link_type_name(link), in dev_dbg_obj() 116 struct media_pad *pad = gobj_to_pad(gobj); in dev_dbg_obj() 118 dev_dbg(gobj->mdev->dev, in dev_dbg_obj() [all …]
|
| /linux/drivers/gpu/drm/nouveau/ |
| H A D | nouveau_prime.c | 107 struct dma_buf *nouveau_gem_prime_export(struct drm_gem_object *gobj, in nouveau_gem_prime_export() argument 110 struct nouveau_bo *nvbo = nouveau_gem_object(gobj); in nouveau_gem_prime_export() 127 return drm_gem_prime_export(gobj, flags); in nouveau_gem_prime_export()
|
| /linux/drivers/gpu/drm/vmwgfx/ |
| H A D | vmwgfx_gem.c | 36 static void vmw_gem_object_free(struct drm_gem_object *gobj) in vmw_gem_object_free() argument 38 struct ttm_buffer_object *bo = drm_gem_ttm_of_gem(gobj); in vmw_gem_object_free() 307 struct drm_gem_object *gobj; in vmw_debugfs_gem_info_show() local 325 idr_for_each_entry(&file->object_idr, gobj, id) { in vmw_debugfs_gem_info_show() 326 struct vmw_bo *bo = to_vmw_bo(gobj); in vmw_debugfs_gem_info_show()
|
| H A D | vmwgfx_bo.h | 231 static inline struct vmw_bo *to_vmw_bo(struct drm_gem_object *gobj) in to_vmw_bo() argument 233 return container_of((gobj), struct vmw_bo, tbo.base); in to_vmw_bo()
|
| /linux/drivers/gpu/drm/virtio/ |
| H A D | virtgpu_ioctl.c | 205 struct drm_gem_object *gobj = NULL; in virtio_gpu_resource_info_ioctl() local 208 gobj = drm_gem_object_lookup(file, ri->bo_handle); in virtio_gpu_resource_info_ioctl() 209 if (gobj == NULL) in virtio_gpu_resource_info_ioctl() 212 qobj = gem_to_virtio_gpu_obj(gobj); in virtio_gpu_resource_info_ioctl() 219 drm_gem_object_put(gobj); in virtio_gpu_resource_info_ioctl()
|