diff options
| author | Mark Johnston <markj@FreeBSD.org> | 2019-09-09 21:32:42 +0000 |
|---|---|---|
| committer | Mark Johnston <markj@FreeBSD.org> | 2019-09-09 21:32:42 +0000 |
| commit | fee2a2fa39834d8d5eaa981298fce9d2ed31546d (patch) | |
| tree | 290b84257a055cb0fbd4eb498ca16690ad749aa3 /sys/dev/drm2 | |
| parent | 58a11be1cf32a2ad832d7167bd41819cb105851e (diff) | |
Notes
Diffstat (limited to 'sys/dev/drm2')
| -rw-r--r-- | sys/dev/drm2/ttm/ttm_bo_vm.c | 4 | ||||
| -rw-r--r-- | sys/dev/drm2/ttm/ttm_page_alloc.c | 2 | ||||
| -rw-r--r-- | sys/dev/drm2/ttm/ttm_tt.c | 2 |
3 files changed, 1 insertions, 7 deletions
diff --git a/sys/dev/drm2/ttm/ttm_bo_vm.c b/sys/dev/drm2/ttm/ttm_bo_vm.c index 43d027fc5cd9..6dc1fabab28c 100644 --- a/sys/dev/drm2/ttm/ttm_bo_vm.c +++ b/sys/dev/drm2/ttm/ttm_bo_vm.c @@ -114,9 +114,7 @@ ttm_bo_vm_fault(vm_object_t vm_obj, vm_ooffset_t offset, vm_object_pip_add(vm_obj, 1); if (*mres != NULL) { - vm_page_lock(*mres); (void)vm_page_remove(*mres); - vm_page_unlock(*mres); } retry: VM_OBJECT_WUNLOCK(vm_obj); @@ -261,9 +259,7 @@ reserve: vm_page_xbusy(m); if (*mres != NULL) { KASSERT(*mres != m, ("losing %p %p", *mres, m)); - vm_page_lock(*mres); vm_page_free(*mres); - vm_page_unlock(*mres); } *mres = m; diff --git a/sys/dev/drm2/ttm/ttm_page_alloc.c b/sys/dev/drm2/ttm/ttm_page_alloc.c index 1e9055175449..fbb830405de0 100644 --- a/sys/dev/drm2/ttm/ttm_page_alloc.c +++ b/sys/dev/drm2/ttm/ttm_page_alloc.c @@ -132,7 +132,7 @@ ttm_vm_page_free(vm_page_t m) { KASSERT(m->object == NULL, ("ttm page %p is owned", m)); - KASSERT(m->wire_count == 1, ("ttm lost wire %p", m)); + KASSERT(vm_page_wired(m), ("ttm lost wire %p", m)); KASSERT((m->flags & PG_FICTITIOUS) != 0, ("ttm lost fictitious %p", m)); KASSERT((m->oflags & VPO_UNMANAGED) == 0, ("ttm got unmanaged %p", m)); m->flags &= ~PG_FICTITIOUS; diff --git a/sys/dev/drm2/ttm/ttm_tt.c b/sys/dev/drm2/ttm/ttm_tt.c index 1e2db3cd8755..82aaddf4b1d4 100644 --- a/sys/dev/drm2/ttm/ttm_tt.c +++ b/sys/dev/drm2/ttm/ttm_tt.c @@ -294,9 +294,7 @@ int ttm_tt_swapin(struct ttm_tt *ttm) rv = vm_pager_get_pages(obj, &from_page, 1, NULL, NULL); if (rv != VM_PAGER_OK) { - vm_page_lock(from_page); vm_page_free(from_page); - vm_page_unlock(from_page); ret = -EIO; goto err_ret; } |
