Home
last modified time | relevance | path

Searched refs:msm_obj (Results 1 – 7 of 7) sorted by relevance

/Linux-v5.4/drivers/gpu/drm/msm/
Dmsm_gem.c25 struct msm_gem_object *msm_obj = to_msm_bo(obj); in physaddr() local
27 return (((dma_addr_t)msm_obj->vram_node->start) << PAGE_SHIFT) + in physaddr()
33 struct msm_gem_object *msm_obj = to_msm_bo(obj); in use_pages() local
34 return !msm_obj->vram_node; in use_pages()
51 static void sync_for_device(struct msm_gem_object *msm_obj) in sync_for_device() argument
53 struct device *dev = msm_obj->base.dev->dev; in sync_for_device()
56 dma_sync_sg_for_device(dev, msm_obj->sgt->sgl, in sync_for_device()
57 msm_obj->sgt->nents, DMA_BIDIRECTIONAL); in sync_for_device()
59 dma_map_sg(dev, msm_obj->sgt->sgl, in sync_for_device()
60 msm_obj->sgt->nents, DMA_BIDIRECTIONAL); in sync_for_device()
[all …]
Dmsm_gem_shrinker.c46 struct msm_gem_object *msm_obj; in msm_gem_shrinker_count() local
53 list_for_each_entry(msm_obj, &priv->inactive_list, mm_list) { in msm_gem_shrinker_count()
54 if (is_purgeable(msm_obj)) in msm_gem_shrinker_count()
55 count += msm_obj->base.size >> PAGE_SHIFT; in msm_gem_shrinker_count()
70 struct msm_gem_object *msm_obj; in msm_gem_shrinker_scan() local
77 list_for_each_entry(msm_obj, &priv->inactive_list, mm_list) { in msm_gem_shrinker_scan()
80 if (is_purgeable(msm_obj)) { in msm_gem_shrinker_scan()
81 msm_gem_purge(&msm_obj->base, OBJ_LOCK_SHRINKER); in msm_gem_shrinker_scan()
82 freed += msm_obj->base.size >> PAGE_SHIFT; in msm_gem_shrinker_scan()
101 struct msm_gem_object *msm_obj; in msm_gem_shrinker_vmap() local
[all …]
Dmsm_gem.h88 static inline bool is_active(struct msm_gem_object *msm_obj) in is_active() argument
90 return msm_obj->gpu != NULL; in is_active()
93 static inline bool is_purgeable(struct msm_gem_object *msm_obj) in is_purgeable() argument
95 WARN_ON(!mutex_is_locked(&msm_obj->base.dev->struct_mutex)); in is_purgeable()
96 return (msm_obj->madv == MSM_MADV_DONTNEED) && msm_obj->sgt && in is_purgeable()
97 !msm_obj->base.dma_buf && !msm_obj->base.import_attach; in is_purgeable()
100 static inline bool is_vunmapable(struct msm_gem_object *msm_obj) in is_vunmapable() argument
102 return (msm_obj->vmap_count == 0) && msm_obj->vaddr; in is_vunmapable()
Dmsm_gem_submit.c115 struct msm_gem_object *msm_obj; in submit_lookup_objects() local
127 msm_obj = to_msm_bo(obj); in submit_lookup_objects()
129 if (!list_empty(&msm_obj->submit_entry)) { in submit_lookup_objects()
138 submit->bos[i].obj = msm_obj; in submit_lookup_objects()
140 list_add_tail(&msm_obj->submit_entry, &submit->bo_list); in submit_lookup_objects()
155 struct msm_gem_object *msm_obj = submit->bos[i].obj; in submit_unlock_unpin_bo() local
158 msm_gem_unpin_iova(&msm_obj->base, submit->aspace); in submit_unlock_unpin_bo()
161 ww_mutex_unlock(&msm_obj->base.resv->lock); in submit_unlock_unpin_bo()
176 struct msm_gem_object *msm_obj = submit->bos[i].obj; in submit_lock_objects() local
184 ret = ww_mutex_lock_interruptible(&msm_obj->base.resv->lock, in submit_lock_objects()
[all …]
Dmsm_gem_prime.c16 struct msm_gem_object *msm_obj = to_msm_bo(obj); in msm_gem_prime_get_sg_table() local
19 if (WARN_ON(!msm_obj->pages)) /* should have already pinned! */ in msm_gem_prime_get_sg_table()
22 return drm_prime_pages_to_sg(msm_obj->pages, npages); in msm_gem_prime_get_sg_table()
Dmsm_gpu.c674 struct msm_gem_object *msm_obj = submit->bos[i].obj; in retire_submit() local
676 msm_gem_move_to_inactive(&msm_obj->base); in retire_submit()
677 msm_gem_unpin_iova(&msm_obj->base, submit->aspace); in retire_submit()
678 drm_gem_object_put(&msm_obj->base); in retire_submit()
751 struct msm_gem_object *msm_obj = submit->bos[i].obj; in msm_gpu_submit() local
757 WARN_ON(is_active(msm_obj) && (msm_obj->gpu != gpu)); in msm_gpu_submit()
760 drm_gem_object_get(&msm_obj->base); in msm_gpu_submit()
761 msm_gem_get_and_pin_iova(&msm_obj->base, submit->aspace, &iova); in msm_gpu_submit()
764 msm_gem_move_to_active(&msm_obj->base, gpu, true, submit->fence); in msm_gpu_submit()
766 msm_gem_move_to_active(&msm_obj->base, gpu, false, submit->fence); in msm_gpu_submit()
Dmsm_drv.c789 struct msm_gem_object *msm_obj; in msm_ioctl_gem_info() local
813 msm_obj = to_msm_bo(obj); in msm_ioctl_gem_info()
824 if (args->len >= sizeof(msm_obj->name)) { in msm_ioctl_gem_info()
828 if (copy_from_user(msm_obj->name, u64_to_user_ptr(args->value), in msm_ioctl_gem_info()
830 msm_obj->name[0] = '\0'; in msm_ioctl_gem_info()
834 msm_obj->name[args->len] = '\0'; in msm_ioctl_gem_info()
836 if (!isprint(msm_obj->name[i])) { in msm_ioctl_gem_info()
837 msm_obj->name[i] = '\0'; in msm_ioctl_gem_info()
843 if (args->value && (args->len < strlen(msm_obj->name))) { in msm_ioctl_gem_info()
847 args->len = strlen(msm_obj->name); in msm_ioctl_gem_info()
[all …]