diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2020-03-05 19:39:05 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2020-03-05 19:39:05 +0000 |
commit | b275b88126c8a25ca3eb3b3ba42e3a2ef2d8ff19 (patch) | |
tree | f8d6fb59dadab788d4b958d916cd9542ef0c7db6 /sys/dev/pci/drm/i915 | |
parent | e1c3841d72132e5b15dadb52fe9e2c59841ca03a (diff) |
The local_clock_us() function needs microsecond resolution so implement it
using microuptime(9). Avoids a hard hang when starting X on Intel Cherry
Trail Atom processors.
ok jsg@
Diffstat (limited to 'sys/dev/pci/drm/i915')
-rw-r--r-- | sys/dev/pci/drm/i915/i915_request.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/dev/pci/drm/i915/i915_request.c b/sys/dev/pci/drm/i915/i915_request.c index a65040e0452..714a3d842c7 100644 --- a/sys/dev/pci/drm/i915/i915_request.c +++ b/sys/dev/pci/drm/i915/i915_request.c @@ -1205,8 +1205,11 @@ static unsigned long local_clock_us(unsigned int *cpu) #else static unsigned long local_clock_us(unsigned *cpu) { + struct timeval tv; + *cpu = cpu_number(); - return ticks * tick; + microuptime(&tv); + return tv.tv_sec * 1000000 + tv.tv_usec; } #endif |