diff mbox series

[v2] drm/i915: fix i9xx irq enable/disable

Message ID 20190329165018.32953-1-daniele.ceraolospurio@intel.com (mailing list archive)
State New, archived
Headers show
Series [v2] drm/i915: fix i9xx irq enable/disable | expand

Commit Message

Daniele Ceraolo Spurio March 29, 2019, 4:50 p.m. UTC
Those functions are used on gen4 as well and gen4 does have a non-RCS
engine, so remove the BUG_ON and flip back the logic to what it was
before the ENGINE_READ/WRITE update

v2: update the posting read as well (Chris, Ville).

Fixes: baba6e572b38 ("drm/i915: take a reference to uncore in the engine and use it")
Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/intel_ringbuffer.c | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

Comments

Chris Wilson March 29, 2019, 5:58 p.m. UTC | #1
Quoting Patchwork (2019-03-29 17:54:17)
> == Series Details ==
> 
> Series: drm/i915: fix i9xx irq enable/disable (rev2)
> URL   : https://patchwork.freedesktop.org/series/58748/
> State : success
> 
> == Summary ==
> 
> CI Bug Log - changes from CI_DRM_5837 -> Patchwork_12634
> ====================================================
> 
> Summary
> -------
> 
>   **SUCCESS**
> 
>   No regressions found.
> 
> Participating hosts (46 -> 40)
> ------------------------------
> 
>   Additional (3): fi-hsw-4770r fi-kbl-r fi-elk-e7500 

Welcome back, you lovable elk.

Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>

Thanks, and well spotted.
-Chris
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c
index 48ba4d61a4ae..8a19eee9c5d4 100644
--- a/drivers/gpu/drm/i915/intel_ringbuffer.c
+++ b/drivers/gpu/drm/i915/intel_ringbuffer.c
@@ -976,20 +976,16 @@  gen5_irq_disable(struct intel_engine_cs *engine)
 static void
 i9xx_irq_enable(struct intel_engine_cs *engine)
 {
-	GEM_BUG_ON(engine->id != RCS0);
-
 	engine->i915->irq_mask &= ~engine->irq_enable_mask;
-	ENGINE_WRITE(engine, RING_IMR, engine->i915->irq_mask);
-	ENGINE_POSTING_READ(engine, RING_IMR);
+	intel_uncore_write(engine->uncore, IMR, engine->i915->irq_mask);
+	intel_uncore_posting_read_fw(engine->uncore, IMR);
 }
 
 static void
 i9xx_irq_disable(struct intel_engine_cs *engine)
 {
-	GEM_BUG_ON(engine->id != RCS0);
-
 	engine->i915->irq_mask |= engine->irq_enable_mask;
-	ENGINE_WRITE(engine, RING_IMR, engine->i915->irq_mask);
+	intel_uncore_write(engine->uncore, IMR, engine->i915->irq_mask);
 }
 
 static void