From 06bd3d808881bd72b61a29c2e843929e1596950e Mon Sep 17 00:00:00 2001 From: claudio Date: Tue, 1 Aug 2023 07:57:55 +0000 Subject: [PATCH] Don't force early wrap around for jiffies. In inteldrm the function intel_dp_wait_source_oui() can be called before last_oui_write is set and so the code requires a positive initial jiffies value. On linux this is the case for 64bit systems (but not for 32bit) and because of this idiosyncracy this bug was introduced in upstream intel code. Instead of adding another OpenBSD specific quirk to drm code alter our jiffies initalisation. Systems affected are at least "ALDERLAKE_P, gen 12" and "TIGERLAKE, gen 12" Suggested fix by kettenis@ OK jsg@ --- sys/kern/kern_clock.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/kern/kern_clock.c b/sys/kern/kern_clock.c index dfe8dbe7494..89ac8a1077d 100644 --- a/sys/kern/kern_clock.c +++ b/sys/kern/kern_clock.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_clock.c,v 1.109 2023/07/25 18:16:19 cheloha Exp $ */ +/* $OpenBSD: kern_clock.c,v 1.110 2023/08/01 07:57:55 claudio Exp $ */ /* $NetBSD: kern_clock.c,v 1.34 1996/06/09 04:51:03 briggs Exp $ */ /*- @@ -84,7 +84,8 @@ int profhz; int profprocs; int ticks = INT_MAX - (15 * 60 * HZ); -volatile unsigned long jiffies = ULONG_MAX - (10 * 60 * HZ); +/* Don't force early wrap around, triggers bug in inteldrm */ +volatile unsigned long jiffies; /* * Initialize clock frequencies and start both clocks running. -- 2.20.1