Skip to content

Commit

Permalink
drm/i915: Don't oops during modeset shutdown after lpe audio deinit
Browse files Browse the repository at this point in the history
We deinit the lpe audio device before we call
drm_atomic_helper_shutdown(), which means the platform device
may already be gone when it comes time to shut down the crtc.
As we don't know when the last reference to the platform
device gets dropped by the audio driver we can't assume that
the device and its data are still around when turning off the
crtc. Mark the platform device as gone as soon as we do the
audio deinit.

Cc: stable@vger.kernel.org
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20181105194604.6994-1-ville.syrjala@linux.intel.com
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
  • Loading branch information
Ville Syrjälä committed Nov 6, 2018
1 parent e6db7f4 commit f45a797
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/gpu/drm/i915/intel_lpe_audio.c
Original file line number Diff line number Diff line change
Expand Up @@ -297,8 +297,10 @@ void intel_lpe_audio_teardown(struct drm_i915_private *dev_priv)
lpe_audio_platdev_destroy(dev_priv);

irq_free_desc(dev_priv->lpe_audio.irq);
}

dev_priv->lpe_audio.irq = -1;
dev_priv->lpe_audio.platdev = NULL;
}

/**
* intel_lpe_audio_notify() - notify lpe audio event
Expand Down

0 comments on commit f45a797

Please sign in to comment.