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 Use gemo_shm_uao rather ...



details:   https://anonhg.NetBSD.org/src/rev/1c53be08582d
branches:  trunk
changeset: 365931:1c53be08582d
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Mon Aug 27 07:18:47 2018 +0000

description:
Use gemo_shm_uao rather than filp.

diffstat:

 sys/external/bsd/drm2/dist/drm/i915/i915_gem_shrinker.c |  12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)

diffs (42 lines):

diff -r 4df9c586cd62 -r 1c53be08582d sys/external/bsd/drm2/dist/drm/i915/i915_gem_shrinker.c
--- a/sys/external/bsd/drm2/dist/drm/i915/i915_gem_shrinker.c   Mon Aug 27 07:18:37 2018 +0000
+++ b/sys/external/bsd/drm2/dist/drm/i915/i915_gem_shrinker.c   Mon Aug 27 07:18:47 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: i915_gem_shrinker.c,v 1.4 2018/08/27 07:18:37 riastradh Exp $  */
+/*     $NetBSD: i915_gem_shrinker.c,v 1.5 2018/08/27 07:18:47 riastradh Exp $  */
 
 /*
  * Copyright © 2008-2015 Intel Corporation
@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: i915_gem_shrinker.c,v 1.4 2018/08/27 07:18:37 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: i915_gem_shrinker.c,v 1.5 2018/08/27 07:18:47 riastradh Exp $");
 
 #include <linux/oom.h>
 #include <linux/shmem_fs.h>
@@ -317,7 +317,11 @@
         */
        unbound = bound = pinned = 0;
        list_for_each_entry(obj, &dev_priv->mm.unbound_list, global_list) {
+#ifdef __NetBSD__
+               if (!obj->base.gemo_shm_uao)
+#else
                if (!obj->base.filp) /* not backed by a freeable object */
+#endif
                        continue;
 
                if (obj->pages_pin_count)
@@ -326,7 +330,11 @@
                        unbound += obj->base.size;
        }
        list_for_each_entry(obj, &dev_priv->mm.bound_list, global_list) {
+#ifdef __NetBSD__
+               if (!obj->base.gemo_shm_uao)
+#else
                if (!obj->base.filp)
+#endif
                        continue;
 
                if (obj->pages_pin_count)



Home | Main Index | Thread Index | Old Index