summaryrefslogtreecommitdiff
path: root/sys/dev/pci
diff options
context:
space:
mode:
authorMarcus Glocker <mglocker@cvs.openbsd.org>2020-08-18 19:50:09 +0000
committerMarcus Glocker <mglocker@cvs.openbsd.org>2020-08-18 19:50:09 +0000
commit557c3b146818b6bbb96428438e6534955f27c3f8 (patch)
tree6f6889bfc267a5d158f570c38fa56d424851be2e /sys/dev/pci
parent5af744f0de2c59d820232058dfb6fce04f242ce8 (diff)
Our usleep_range(min, max) implementation today is only taking account
of the min value to delay. On the iMac11,2 this was too short, causing a timeout in the DP AUX transaction retry loop, leaving the eDP dark after the KMS initialization attempt. Affected code line for reference: sys/dev/pci/drm/drm_dp_helper.c:771, revision 1.11 Therefore we change the behavior of usleep_range(min, max) to delay the average value of min and max instead, which finally fixes the KMS initialization on the iMac11,2. Help and ok jsg@
Diffstat (limited to 'sys/dev/pci')
-rw-r--r--sys/dev/pci/drm/include/linux/delay.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/dev/pci/drm/include/linux/delay.h b/sys/dev/pci/drm/include/linux/delay.h
index 19f0ef92204..b786cb8620a 100644
--- a/sys/dev/pci/drm/include/linux/delay.h
+++ b/sys/dev/pci/drm/include/linux/delay.h
@@ -20,7 +20,7 @@ ndelay(unsigned long nsecs)
static inline void
usleep_range(unsigned long min, unsigned long max)
{
- DELAY(min);
+ DELAY((min + max) / 2);
}
static inline void