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: Factor a little ou...
details: https://anonhg.NetBSD.org/src/rev/94b304cc3c64
branches: trunk
changeset: 1029204:94b304cc3c64
user: riastradh <riastradh%NetBSD.org@localhost>
date: Mon Dec 27 13:29:04 2021 +0000
description:
i915: Factor a little out of #ifdef NetBSD.
Doesn't really reduce diff but slightly reduces danger of bad merge.
diffstat:
sys/external/bsd/drm2/dist/drm/i915/i915_request.c | 13 +++++++------
1 files changed, 7 insertions(+), 6 deletions(-)
diffs (43 lines):
diff -r 0653d71ccf2b -r 94b304cc3c64 sys/external/bsd/drm2/dist/drm/i915/i915_request.c
--- a/sys/external/bsd/drm2/dist/drm/i915/i915_request.c Mon Dec 27 13:28:52 2021 +0000
+++ b/sys/external/bsd/drm2/dist/drm/i915/i915_request.c Mon Dec 27 13:29:04 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: i915_request.c,v 1.14 2021/12/27 13:28:52 riastradh Exp $ */
+/* $NetBSD: i915_request.c,v 1.15 2021/12/27 13:29:04 riastradh Exp $ */
/*
* Copyright © 2008-2015 Intel Corporation
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: i915_request.c,v 1.14 2021/12/27 13:28:52 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: i915_request.c,v 1.15 2021/12/27 13:29:04 riastradh Exp $");
#include <linux/dma-fence-array.h>
#include <linux/irq_work.h>
@@ -1600,8 +1600,13 @@
#ifdef __NetBSD__
DRM_INIT_WAITQUEUE(&wait.wq, "i915req");
+#else
+ wait.tsk = current;
+#endif
if (dma_fence_add_callback(&rq->fence, &wait.cb, request_wait_wake))
goto out;
+
+#ifdef __NetBSD__
spin_lock(rq->fence.lock);
#define C (i915_request_completed(rq) ? 1 : \
(spin_unlock(rq->fence.lock), \
@@ -1623,10 +1628,6 @@
spin_unlock(rq->fence.lock);
DRM_DESTROY_WAITQUEUE(&wait.wq);
#else
- wait.tsk = current;
- if (dma_fence_add_callback(&rq->fence, &wait.cb, request_wait_wake))
- goto out;
-
for (;;) {
set_current_state(state);
Home |
Main Index |
Thread Index |
Old Index