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 i915: Defer i915_sw_fenc...
details: https://anonhg.NetBSD.org/src/rev/601f256df048
branches: trunk
changeset: 1028799:601f256df048
user: riastradh <riastradh%NetBSD.org@localhost>
date: Sun Dec 19 12:03:48 2021 +0000
description:
i915: Defer i915_sw_fence_fini to `kmem' (pool) cache destructor.
We actually need to destroy the spin lock here, whereas in Linux this
is only used for tracking when sw fences are _technically_ in use or
not -- where `not in use' includes RCU grace periods -- and it's OK
to `destroy' a fence while the grace periods are still running.
diffstat:
sys/external/bsd/drm2/dist/drm/i915/i915_request.c | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
diffs (40 lines):
diff -r 9bd1d55a1b82 -r 601f256df048 sys/external/bsd/drm2/dist/drm/i915/i915_request.c
--- a/sys/external/bsd/drm2/dist/drm/i915/i915_request.c Sun Dec 19 12:03:38 2021 +0000
+++ b/sys/external/bsd/drm2/dist/drm/i915/i915_request.c Sun Dec 19 12:03:48 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: i915_request.c,v 1.9 2021/12/19 12:00:48 riastradh Exp $ */
+/* $NetBSD: i915_request.c,v 1.10 2021/12/19 12:03:48 riastradh Exp $ */
/*
* Copyright © 2008-2015 Intel Corporation
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: i915_request.c,v 1.9 2021/12/19 12:00:48 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: i915_request.c,v 1.10 2021/12/19 12:03:48 riastradh Exp $");
#include <linux/dma-fence-array.h>
#include <linux/irq_work.h>
@@ -118,8 +118,10 @@
* freed when the slab cache itself is freed, and so we would get
* caught trying to reuse dead objects.
*/
+#ifndef __NetBSD__
i915_sw_fence_fini(&rq->submit);
i915_sw_fence_fini(&rq->semaphore);
+#endif
kmem_cache_free(global.slab_requests, rq);
}
@@ -613,6 +615,10 @@
struct i915_request *rq = arg;
dma_fence_destroy(&rq->fence);
+#ifdef __NetBSD__
+ i915_sw_fence_fini(&rq->submit);
+ i915_sw_fence_fini(&rq->semaphore);
+#endif
spin_lock_destroy(&rq->lock);
}
Home |
Main Index |
Thread Index |
Old Index