diff options
| author | Mark Johnston <markj@FreeBSD.org> | 2021-10-20 00:25:04 +0000 |
|---|---|---|
| committer | Mark Johnston <markj@FreeBSD.org> | 2021-10-20 01:22:56 +0000 |
| commit | 84c3922243a7b7fd510dcfb100aec59c878c57d0 (patch) | |
| tree | 74117de0ab9997196a9e98e019d9f8611c029597 /sys/dev/drm2 | |
| parent | 92db9f3bb7623883231214e74ec38788c3dffc6a (diff) | |
Diffstat (limited to 'sys/dev/drm2')
| -rw-r--r-- | sys/dev/drm2/ttm/ttm_bo.c | 11 | ||||
| -rw-r--r-- | sys/dev/drm2/ttm/ttm_page_alloc.c | 6 |
2 files changed, 8 insertions, 9 deletions
diff --git a/sys/dev/drm2/ttm/ttm_bo.c b/sys/dev/drm2/ttm/ttm_bo.c index 010afe6d8b3b..d5c11ecff25d 100644 --- a/sys/dev/drm2/ttm/ttm_bo.c +++ b/sys/dev/drm2/ttm/ttm_bo.c @@ -1488,21 +1488,20 @@ int ttm_bo_global_init(struct drm_global_reference *ref) struct ttm_bo_global_ref *bo_ref = container_of(ref, struct ttm_bo_global_ref, ref); struct ttm_bo_global *glob = ref->object; - int req, ret; + int ret; int tries; sx_init(&glob->device_list_mutex, "ttmdlm"); mtx_init(&glob->lru_lock, "ttmlru", NULL, MTX_DEF); glob->mem_glob = bo_ref->mem_glob; - req = VM_ALLOC_NORMAL | VM_ALLOC_NOOBJ; tries = 0; retry: - glob->dummy_read_page = vm_page_alloc_contig(NULL, 0, req, - 1, 0, VM_MAX_ADDRESS, PAGE_SIZE, 0, VM_MEMATTR_UNCACHEABLE); + glob->dummy_read_page = vm_page_alloc_noobj_contig(0, 1, 0, + VM_MAX_ADDRESS, PAGE_SIZE, 0, VM_MEMATTR_UNCACHEABLE); if (unlikely(glob->dummy_read_page == NULL)) { - if (tries < 1 && vm_page_reclaim_contig(req, 1, - 0, VM_MAX_ADDRESS, PAGE_SIZE, 0)) { + if (tries < 1 && vm_page_reclaim_contig(0, 1, 0, + VM_MAX_ADDRESS, PAGE_SIZE, 0)) { tries++; goto retry; } diff --git a/sys/dev/drm2/ttm/ttm_page_alloc.c b/sys/dev/drm2/ttm/ttm_page_alloc.c index b35a06520e07..6fc12cad121f 100644 --- a/sys/dev/drm2/ttm/ttm_page_alloc.c +++ b/sys/dev/drm2/ttm/ttm_page_alloc.c @@ -163,8 +163,8 @@ ttm_vm_page_alloc_dma32(int req, vm_memattr_t memattr) int tries; for (tries = 0; ; tries++) { - p = vm_page_alloc_contig(NULL, 0, req, 1, 0, 0xffffffff, - PAGE_SIZE, 0, memattr); + p = vm_page_alloc_noobj_contig(req, 1, 0, 0xffffffff, PAGE_SIZE, + 0, memattr); if (p != NULL || tries > 2) return (p); if (!vm_page_reclaim_contig(req, 1, 0, 0xffffffff, @@ -191,7 +191,7 @@ ttm_vm_page_alloc(int flags, enum ttm_caching_state cstate) int req; memattr = ttm_caching_state_to_vm(cstate); - req = VM_ALLOC_NORMAL | VM_ALLOC_WIRED | VM_ALLOC_NOOBJ; + req = VM_ALLOC_WIRED; if ((flags & TTM_PAGE_FLAG_ZERO_ALLOC) != 0) req |= VM_ALLOC_ZERO; |
