summaryrefslogtreecommitdiff
path: root/sys/dev/pci/drm/i915
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2020-07-02 05:53:28 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2020-07-02 05:53:28 +0000
commit22587a81c233daf88a4b73f4b1b482145ed29338 (patch)
treedcb8803fa0c1952d83ec3ce13c698d5922ab627b /sys/dev/pci/drm/i915
parent82b17b5879abea08aa041fea80df1272ea0d7f32 (diff)
use intr_barrier(9) for synchronize_irq() and synchronize_hardirq()
Diffstat (limited to 'sys/dev/pci/drm/i915')
-rw-r--r--sys/dev/pci/drm/i915/gt/intel_engine_cs.c4
-rw-r--r--sys/dev/pci/drm/i915/i915_irq.c4
2 files changed, 6 insertions, 2 deletions
diff --git a/sys/dev/pci/drm/i915/gt/intel_engine_cs.c b/sys/dev/pci/drm/i915/gt/intel_engine_cs.c
index fbb0eeeee17..1262799d691 100644
--- a/sys/dev/pci/drm/i915/gt/intel_engine_cs.c
+++ b/sys/dev/pci/drm/i915/gt/intel_engine_cs.c
@@ -1122,10 +1122,10 @@ bool intel_engine_is_idle(struct intel_engine_cs *engine)
/* Waiting to drain ELSP? */
if (execlists_active(&engine->execlists)) {
-#ifdef notyet
+#ifdef __linux__
synchronize_hardirq(engine->i915->drm.pdev->irq);
#else
- STUB();
+ intr_barrier(engine->i915->irqh);
#endif
intel_engine_flush_submission(engine);
diff --git a/sys/dev/pci/drm/i915/i915_irq.c b/sys/dev/pci/drm/i915/i915_irq.c
index 081c5baf281..e8f3905a90a 100644
--- a/sys/dev/pci/drm/i915/i915_irq.c
+++ b/sys/dev/pci/drm/i915/i915_irq.c
@@ -4172,5 +4172,9 @@ bool intel_irqs_enabled(struct drm_i915_private *dev_priv)
void intel_synchronize_irq(struct drm_i915_private *i915)
{
+#ifdef __linux__
synchronize_irq(i915->drm.pdev->irq);
+#else
+ intr_barrier(i915->irqh);
+#endif
}