diff mbox

[v2] drm/i915: move audio component initialization before audio driver use it

Message ID 1523343460-6646-1-git-send-email-yang.a.shi@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Shi, Yang A April 10, 2018, 6:57 a.m. UTC
From: Yang Shi <yang.a.shi@intel.com>

issue: snd_soc_skl meet "failed to add i915 component master (-19)" when
platform don't connect any display output.

i915 do initialization before than skl_probe, but if there is no display
output connect, in function drm_dp_dpcd_access, there is a 32 retry for
aux i2c transactions. It will meet timeout and do usleep. Then skl_probe
function will be scheduled. It will call snd_hdac_i915_init, and it will
meet "failed to add i915 component master" error.
And whole snd_soc_skl initialization will be failed, audio can't work normally
anymore.

So i915 driver need to move intel_audio_init at the beginning of
intel_modeset_init. This will make sure i915_audio_component_init process
before snd_hdac_i915_init call it.

V2: edit comments more clearly

Signed-off-by: Bo He <bo.he@intel.com>
Signed-off-by: Yang Shi <yang.a.shi@intel.com>
---
 drivers/gpu/drm/i915/i915_drv.c      | 2 --
 drivers/gpu/drm/i915/intel_display.c | 2 ++
 2 files changed, 2 insertions(+), 2 deletions(-)

Comments

Jani Nikula April 10, 2018, 12:49 p.m. UTC | #1
On Tue, 10 Apr 2018, Yang <yang.a.shi@intel.com> wrote:
> From: Yang Shi <yang.a.shi@intel.com>
>
> issue: snd_soc_skl meet "failed to add i915 component master (-19)" when
> platform don't connect any display output.
>
> i915 do initialization before than skl_probe, but if there is no display
> output connect, in function drm_dp_dpcd_access, there is a 32 retry for
> aux i2c transactions. It will meet timeout and do usleep. Then skl_probe
> function will be scheduled. It will call snd_hdac_i915_init, and it will
> meet "failed to add i915 component master" error.
> And whole snd_soc_skl initialization will be failed, audio can't work normally
> anymore.
>
> So i915 driver need to move intel_audio_init at the beginning of
> intel_modeset_init. This will make sure i915_audio_component_init process
> before snd_hdac_i915_init call it.

No. Please don't send updated versions of patches while the discussion
is still ongoing in the previous thread. This is not the fix.

BR,
Jani.


>
> V2: edit comments more clearly
>
> Signed-off-by: Bo He <bo.he@intel.com>
> Signed-off-by: Yang Shi <yang.a.shi@intel.com>
> ---
>  drivers/gpu/drm/i915/i915_drv.c      | 2 --
>  drivers/gpu/drm/i915/intel_display.c | 2 ++
>  2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
> index 2f5209d..9d25d7e 100644
> --- a/drivers/gpu/drm/i915/i915_drv.c
> +++ b/drivers/gpu/drm/i915/i915_drv.c
> @@ -1243,8 +1243,6 @@ static void i915_driver_register(struct drm_i915_private *dev_priv)
>  	if (IS_GEN5(dev_priv))
>  		intel_gpu_ips_init(dev_priv);
>  
> -	intel_audio_init(dev_priv);
> -
>  	/*
>  	 * Some ports require correctly set-up hpd registers for detection to
>  	 * work properly (leading to ghost connected connector status), e.g. VGA
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index f288bcc..a471c88 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -14468,6 +14468,8 @@ int intel_modeset_init(struct drm_device *dev)
>  
>  	dev->mode_config.funcs = &intel_mode_funcs;
>  
> +	intel_audio_init(dev_priv);
> +
>  	init_llist_head(&dev_priv->atomic_helper.free_list);
>  	INIT_WORK(&dev_priv->atomic_helper.free_work,
>  		  intel_atomic_helper_free_state_worker);
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
index 2f5209d..9d25d7e 100644
--- a/drivers/gpu/drm/i915/i915_drv.c
+++ b/drivers/gpu/drm/i915/i915_drv.c
@@ -1243,8 +1243,6 @@  static void i915_driver_register(struct drm_i915_private *dev_priv)
 	if (IS_GEN5(dev_priv))
 		intel_gpu_ips_init(dev_priv);
 
-	intel_audio_init(dev_priv);
-
 	/*
 	 * Some ports require correctly set-up hpd registers for detection to
 	 * work properly (leading to ghost connected connector status), e.g. VGA
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index f288bcc..a471c88 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -14468,6 +14468,8 @@  int intel_modeset_init(struct drm_device *dev)
 
 	dev->mode_config.funcs = &intel_mode_funcs;
 
+	intel_audio_init(dev_priv);
+
 	init_llist_head(&dev_priv->atomic_helper.free_list);
 	INIT_WORK(&dev_priv->atomic_helper.free_work,
 		  intel_atomic_helper_free_state_worker);