drm/i915: Remove dma_resv_prune
authorMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
Thu, 21 Oct 2021 10:35:40 +0000 (12:35 +0200)
committerChristian König <christian.koenig@amd.com>
Tue, 30 Nov 2021 14:59:17 +0000 (15:59 +0100)
The signaled bit is already used for quick testing if a fence is signaled.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Acked-by: Christian König <christian.koenig@amd.com>
Link: https://patchwork.freedesktop.org/patch/460722/
Signed-off-by: Christian König <christian.koenig@amd.com>
drivers/gpu/drm/i915/Makefile
drivers/gpu/drm/i915/dma_resv_utils.c [deleted file]
drivers/gpu/drm/i915/dma_resv_utils.h [deleted file]
drivers/gpu/drm/i915/gem/i915_gem_shrinker.c
drivers/gpu/drm/i915/gem/i915_gem_wait.c

index 660bb03de6fc1c290586a12749190b2969bab838..5c1af130cb6d731fe3660d6af6ae43efcd557921 100644 (file)
@@ -60,7 +60,6 @@ i915-y += i915_drv.o \
 
 # core library code
 i915-y += \
-       dma_resv_utils.o \
        i915_memcpy.o \
        i915_mm.o \
        i915_sw_fence.o \
diff --git a/drivers/gpu/drm/i915/dma_resv_utils.c b/drivers/gpu/drm/i915/dma_resv_utils.c
deleted file mode 100644 (file)
index 7df91b7..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-// SPDX-License-Identifier: MIT
-/*
- * Copyright © 2020 Intel Corporation
- */
-
-#include <linux/dma-resv.h>
-
-#include "dma_resv_utils.h"
-
-void dma_resv_prune(struct dma_resv *resv)
-{
-       if (dma_resv_trylock(resv)) {
-               if (dma_resv_test_signaled(resv, true))
-                       dma_resv_add_excl_fence(resv, NULL);
-               dma_resv_unlock(resv);
-       }
-}
diff --git a/drivers/gpu/drm/i915/dma_resv_utils.h b/drivers/gpu/drm/i915/dma_resv_utils.h
deleted file mode 100644 (file)
index b9d8fb5..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-/* SPDX-License-Identifier: MIT */
-/*
- * Copyright © 2020 Intel Corporation
- */
-
-#ifndef DMA_RESV_UTILS_H
-#define DMA_RESV_UTILS_H
-
-struct dma_resv;
-
-void dma_resv_prune(struct dma_resv *resv);
-
-#endif /* DMA_RESV_UTILS_H */
index 5ab136ffdeb2dd4fa06cdcb052d9e77fd7398eb7..af3eb7fd951df88f08ab5cf67423eb69cafcf094 100644 (file)
@@ -15,7 +15,6 @@
 
 #include "gt/intel_gt_requests.h"
 
-#include "dma_resv_utils.h"
 #include "i915_trace.h"
 
 static bool swap_available(void)
@@ -229,8 +228,6 @@ i915_gem_shrink(struct i915_gem_ww_ctx *ww,
                                        i915_gem_object_unlock(obj);
                        }
 
-                       dma_resv_prune(obj->base.resv);
-
                        scanned += obj->base.size >> PAGE_SHIFT;
 skip:
                        i915_gem_object_put(obj);
index f11325484110d89a009d33d2ec6ae9b13de1b81d..cd149aa99364c1d0bdedfa864a9b0fc18e6169ed 100644 (file)
@@ -10,7 +10,6 @@
 
 #include "gt/intel_engine.h"
 
-#include "dma_resv_utils.h"
 #include "i915_gem_ioctls.h"
 #include "i915_gem_object.h"
 
@@ -52,13 +51,6 @@ i915_gem_object_wait_reservation(struct dma_resv *resv,
        }
        dma_resv_iter_end(&cursor);
 
-       /*
-        * Opportunistically prune the fences iff we know they have *all* been
-        * signaled.
-        */
-       if (timeout > 0)
-               dma_resv_prune(resv);
-
        return ret;
 }