summaryrefslogtreecommitdiff
path: root/sys/dev/pci/drm
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/pci/drm')
-rw-r--r--sys/dev/pci/drm/drm_irq.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/sys/dev/pci/drm/drm_irq.c b/sys/dev/pci/drm/drm_irq.c
index dd8474fc4a0..cbb80424abc 100644
--- a/sys/dev/pci/drm/drm_irq.c
+++ b/sys/dev/pci/drm/drm_irq.c
@@ -1317,8 +1317,21 @@ void drm_wait_one_vblank(struct drm_device *dev, unsigned int pipe)
int ret;
u32 last;
- if (WARN_ON(pipe >= dev->num_crtcs) || cold)
+ if (WARN_ON(pipe >= dev->num_crtcs))
+ return;
+
+#ifdef __OpenBSD__
+ /*
+ * If we're cold, vblank interrupts won't happen even if
+ * they're turned on by the driver. Just stall long enough
+ * for a vblank to pass. This assumes a vrefresh of at least
+ * 25 Hz.
+ */
+ if (cold) {
+ delay(40000);
return;
+ }
+#endif
ret = drm_vblank_get(dev, pipe);
if (WARN(ret, "vblank not available on crtc %i, ret=%i\n", pipe, ret))