mirror of
https://github.com/edk2-porting/linux-next.git
synced 2025-01-25 07:06:40 +08:00
drm/i915: Use the correct IRQ during resume
The code in xcs_resume() probably didn't work as intended. It uses struct drm_device.irq, which is allocated to 0, but never initialized by i915 to the device's interrupt number. Change all calls to synchronize_hardirq() to intel_synchronize_irq(), which uses the correct interrupt. _hardirq() functions are not needed in this context. v5: * go back to _hardirq() after PCI probe reported wrong context; add rsp comment v4: * switch everything to intel_synchronize_irq() (Daniel) v3: * also use intel_synchronize_hardirq() at another callsite v2: * wrap irq code in intel_synchronize_hardirq() (Ville) Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Fixes:536f77b1ca
("drm/i915/gt: Call stop_ring() from ring resume, again") Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Cc: Lucas De Marchi <lucas.demarchi@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: https://patchwork.freedesktop.org/patch/msgid/20210701173618.10718-2-tzimmermann@suse.de (cherry picked from commit27e4b467d9
) Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
This commit is contained in:
parent
995e9bcb42
commit
320ad343ea
@ -1279,7 +1279,7 @@ bool intel_engine_is_idle(struct intel_engine_cs *engine)
|
||||
return true;
|
||||
|
||||
/* Waiting to drain ELSP? */
|
||||
synchronize_hardirq(to_pci_dev(engine->i915->drm.dev)->irq);
|
||||
intel_synchronize_hardirq(engine->i915);
|
||||
intel_engine_flush_submission(engine);
|
||||
|
||||
/* ELSP is empty, but there are ready requests? E.g. after reset */
|
||||
|
@ -184,8 +184,11 @@ static int xcs_resume(struct intel_engine_cs *engine)
|
||||
ENGINE_TRACE(engine, "ring:{HEAD:%04x, TAIL:%04x}\n",
|
||||
ring->head, ring->tail);
|
||||
|
||||
/* Double check the ring is empty & disabled before we resume */
|
||||
synchronize_hardirq(engine->i915->drm.irq);
|
||||
/*
|
||||
* Double check the ring is empty & disabled before we resume. Called
|
||||
* from atomic context during PCI probe, so _hardirq().
|
||||
*/
|
||||
intel_synchronize_hardirq(engine->i915);
|
||||
if (!stop_ring(engine))
|
||||
goto err;
|
||||
|
||||
|
@ -4575,3 +4575,8 @@ void intel_synchronize_irq(struct drm_i915_private *i915)
|
||||
{
|
||||
synchronize_irq(to_pci_dev(i915->drm.dev)->irq);
|
||||
}
|
||||
|
||||
void intel_synchronize_hardirq(struct drm_i915_private *i915)
|
||||
{
|
||||
synchronize_hardirq(to_pci_dev(i915->drm.dev)->irq);
|
||||
}
|
||||
|
@ -94,6 +94,7 @@ void intel_runtime_pm_disable_interrupts(struct drm_i915_private *dev_priv);
|
||||
void intel_runtime_pm_enable_interrupts(struct drm_i915_private *dev_priv);
|
||||
bool intel_irqs_enabled(struct drm_i915_private *dev_priv);
|
||||
void intel_synchronize_irq(struct drm_i915_private *i915);
|
||||
void intel_synchronize_hardirq(struct drm_i915_private *i915);
|
||||
|
||||
int intel_get_crtc_scanline(struct intel_crtc *crtc);
|
||||
void gen8_irq_power_well_post_enable(struct drm_i915_private *dev_priv,
|
||||
|
Loading…
Reference in New Issue
Block a user