summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2019-04-23 11:44:55 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2019-04-23 11:44:55 +0000
commitc1db0a3decc49f1d202c4015234e690f5621aa7e (patch)
tree481b8cae64d38ca84f5767aebdeddaf8fc31d239
parent58eae96e21109b3905c26645c3fdfda035ca6923 (diff)
enable discard_backing_storage() test
ok kettenis@
-rw-r--r--sys/dev/pci/drm/i915/i915_gem.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/sys/dev/pci/drm/i915/i915_gem.c b/sys/dev/pci/drm/i915/i915_gem.c
index 0ef8d53c208..0472d45fdc2 100644
--- a/sys/dev/pci/drm/i915/i915_gem.c
+++ b/sys/dev/pci/drm/i915/i915_gem.c
@@ -5232,7 +5232,6 @@ fail:
return ERR_PTR(ret);
}
-#ifdef __linux__
static bool discard_backing_storage(struct drm_i915_gem_object *obj)
{
/* If we are the last user of the backing storage (be it shmemfs
@@ -5256,7 +5255,6 @@ static bool discard_backing_storage(struct drm_i915_gem_object *obj)
*/
return atomic_long_read(&obj->base.filp->f_count) == 1;
}
-#endif
static void __i915_gem_free_objects(struct drm_i915_private *i915,
struct llist_node *freed)
@@ -5402,10 +5400,8 @@ void i915_gem_free_object(struct drm_gem_object *gem_obj)
if (obj->mm.quirked)
__i915_gem_object_unpin_pages(obj);
-#ifdef notyet
if (discard_backing_storage(obj))
obj->mm.madv = I915_MADV_DONTNEED;
-#endif
/*
* Before we free the object, make sure any pure RCU-only