Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-7]: src/sys/external/bsd/drm2 Pull up following revision(s) (requ...
details: https://anonhg.NetBSD.org/src/rev/c3573fd7c68a
branches: netbsd-7
changeset: 798282:c3573fd7c68a
user: martin <martin%NetBSD.org@localhost>
date: Fri Aug 22 10:35:59 2014 +0000
description:
Pull up following revision(s) (requested by riastradh in ticket #46):
sys/external/bsd/drm2/dist/drm/i915/i915_gem.c: revision 1.15
sys/external/bsd/drm2/ttm/ttm_bo_vm.c: revision 1.4
Do not take the {ttm,gem} vmobjlock in the fault handler.
- We don't need this lock.
- uvm does nothing between taking it and calling the fault handler.
- Now that the uvm_aobj shares vmobjlock with the {ttm,gem} uvm
object, we must not hold the lock when we call uvm_obj_wirepages on
the uvm_aobj.
diffstat:
sys/external/bsd/drm2/dist/drm/i915/i915_gem.c | 4 ++++
sys/external/bsd/drm2/ttm/ttm_bo_vm.c | 10 +++++++---
2 files changed, 11 insertions(+), 3 deletions(-)
diffs (59 lines):
diff -r 7a01a0eeff18 -r c3573fd7c68a sys/external/bsd/drm2/dist/drm/i915/i915_gem.c
--- a/sys/external/bsd/drm2/dist/drm/i915/i915_gem.c Fri Aug 22 10:32:18 2014 +0000
+++ b/sys/external/bsd/drm2/dist/drm/i915/i915_gem.c Fri Aug 22 10:35:59 2014 +0000
@@ -1842,6 +1842,9 @@
intel_runtime_pm_get(dev_priv);
+ /* Thanks, uvm, but we don't need this lock. */
+ mutex_exit(uobj->vmobjlock);
+
ret = i915_mutex_lock_interruptible(dev);
if (ret)
goto out;
@@ -1880,6 +1883,7 @@
unlock:
mutex_unlock(&dev->struct_mutex);
out:
+ mutex_enter(uobj->vmobjlock);
uvmfault_unlockall(ufi, ufi->entry->aref.ar_amap, uobj);
if (ret == -ERESTART)
uvm_wait("i915flt");
diff -r 7a01a0eeff18 -r c3573fd7c68a sys/external/bsd/drm2/ttm/ttm_bo_vm.c
--- a/sys/external/bsd/drm2/ttm/ttm_bo_vm.c Fri Aug 22 10:32:18 2014 +0000
+++ b/sys/external/bsd/drm2/ttm/ttm_bo_vm.c Fri Aug 22 10:35:59 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ttm_bo_vm.c,v 1.2.4.1 2014/08/18 07:49:10 martin Exp $ */
+/* $NetBSD: ttm_bo_vm.c,v 1.2.4.2 2014/08/22 10:35:59 martin Exp $ */
/*-
* Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ttm_bo_vm.c,v 1.2.4.1 2014/08/18 07:49:10 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ttm_bo_vm.c,v 1.2.4.2 2014/08/22 10:35:59 martin Exp $");
#include <sys/types.h>
@@ -92,6 +92,9 @@
unsigned mmapflags;
int ret;
+ /* Thanks, uvm, but we don't need this lock. */
+ mutex_exit(uobj->vmobjlock);
+
/* Copy-on-write mappings make no sense for the graphics aperture. */
if (UVM_ET_ISCOPYONWRITE(ufi->entry)) {
ret = -EIO;
@@ -199,7 +202,8 @@
out3: pmap_update(ufi->orig_map->pmap);
out2: ttm_mem_io_unlock(man);
out1: ttm_bo_unreserve(bo);
-out0: uvmfault_unlockall(ufi, ufi->entry->aref.ar_amap, uobj);
+out0: mutex_enter(uobj->vmobjlock);
+ uvmfault_unlockall(ufi, ufi->entry->aref.ar_amap, uobj);
/* XXX errno Linux->NetBSD */
return -ret;
}
Home |
Main Index |
Thread Index |
Old Index