diff mbox series

[03/12] drm/i915: Move audio deinit after disabling polling

Message ID 20240104083008.2715733-4-imre.deak@intel.com (mailing list archive)
State New, archived
Headers show
Series drm/i915: Fix HPD handling during driver init/shutdown | expand

Commit Message

Imre Deak Jan. 4, 2024, 8:29 a.m. UTC
Deinitialize audio during driver unload after disabling polling. This is
in preparation to do all the display HW init/deinit steps at a point
where no HPD IRQ or polling initiated connector detection or modeset can
change the HW state. This may still happen here via an HPD IRQ ->
hotplug detection work or a connector sysfs (state/detect) access, but
these will be prevented by later changes in this patchset.

Signed-off-by: Imre Deak <imre.deak@intel.com>
---
 drivers/gpu/drm/i915/display/intel_display_driver.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Comments

Hogander, Jouni Jan. 5, 2024, 1:42 p.m. UTC | #1
On Thu, 2024-01-04 at 10:29 +0200, Imre Deak wrote:
> Deinitialize audio during driver unload after disabling polling. This
> is
> in preparation to do all the display HW init/deinit steps at a point
> where no HPD IRQ or polling initiated connector detection or modeset
> can
> change the HW state. This may still happen here via an HPD IRQ ->
> hotplug detection work or a connector sysfs (state/detect) access,
> but
> these will be prevented by later changes in this patchset.
> 
> Signed-off-by: Imre Deak <imre.deak@intel.com>

Reviewed-by: Jouni Högander <jouni.hogander@intel.com>

> ---
>  drivers/gpu/drm/i915/display/intel_display_driver.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_display_driver.c
> b/drivers/gpu/drm/i915/display/intel_display_driver.c
> index 9df9097a0255a..da549962feccd 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_driver.c
> +++ b/drivers/gpu/drm/i915/display/intel_display_driver.c
> @@ -486,14 +486,15 @@ void intel_display_driver_unregister(struct
> drm_i915_private *i915)
>                 return;
>  
>         intel_fbdev_unregister(i915);
> -       intel_audio_deinit(i915);
> -
>         /*
>          * After flushing the fbdev (incl. a late async config which
>          * will have delayed queuing of a hotplug event), then flush
>          * the hotplug events.
>          */
>         drm_kms_helper_poll_fini(&i915->drm);
> +
> +       intel_audio_deinit(i915);
> +
>         drm_atomic_helper_shutdown(&i915->drm);
>  
>         acpi_video_unregister();
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/display/intel_display_driver.c b/drivers/gpu/drm/i915/display/intel_display_driver.c
index 9df9097a0255a..da549962feccd 100644
--- a/drivers/gpu/drm/i915/display/intel_display_driver.c
+++ b/drivers/gpu/drm/i915/display/intel_display_driver.c
@@ -486,14 +486,15 @@  void intel_display_driver_unregister(struct drm_i915_private *i915)
 		return;
 
 	intel_fbdev_unregister(i915);
-	intel_audio_deinit(i915);
-
 	/*
 	 * After flushing the fbdev (incl. a late async config which
 	 * will have delayed queuing of a hotplug event), then flush
 	 * the hotplug events.
 	 */
 	drm_kms_helper_poll_fini(&i915->drm);
+
+	intel_audio_deinit(i915);
+
 	drm_atomic_helper_shutdown(&i915->drm);
 
 	acpi_video_unregister();