All of lore.kernel.org
 help / color / mirror / Atom feed
* Subject: [PATCH 1/1] drm/i915: move audio component intialization before audio
@ 2018-03-29  6:16 Shi, Yang A
  2018-03-29  9:58 ` Jani Nikula
  0 siblings, 1 reply; 2+ messages in thread
From: Shi, Yang A @ 2018-03-29  6:16 UTC (permalink / raw)
  To: intel-gfx

snd_hdac driver would use the component interface from i915 driver.
if i915 driver do the audio component intialization too late, snd_hdac
driver will meet ipanic.

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);
-- 
2.7.4

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: Subject: [PATCH 1/1] drm/i915: move audio component intialization before audio
  2018-03-29  6:16 Subject: [PATCH 1/1] drm/i915: move audio component intialization before audio Shi, Yang A
@ 2018-03-29  9:58 ` Jani Nikula
  0 siblings, 0 replies; 2+ messages in thread
From: Jani Nikula @ 2018-03-29  9:58 UTC (permalink / raw)
  To: Shi, Yang A, intel-gfx

On Thu, 29 Mar 2018, "Shi, Yang A" <yang.a.shi@intel.com> wrote:
> snd_hdac driver would use the component interface from i915 driver.
> if i915 driver do the audio component intialization too late, snd_hdac
> driver will meet ipanic.

Please include the oops.

What is it about this patch that fixes the issue? Based on the
description I presume it has nothing to do with i915 internal ordering,
and everything to do with i915 and hdac probe racing. In that case, this
is not a fix, just something to make the race a bit less likely. Is that
the case?

We try hard to make sure our driver has properly been set up internally
before we go ahead and reveal ourselves to the userspace and the rest of
the kernel. This is the i915_driver_register() part. We aren't ready to
register the component ops before that. We aren't ready to handle calls
from audio drivers before that.

What's the problem you have exactly?

BR,
Jani.

>
> 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);

-- 
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-03-29  9:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-29  6:16 Subject: [PATCH 1/1] drm/i915: move audio component intialization before audio Shi, Yang A
2018-03-29  9:58 ` Jani Nikula

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.