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: Fix locking-agains...
details: https://anonhg.NetBSD.org/src/rev/846ad02e385d
branches: trunk
changeset: 1028955:846ad02e385d
user: riastradh <riastradh%NetBSD.org@localhost>
date: Sun Dec 19 12:34:34 2021 +0000
description:
i915: Fix locking-against-self in i915_request_wait.
diffstat:
sys/external/bsd/drm2/dist/drm/i915/i915_request.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diffs (30 lines):
diff -r c75a53a03a51 -r 846ad02e385d 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:34:24 2021 +0000
+++ b/sys/external/bsd/drm2/dist/drm/i915/i915_request.c Sun Dec 19 12:34:34 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: i915_request.c,v 1.11 2021/12/19 12:09:09 riastradh Exp $ */
+/* $NetBSD: i915_request.c,v 1.12 2021/12/19 12:34:34 riastradh Exp $ */
/*
* Copyright © 2008-2015 Intel Corporation
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: i915_request.c,v 1.11 2021/12/19 12:09:09 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: i915_request.c,v 1.12 2021/12/19 12:34:34 riastradh Exp $");
#include <linux/dma-fence-array.h>
#include <linux/irq_work.h>
@@ -1613,7 +1613,10 @@
goto out;
spin_lock(rq->fence.lock);
#define C (i915_request_completed(rq) ? 1 : \
- (intel_engine_flush_submission(rq->engine), 0))
+ (spin_unlock(rq->fence.lock), \
+ intel_engine_flush_submission(rq->engine), \
+ spin_lock(rq->fence.lock), \
+ i915_request_completed(rq)))
if (flags & I915_WAIT_INTERRUPTIBLE) {
DRM_SPIN_TIMED_WAIT_UNTIL(timeout, &wait.wq,
rq->fence.lock, timeout,
Home |
Main Index |
Thread Index |
Old Index