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 Guess what uvm criterion...
details: https://anonhg.NetBSD.org/src/rev/2446f3356fe6
branches: trunk
changeset: 366175:2446f3356fe6
user: riastradh <riastradh%NetBSD.org@localhost>
date: Mon Aug 27 13:41:37 2018 +0000
description:
Guess what uvm criterion means we should discard backing pages.
diffstat:
sys/external/bsd/drm2/dist/drm/i915/i915_gem.c | 11 ++++++-----
1 files changed, 6 insertions(+), 5 deletions(-)
diffs (39 lines):
diff -r 988fb32b5105 -r 2446f3356fe6 sys/external/bsd/drm2/dist/drm/i915/i915_gem.c
--- a/sys/external/bsd/drm2/dist/drm/i915/i915_gem.c Mon Aug 27 13:41:23 2018 +0000
+++ b/sys/external/bsd/drm2/dist/drm/i915/i915_gem.c Mon Aug 27 13:41:37 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: i915_gem.c,v 1.47 2018/08/27 13:40:28 riastradh Exp $ */
+/* $NetBSD: i915_gem.c,v 1.48 2018/08/27 13:41:37 riastradh Exp $ */
/*
* Copyright © 2008-2015 Intel Corporation
@@ -28,7 +28,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: i915_gem.c,v 1.47 2018/08/27 13:40:28 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: i915_gem.c,v 1.48 2018/08/27 13:41:37 riastradh Exp $");
#ifdef __NetBSD__
#if 0 /* XXX uvmhist option? */
@@ -5025,9 +5025,6 @@
static bool discard_backing_storage(struct drm_i915_gem_object *obj)
{
-#ifdef __NetBSD__
- panic("XXX");
-#else
/* If we are the last user of the backing storage (be it shmemfs
* pages or stolen etc), we know that the pages are going to be
* immediately released. In this case, we can then skip copying
@@ -5047,6 +5044,10 @@
* acquiring such a reference whilst we are in the middle of
* freeing the object.
*/
+#ifdef __NetBSD__
+ /* XXX This number might be a fencepost. */
+ return obj->base.filp->uo_refs == 1;
+#else
return atomic_long_read(&obj->base.filp->f_count) == 1;
#endif
}
Home |
Main Index |
Thread Index |
Old Index