Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/external/bsd/drm2/dist/drm/i915/gem i915: Release vmobjl...
details: https://anonhg.NetBSD.org/src/rev/eab2b505ab5d
branches: trunk
changeset: 1028823:eab2b505ab5d
user: riastradh <riastradh%NetBSD.org@localhost>
date: Sun Dec 19 12:08:46 2021 +0000
description:
i915: Release vmobjlock on fault.
We need to take this later, but it's not helpful for uvm_fault to
have taken it immediately prior to calling pgo_fault -- still not
clear on why uvm_fault does that.
diffstat:
sys/external/bsd/drm2/dist/drm/i915/gem/i915_gem_mman.c | 13 ++++++++++---
1 files changed, 10 insertions(+), 3 deletions(-)
diffs (41 lines):
diff -r 1d3775333d3e -r eab2b505ab5d sys/external/bsd/drm2/dist/drm/i915/gem/i915_gem_mman.c
--- a/sys/external/bsd/drm2/dist/drm/i915/gem/i915_gem_mman.c Sun Dec 19 12:08:36 2021 +0000
+++ b/sys/external/bsd/drm2/dist/drm/i915/gem/i915_gem_mman.c Sun Dec 19 12:08:46 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: i915_gem_mman.c,v 1.16 2021/12/19 12:08:36 riastradh Exp $ */
+/* $NetBSD: i915_gem_mman.c,v 1.17 2021/12/19 12:08:46 riastradh Exp $ */
/*
* SPDX-License-Identifier: MIT
@@ -7,7 +7,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: i915_gem_mman.c,v 1.16 2021/12/19 12:08:36 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: i915_gem_mman.c,v 1.17 2021/12/19 12:08:46 riastradh Exp $");
#include <linux/anon_inodes.h>
#include <linux/mman.h>
@@ -567,6 +567,13 @@
KASSERT(i915_gem_object_type_has(obj,
I915_GEM_OBJECT_HAS_STRUCT_PAGE));
+ /*
+ * The lock isn't actually helpful for us and the caller in
+ * uvm_fault only just acquired it anyway so no important
+ * invariants are implied by it.
+ */
+ rw_exit(obj->base.filp->vmobjlock);
+
KASSERT(ufi->entry->start <= vaddr);
KASSERT((ufi->entry->offset & (PAGE_SIZE - 1)) == 0);
uoffset = ufi->entry->offset + (vaddr - ufi->entry->start);
@@ -630,7 +637,7 @@
out: if (pinned)
i915_gem_object_unpin_pages(obj);
- uvmfault_unlockall(ufi, ufi->entry->aref.ar_amap, uobj);
+ uvmfault_unlockall(ufi, ufi->entry->aref.ar_amap, NULL);
/*
* Remap EINTR to success, so that we return to userland.
Home |
Main Index |
Thread Index |
Old Index