Home
last modified time | relevance | path

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

/drivers/gpu/drm/msm/
Dmsm_gem.c26 struct msm_gem_object *msm_obj = to_msm_bo(obj); in physaddr() local
28 return (((dma_addr_t)msm_obj->vram_node->start) << PAGE_SHIFT) + in physaddr()
34 struct msm_gem_object *msm_obj = to_msm_bo(obj); in use_pages() local
35 return !msm_obj->vram_node; in use_pages()
52 static void sync_for_device(struct msm_gem_object *msm_obj) in sync_for_device() argument
54 struct device *dev = msm_obj->base.dev->dev; in sync_for_device()
56 dma_map_sgtable(dev, msm_obj->sgt, DMA_BIDIRECTIONAL, 0); in sync_for_device()
59 static void sync_for_cpu(struct msm_gem_object *msm_obj) in sync_for_cpu() argument
61 struct device *dev = msm_obj->base.dev->dev; in sync_for_cpu()
63 dma_unmap_sgtable(dev, msm_obj->sgt, DMA_BIDIRECTIONAL, 0); in sync_for_cpu()
[all …]
Dmsm_gem_shrinker.c47 struct msm_gem_object *msm_obj; in msm_gem_shrinker_count() local
54 list_for_each_entry(msm_obj, &priv->inactive_list, mm_list) { in msm_gem_shrinker_count()
55 if (is_purgeable(msm_obj)) in msm_gem_shrinker_count()
56 count += msm_obj->base.size >> PAGE_SHIFT; in msm_gem_shrinker_count()
71 struct msm_gem_object *msm_obj; in msm_gem_shrinker_scan() local
78 list_for_each_entry(msm_obj, &priv->inactive_list, mm_list) { in msm_gem_shrinker_scan()
81 if (is_purgeable(msm_obj)) { in msm_gem_shrinker_scan()
82 msm_gem_purge(&msm_obj->base, OBJ_LOCK_SHRINKER); in msm_gem_shrinker_scan()
83 freed += msm_obj->base.size >> PAGE_SHIFT; in msm_gem_shrinker_scan()
102 struct msm_gem_object *msm_obj; in msm_gem_shrinker_vmap() local
[all …]
Dmsm_gem.h96 static inline bool is_active(struct msm_gem_object *msm_obj) in is_active() argument
98 return atomic_read(&msm_obj->active_count); in is_active()
101 static inline bool is_purgeable(struct msm_gem_object *msm_obj) in is_purgeable() argument
103 WARN_ON(!mutex_is_locked(&msm_obj->base.dev->struct_mutex)); in is_purgeable()
104 return (msm_obj->madv == MSM_MADV_DONTNEED) && msm_obj->sgt && in is_purgeable()
105 !msm_obj->base.dma_buf && !msm_obj->base.import_attach; in is_purgeable()
108 static inline bool is_vunmapable(struct msm_gem_object *msm_obj) in is_vunmapable() argument
110 return (msm_obj->vmap_count == 0) && msm_obj->vaddr; in is_vunmapable()
Dmsm_gem_submit.c116 struct msm_gem_object *msm_obj; in submit_lookup_objects() local
128 msm_obj = to_msm_bo(obj); in submit_lookup_objects()
130 if (!list_empty(&msm_obj->submit_entry)) { in submit_lookup_objects()
139 submit->bos[i].obj = msm_obj; in submit_lookup_objects()
141 list_add_tail(&msm_obj->submit_entry, &submit->bo_list); in submit_lookup_objects()
156 struct msm_gem_object *msm_obj = submit->bos[i].obj; in submit_unlock_unpin_bo() local
159 msm_gem_unpin_iova(&msm_obj->base, submit->aspace); in submit_unlock_unpin_bo()
162 dma_resv_unlock(msm_obj->base.resv); in submit_unlock_unpin_bo()
177 struct msm_gem_object *msm_obj = submit->bos[i].obj; in submit_lock_objects() local
185 ret = dma_resv_lock_interruptible(msm_obj->base.resv, 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(obj->dev, msm_obj->pages, npages); in msm_gem_prime_get_sg_table()
Dmsm_gpu.c700 struct msm_gem_object *msm_obj = submit->bos[i].obj; in retire_submit() local
702 msm_gem_active_put(&msm_obj->base); in retire_submit()
703 msm_gem_unpin_iova(&msm_obj->base, submit->aspace); in retire_submit()
704 drm_gem_object_put_locked(&msm_obj->base); in retire_submit()
776 struct msm_gem_object *msm_obj = submit->bos[i].obj; in msm_gpu_submit() local
777 struct drm_gem_object *drm_obj = &msm_obj->base; in msm_gpu_submit()
783 WARN_ON(is_active(msm_obj) && (msm_obj->gpu != gpu)); in msm_gpu_submit()
786 drm_gem_object_get(&msm_obj->base); in msm_gpu_submit()
787 msm_gem_get_and_pin_iova(&msm_obj->base, submit->aspace, &iova); in msm_gpu_submit()
Dmsm_drv.c802 struct msm_gem_object *msm_obj; in msm_ioctl_gem_info() local
826 msm_obj = to_msm_bo(obj); in msm_ioctl_gem_info()
837 if (args->len >= sizeof(msm_obj->name)) { in msm_ioctl_gem_info()
841 if (copy_from_user(msm_obj->name, u64_to_user_ptr(args->value), in msm_ioctl_gem_info()
843 msm_obj->name[0] = '\0'; in msm_ioctl_gem_info()
847 msm_obj->name[args->len] = '\0'; in msm_ioctl_gem_info()
849 if (!isprint(msm_obj->name[i])) { in msm_ioctl_gem_info()
850 msm_obj->name[i] = '\0'; in msm_ioctl_gem_info()
856 if (args->value && (args->len < strlen(msm_obj->name))) { in msm_ioctl_gem_info()
860 args->len = strlen(msm_obj->name); in msm_ioctl_gem_info()
[all …]