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 Make gmbus_wait_hw_statu...
details: https://anonhg.NetBSD.org/src/rev/f954e52ad440
branches: trunk
changeset: 336360:f954e52ad440
user: riastradh <riastradh%NetBSD.org@localhost>
date: Fri Feb 27 04:35:02 2015 +0000
description:
Make gmbus_wait_hw_status consistently use 50ms timeout like Linux.
Apparently I changed this to a 1-tick timeout. No clue why.
diffstat:
sys/external/bsd/drm2/dist/drm/i915/intel_i2c.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diffs (25 lines):
diff -r c4eac6e62e8f -r f954e52ad440 sys/external/bsd/drm2/dist/drm/i915/intel_i2c.c
--- a/sys/external/bsd/drm2/dist/drm/i915/intel_i2c.c Fri Feb 27 04:29:27 2015 +0000
+++ b/sys/external/bsd/drm2/dist/drm/i915/intel_i2c.c Fri Feb 27 04:35:02 2015 +0000
@@ -289,17 +289,18 @@
#ifdef __NetBSD__
spin_lock(&dev_priv->gmbus_wait_lock);
if (cold) {
- unsigned timo = 1000;
+ unsigned timo = 50;
+
while (gmbus2 = I915_READ_NOTRACE(GMBUS2 + reg_offset),
!ISSET(gmbus2, (GMBUS_SATOER | gmbus2_status))) {
if (timo-- == 0)
break;
- DELAY(100);
+ DELAY(1000);
}
} else {
int ret;
DRM_SPIN_TIMED_WAIT_UNTIL(ret, &dev_priv->gmbus_wait_queue,
- &dev_priv->gmbus_wait_lock, 1,
+ &dev_priv->gmbus_wait_lock, mstohz(50),
(gmbus2 = I915_READ_NOTRACE(GMBUS2 + reg_offset),
!ISSET(gmbus2, (GMBUS_SATOER | gmbus2_status))));
}
Home |
Main Index |
Thread Index |
Old Index