Home
last modified time | relevance | path

Searched refs:madv (Results 1 – 25 of 26) sorted by relevance

12

/linux/drivers/gpu/drm/msm/
H A Dmsm_gem.c104 } else if (msm_obj->madv == MSM_MADV_WILLNEED) { in update_lru_active()
107 GEM_WARN_ON(msm_obj->madv != MSM_MADV_DONTNEED); in update_lru_active()
258 unsigned madv) in msm_gem_get_pages_locked() argument
264 if (msm_obj->madv > madv) { in msm_gem_get_pages_locked()
266 msm_obj->madv, madv); in msm_gem_get_pages_locked()
343 if (GEM_WARN_ON(msm_obj->madv != MSM_MADV_WILLNEED)) { in msm_gem_fault()
730 static void *get_vaddr(struct drm_gem_object *obj, unsigned madv) in get_vaddr() argument
741 pages = msm_gem_get_pages_locked(obj, madv); in get_vaddr()
820 int msm_gem_madvise(struct drm_gem_object *obj, unsigned madv) in msm_gem_madvise() argument
829 if (msm_obj->madv != __MSM_MADV_PURGED) in msm_gem_madvise()
[all …]
H A Dmsm_gem.h86 uint8_t madv; member
154 int msm_gem_madvise(struct drm_gem_object *obj, unsigned madv);
232 return (msm_obj->madv == MSM_MADV_DONTNEED) && msm_obj->sgt && in is_purgeable()
H A Dmsm_drv.c806 switch (args->madv) { in msm_ioctl_gem_madvise()
819 ret = msm_gem_madvise(obj, args->madv); in msm_ioctl_gem_madvise()
/linux/drivers/gpu/drm/vc4/
H A Dvc4_bo.c303 WARN_ON(bo->madv != VC4_MADV_DONTNEED); in vc4_bo_purge()
309 bo->madv = __VC4_MADV_PURGED; in vc4_bo_purge()
342 if (bo->madv == VC4_MADV_DONTNEED && in vc4_bo_userspace_cache_purge()
406 bo->madv = VC4_MADV_WILLNEED; in vc4_create_object()
482 bo->madv = __VC4_MADV_NOTSUPP; in vc4_bo_create()
510 bo->madv = VC4_MADV_WILLNEED; in vc4_bo_dumb_create()
552 if (bo->madv == VC4_MADV_DONTNEED && !refcount_read(&bo->usecnt)) in vc4_free_object()
593 bo->madv = __VC4_MADV_NOTSUPP; in vc4_free_object()
635 switch (bo->madv) { in vc4_bo_inc_usecnt()
675 bo->madv == VC4_MADV_DONTNEED) in vc4_bo_dec_usecnt()
[all …]
H A Dvc4_gem.c268 if (bo->madv == __VC4_MADV_NOTSUPP) in vc4_save_hang_state()
272 if (!WARN_ON(bo->madv == __VC4_MADV_PURGED)) in vc4_save_hang_state()
273 bo->madv = VC4_MADV_WILLNEED; in vc4_save_hang_state()
1332 switch (args->madv) { in vc4_gem_madvise_ioctl()
1352 if (bo->madv == __VC4_MADV_NOTSUPP) { in vc4_gem_madvise_ioctl()
1369 if (args->madv == VC4_MADV_DONTNEED && bo->madv == VC4_MADV_WILLNEED && in vc4_gem_madvise_ioctl()
1376 } else if (args->madv == VC4_MADV_WILLNEED && in vc4_gem_madvise_ioctl()
1377 bo->madv == VC4_MADV_DONTNEED && in vc4_gem_madvise_ioctl()
1386 args->retained = bo->madv != __VC4_MADV_PURGED; in vc4_gem_madvise_ioctl()
1389 if (bo->madv != __VC4_MADV_PURGED) in vc4_gem_madvise_ioctl()
[all …]
H A Dvc4_drv.h282 u32 madv; member
/linux/include/drm/
H A Ddrm_gem_shmem_helper.h49 int madv; member
114 int drm_gem_shmem_madvise(struct drm_gem_shmem_object *shmem, int madv);
118 return (shmem->madv > 0) && in drm_gem_shmem_is_purgeable()
/linux/tools/testing/selftests/mm/
H A Dhugetlb_fault_after_madv.c28 void *madv(void *unused) in madv() function
64 pthread_create(&thread1, NULL, madv, NULL); in main()
H A Dhugetlb_madv_vs_map.c44 void *madv(void *unused) in madv() function
108 pthread_create(&thread1, NULL, madv, NULL); in main()
/linux/drivers/gpu/drm/tests/
H A Ddrm_gem_shmem_test.c279 KUNIT_ASSERT_EQ(test, shmem->madv, 0); in drm_gem_shmem_test_madvise()
286 KUNIT_ASSERT_EQ(test, shmem->madv, 1); in drm_gem_shmem_test_madvise()
291 KUNIT_ASSERT_EQ(test, shmem->madv, -1); in drm_gem_shmem_test_madvise()
296 KUNIT_ASSERT_EQ(test, shmem->madv, -1); in drm_gem_shmem_test_madvise()
335 KUNIT_EXPECT_EQ(test, shmem->madv, -1); in drm_gem_shmem_test_purge()
/linux/drivers/gpu/drm/i915/gem/
H A Di915_gem_shmem.c297 obj->mm.madv = __I915_MADV_PURGED; in shmem_truncate()
353 switch (obj->mm.madv) { in shmem_shrink()
373 GEM_BUG_ON(obj->mm.madv == __I915_MADV_PURGED); in __i915_gem_object_release_shmem()
375 if (obj->mm.madv == I915_MADV_DONTNEED) in __i915_gem_object_release_shmem()
406 obj->mm.dirty, obj->mm.madv == I915_MADV_WILLNEED); in i915_gem_object_put_pages_shmem()
449 if (obj->mm.madv != I915_MADV_WILLNEED) in shmem_pwrite()
H A Di915_gem_phys.c122 if (obj->mm.madv == I915_MADV_WILLNEED) in i915_gem_object_put_pages_phys()
235 if (obj->mm.madv != I915_MADV_WILLNEED) in i915_gem_object_attach_phys()
244 if (unlikely(obj->mm.madv != I915_MADV_WILLNEED)) { in i915_gem_object_attach_phys()
H A Di915_gem_object.c125 obj->mm.madv = I915_MADV_WILLNEED; in i915_gem_object_init()
692 GEM_BUG_ON(obj->mm.madv != I915_MADV_WILLNEED); in i915_gem_object_can_migrate()
792 GEM_BUG_ON(obj->mm.madv != I915_MADV_WILLNEED); in __i915_gem_object_migrate()
H A Di915_gem_object_types.h684 unsigned int madv:2; member
H A Di915_gem_tiling.c280 obj->mm.madv == I915_MADV_WILLNEED && in i915_gem_object_set_tiling()
H A Di915_gem_shrinker.c37 return swap_available() || obj->mm.madv == I915_MADV_DONTNEED; in can_release_pages()
H A Di915_gem_ttm_move.c619 if (obj->mm.madv != I915_MADV_WILLNEED) { in i915_ttm_move()
/linux/drivers/gpu/drm/i915/
H A Di915_gem.c1037 switch (args->madv) { in i915_gem_madvise_ioctl()
1056 if (obj->mm.madv == I915_MADV_WILLNEED) { in i915_gem_madvise_ioctl()
1061 if (args->madv == I915_MADV_WILLNEED) { in i915_gem_madvise_ioctl()
1068 if (obj->mm.madv != __I915_MADV_PURGED) { in i915_gem_madvise_ioctl()
1069 obj->mm.madv = args->madv; in i915_gem_madvise_ioctl()
1082 if (obj->mm.madv != I915_MADV_WILLNEED) in i915_gem_madvise_ioctl()
1093 if (obj->mm.madv == I915_MADV_DONTNEED && in i915_gem_madvise_ioctl()
1097 args->retained = obj->mm.madv != __I915_MADV_PURGED; in i915_gem_madvise_ioctl()
H A Di915_drm_client.c68 obj->mm.madv == I915_MADV_DONTNEED) in obj_meminfo()
H A Di915_debugfs.c197 obj->mm.madv == I915_MADV_DONTNEED ? " purgeable" : ""); in i915_debugfs_describe_obj()
/linux/drivers/gpu/drm/panfrost/
H A Dpanfrost_drv.c418 if (args->madv == PANFROST_MADV_DONTNEED) { in panfrost_ioctl_madvise()
440 args->retained = drm_gem_shmem_madvise(&bo->base, args->madv); in panfrost_ioctl_madvise()
443 if (args->madv == PANFROST_MADV_DONTNEED) in panfrost_ioctl_madvise()
446 else if (args->madv == PANFROST_MADV_WILLNEED) in panfrost_ioctl_madvise()
/linux/include/uapi/drm/
H A Dpanfrost_drm.h223 __u32 madv; /* in, PANFROST_MADV_x */ member
H A Dmsm_drm.h340 __u32 madv; /* in, MSM_MADV_x */ member
H A Dvc4_drm.h373 __u32 madv; member
H A Di915_drm.h1826 __u32 madv; member

12