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 Fix return code of __wai...
details: https://anonhg.NetBSD.org/src/rev/3e386049fbac
branches: trunk
changeset: 336353:3e386049fbac
user: riastradh <riastradh%NetBSD.org@localhost>
date: Thu Feb 26 19:43:43 2015 +0000
description:
Fix return code of __wait_seqno.
MAX(ret, 0) is 0 if ret is negative, but if ret is negative we want
to return that negative value, meaning error. Should've been
MIN(ret, 0), but I'll just rewrite it to clarify a wee bit.
If the GPU reset, call i915_gem_check_wedge and always return failure
like Linux does. Caller must retry in that case.
diffstat:
sys/external/bsd/drm2/dist/drm/i915/i915_gem.c | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
diffs (20 lines):
diff -r d7a1324c4ea4 -r 3e386049fbac sys/external/bsd/drm2/dist/drm/i915/i915_gem.c
--- a/sys/external/bsd/drm2/dist/drm/i915/i915_gem.c Thu Feb 26 16:07:10 2015 +0000
+++ b/sys/external/bsd/drm2/dist/drm/i915/i915_gem.c Thu Feb 26 19:43:43 2015 +0000
@@ -1457,7 +1457,15 @@
else
timespecclear(timeout);
}
- return MAX(ret, 0); /* ignore remaining ticks */
+ if (wedged) { /* GPU reset while we were waiting. */
+ ret = i915_gem_check_wedge(&dev_priv->gpu_error,
+ interruptible);
+ if (ret == 0)
+ ret = -EAGAIN;
+ }
+ if (ret < 0) /* Failure. */
+ return ret;
+ return 0; /* Success, possibly with time to spare. */
}
#else
static int __wait_seqno(struct intel_ring_buffer *ring, u32 seqno,
Home |
Main Index |
Thread Index |
Old Index