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 (XXX unsure) attempt to ...
details: https://anonhg.NetBSD.org/src/rev/ff055a85153e
branches: trunk
changeset: 1028431:ff055a85153e
user: riastradh <riastradh%NetBSD.org@localhost>
date: Sun Dec 19 11:02:22 2021 +0000
description:
(XXX unsure) attempt to match linux with additional parameter OP
Author: Maya Rashish <maya%NetBSD.org@localhost>
Committer: Taylor R Campbell <riastradh%NetBSD.org@localhost>
diffstat:
sys/external/bsd/drm2/dist/drm/i915/i915_utils.h | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
diffs (35 lines):
diff -r 4d8d8212ba49 -r ff055a85153e sys/external/bsd/drm2/dist/drm/i915/i915_utils.h
--- a/sys/external/bsd/drm2/dist/drm/i915/i915_utils.h Sun Dec 19 11:02:12 2021 +0000
+++ b/sys/external/bsd/drm2/dist/drm/i915/i915_utils.h Sun Dec 19 11:02:22 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: i915_utils.h,v 1.3 2021/12/19 09:59:13 riastradh Exp $ */
+/* $NetBSD: i915_utils.h,v 1.4 2021/12/19 11:02:22 riastradh Exp $ */
/*
* Copyright © 2016 Intel Corporation
@@ -299,11 +299,14 @@
* check the condition before the timeout.
*/
#ifdef __NetBSD__
-#define _wait_for(COND, MS, Wmin, Wmax) ({ \
+#define __wait_for(OP, COND, MS, Wmin, Wmax) ({ \
int ret__ = 0; \
if (cold) { \
int ms = (MS); \
while (!(COND)) { \
+ OP; \
+ /* Guarantee COND check prior to timeout */ \
+ barrier(); \
if (--ms < 0) { \
DELAY(1000); \
if (!(COND)) \
@@ -315,6 +318,9 @@
} else { \
unsigned long timeout__ = jiffies + msecs_to_jiffies(MS); \
while (!(COND)) { \
+ OP; \
+ /* Guarantee COND check prior to timeout */ \
+ barrier(); \
if (time_after(jiffies, timeout__)) { \
if (!(COND)) \
ret__ = -ETIMEDOUT; \
Home |
Main Index |
Thread Index |
Old Index