Hi Philippe,

Please do send technical discussions to tech@ in the future; misc@ is
there to attract the trolls and many of us aren't subscribed to it adn
only read it through the mailing list archive ;).

Anyway, regarding: https://marc.info/?l=openbsd-misc&m=153424694308657
Thank for the detailed debugging work!

Does the diff below fix things?

Index: dev/pci/drm/drm_irq.c
===================================================================
RCS file: /cvs/src/sys/dev/pci/drm/drm_irq.c,v
retrieving revision 1.70
diff -u -p -r1.70 drm_irq.c
--- dev/pci/drm/drm_irq.c       28 Mar 2018 05:27:28 -0000      1.70
+++ dev/pci/drm/drm_irq.c       14 Aug 2018 13:11:04 -0000
@@ -1317,7 +1317,7 @@ void drm_wait_one_vblank(struct drm_devi
        int ret;
        u32 last;
 
-       if (WARN_ON(pipe >= dev->num_crtcs) || cold)
+       if (WARN_ON(pipe >= dev->num_crtcs))
                return;
 
        ret = drm_vblank_get(dev, pipe);
Index: dev/pci/drm/drm_linux.h
===================================================================
RCS file: /cvs/src/sys/dev/pci/drm/drm_linux.h,v
retrieving revision 1.90
diff -u -p -r1.90 drm_linux.h
--- dev/pci/drm/drm_linux.h     27 Jul 2018 21:11:31 -0000      1.90
+++ dev/pci/drm/drm_linux.h     14 Aug 2018 13:11:04 -0000
@@ -604,10 +604,14 @@ __remove_wait_queue(wait_queue_head_t *h
 #define __wait_event_intr_timeout(wq, condition, timo, prio)           \
 ({                                                                     \
        long ret = timo;                                                \
-       do {                                                            \
+       if (cold) {                                                     \
+               do {                                                    \
+                       delay(tick);                                    \
+                       ret--;                                          \
+               } while (ret > 0 && !(condition));                      \
+               ret = ((condition)) ? 1 : 0;                            \
+       } else do {                                                     \
                int deadline, __error;                                  \
-                                                                       \
-               KASSERT(!cold);                                         \
                                                                        \
                mtx_enter(&sch_mtx);                                    \
                atomic_inc_int(&(wq).count);                            \


Reply via email to