/linux/drivers/gpu/drm/msm/ |
H A D | msm_gem.c | 104 } 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 D | msm_gem.h | 86 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 D | msm_drv.c | 806 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 D | vc4_bo.c | 303 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 D | vc4_gem.c | 268 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 D | vc4_drv.h | 282 u32 madv; member
|
/linux/include/drm/ |
H A D | drm_gem_shmem_helper.h | 49 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 D | hugetlb_fault_after_madv.c | 28 void *madv(void *unused) in madv() function 64 pthread_create(&thread1, NULL, madv, NULL); in main()
|
H A D | hugetlb_madv_vs_map.c | 44 void *madv(void *unused) in madv() function 108 pthread_create(&thread1, NULL, madv, NULL); in main()
|
/linux/drivers/gpu/drm/tests/ |
H A D | drm_gem_shmem_test.c | 279 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 D | i915_gem_shmem.c | 297 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 D | i915_gem_phys.c | 122 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 D | i915_gem_object.c | 125 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 D | i915_gem_object_types.h | 684 unsigned int madv:2; member
|
H A D | i915_gem_tiling.c | 280 obj->mm.madv == I915_MADV_WILLNEED && in i915_gem_object_set_tiling()
|
H A D | i915_gem_shrinker.c | 37 return swap_available() || obj->mm.madv == I915_MADV_DONTNEED; in can_release_pages()
|
H A D | i915_gem_ttm_move.c | 619 if (obj->mm.madv != I915_MADV_WILLNEED) { in i915_ttm_move()
|
/linux/drivers/gpu/drm/i915/ |
H A D | i915_gem.c | 1037 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 D | i915_drm_client.c | 68 obj->mm.madv == I915_MADV_DONTNEED) in obj_meminfo()
|
H A D | i915_debugfs.c | 197 obj->mm.madv == I915_MADV_DONTNEED ? " purgeable" : ""); in i915_debugfs_describe_obj()
|
/linux/drivers/gpu/drm/panfrost/ |
H A D | panfrost_drv.c | 418 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 D | panfrost_drm.h | 223 __u32 madv; /* in, PANFROST_MADV_x */ member
|
H A D | msm_drm.h | 340 __u32 madv; /* in, MSM_MADV_x */ member
|
H A D | vc4_drm.h | 373 __u32 madv; member
|
H A D | i915_drm.h | 1826 __u32 madv; member
|