sound: Use -EPROBE_DEFER instead of i915 module loading.
Subsystems (4)
v2 cover sound: Use -EPROBE_DEFER instead of i915 module loading.
Explicitly loading i915 becomes a problem when upstreaming the new intel driver for Tiger Lake and higher graphics (xe). By loading i915, it doesn't wait for driver load of xe, and will fail completely before it loads.
-EPROBE_DEFER has to be returned before any device is created in probe(), otherwise the removal of the device will cause EPROBE_DEFER to try again in an infinite loop.
The conversion is done in gradual steps. First I add an argument to snd_hdac_i915_init to allow for -EPROBE_DEFER so I can convert each driver separately. Then I convert each driver to move snd_hdac_i915_init out of the workqueue. Finally I drop the ability to choose modprobe behavior after the last user is converted.
I suspect the avs and skylake drivers used snd_hdac_i915_init purely for the modprobe, but I don't have the hardware to test if it can be safely removed. It can still be done easily in a followup patch to simplify probing.
---
New since first version:
- snd_hda_core.gpu_bind is added as a mechanism to force gpu binding, for testing. snd_hda_core.gpu_bind=0 forces waiting for GPU bind to off, snd_hda_core.gpu_bind=1 forces waiting for gpu bind. Default setting depends on whether kernel booted with nomodeset.
- Incorporated all feedback review.
Maarten Lankhorst (9):
ALSA: hda/intel: Fix error handling in azx_probe()
ALSA: hda/i915: Allow override of gpu binding.
ALSA: hda/i915: Add an allow_modprobe argument to snd_hdac_i915_init
ALSA: hda/i915: Allow xe as match for i915_component_master_match
ASoC: Intel: avs: Move snd_hdac_i915_init to before probe_work.
ASoC: Intel: Skylake: Move snd_hdac_i915_init to before probe_work.
ALSA: hda/intel: Move snd_hdac_i915_init to before probe_work.
ASoC: SOF: Intel: Remove deferred probe for SOF
ALSA: hda/i915: Remove extra argument from snd_hdac_i915_init
sound/hda/hdac_i915.c | 25 ++++++++------- sound/pci/hda/hda_intel.c | 60 ++++++++++++++++++----------------- sound/soc/intel/avs/core.c | 13 +++++--- sound/soc/intel/skylake/skl.c | 31 ++++++------------ sound/soc/sof/Kconfig | 19 ----------- sound/soc/sof/core.c | 38 ++-------------------- sound/soc/sof/intel/Kconfig | 1 - sound/soc/sof/intel/hda.c | 32 +++++++++++-------- sound/soc/sof/sof-pci-dev.c | 3 +- sound/soc/sof/sof-priv.h | 5 --- 10 files changed, 85 insertions(+), 142 deletions(-)
Signature · 1 line
2.39.2
PATCH v2 1/9 ALSA: hda/intel: Fix error handling in azx_probe()
Add missing pci_set_drv to NULL call on error.
--- sound/pci/hda/hda_intel.c | 1 + 1 file changed, 1 insertion(+)
sound/pci/hda/hda_intel.c +1 -0
@@ -2188,6 +2188,7 @@ static int azx_probe(struct pci_dev *pci,return 0 ; out_free: +pci_set_drvdata (pci,NULL );snd_card_free (card);return err; }
Signature · 1 line
2.39.2
Re: [PATCH v2 1/9] ALSA: hda/intel: Fix error handling in azx_probe()
Quoted 12 lines · Maarten Lankhorst
Add missing
pci_set_drvto NULL call on error.Signed-off-by Maarten Lankhorst <[email protected]>--- sound/pci/hda/hda_intel.c | 1 + 1 file changed, 1 insertion(+)sound/pci/hda/hda_intel.c +0
-0
sound/pci/hda/hda_intel.c static int azx_probe(struct pci_dev *pci, · line 2191
Quoted 4 lines
sound/pci/hda/hda_intel.c +1
-0@@ -2188,6 +2188,7 @@ static int azx_probe(struct pci_dev *pci,return 0 ; out_free: +pci_set_drvdata (pci,NULL );
The original patch added this:f4c482a4d0b3 ("ALSA: hda - Fix yet another race of vga_switcheroo registration")
but got removed later by:20a24225d8f9 ("ALSA: PCI: Remove superfluous pci_set_drvdata(pci, NULL) at remove")
and partially added back (to azx_remove) by:e81478bbe7a1 ("ALSA: hda: fix general protection fault in azx_runtime_idle")
I guess, it should do not harm to add it back...
sound/pci/hda/hda_intel.c static int azx_probe(struct pci_dev *pci, · line 2194
Quoted 3 lines
sound/pci/hda/hda_intel.c +0
-0snd_card_free (card);return err; }
Pierre-Louis Bossart
Reviewed-byRe: [PATCH v2 1/9] ALSA: hda/intel: Fix error handling in azx_probe()
Quoted 28 lines · Péter Ujfalusi
Quoted 12 lines · Maarten Lankhorst
Add missing
pci_set_drvto NULL call on error.Signed-off-by Maarten Lankhorst <[email protected]>--- sound/pci/hda/hda_intel.c | 1 + 1 file changed, 1 insertion(+)sound/pci/hda/hda_intel.c +0
-0sound/pci/hda/hda_intel.c static int azx_probe(struct pci_dev *pci, · line 2191
Quoted 4 lines
sound/pci/hda/hda_intel.c +1
-0@@ -2188,6 +2188,7 @@ static int azx_probe(struct pci_dev *pci,return 0 ; out_free: +pci_set_drvdata (pci,NULL );The original patch added this:
f4c482a4d0b3("ALSA: hda - Fix yet another race ofvga_switcherooregistration")but got removed later by:
20a24225d8f9("ALSA: PCI: Remove superfluouspci_set_drvdata(pci, NULL)at remove")and partially added back (to
azx_remove) by:e81478bbe7a1("ALSA: hda: fix general protection fault inazx_runtime_idle")
Quoted 7 lines
I guess, it should do not harm to add it back...
sound/pci/hda/hda_intel.c static int azx_probe(struct pci_dev *pci, · line 2194
Quoted 3 lines
sound/pci/hda/hda_intel.c +0
-0snd_card_free (card);return err; }Reviewed-by Peter Ujfalusi <[email protected]>
PATCH v2 2/9 ALSA: hda/i915: Allow override of gpu binding.
In reply to Maarten LankhorstSelecting CONFIG_DRM selects CONFIG_VIDEO_NOMODESET, which exports video_firmware_drivers_only(). This can be used as a first approximation on whether i915 will be available. It's safe to use as this is only built when CONFIG_SND_HDA_I915 is selected by CONFIG_I915.
It's not completely fool proof, as you can boot with "nomodeset i915.modeset=1" to make i915 load regardless, or use "i915.force_probe=!*" to never load i915, but the common case of booting with nomodeset to disable all GPU drivers this will work as intended.
Because of this, we add an extra module parameter, snd_hda_core.gpu_bind that can be used to signal users intent. -1 follows nomodeset, 0 disables binding, 1 forces wait/-EPROBE_DEFER on binding.
--- sound/hda/hdac_i915.c | 10 ++++++++++ 1 file changed, 10 insertions(+)
sound/hda/hdac_i915.c +10 -0
@@ -11,6 +11,13 @@#include <sound/hda_i915.h> #include <sound/hda_register.h> +#include <video/nomodeset.h> + +static int gpu_bind =-1 ; +module_param (gpu_bind, int,0644 ); +MODULE_PARM_DESC (gpu_bind,"Whether to bind sound component to GPU " +"(1=always, 0=never, -1=on nomodeset(default))" ); +#define IS_HSW_CONTROLLER (pci) (((pci)->device == 0x0a0c) || \ ((pci)->device == 0x0c0c) || \ ((pci)->device == 0x0d0c) || \
@@ -121,6 +128,9 @@ static int i915_gfx_present(struct pci_dev *hdac_pci) {struct pci_dev *display_dev =NULL ; +if (!gpu_bind || (gpu_bind <0 &&video_firmware_drivers_only ())) +return false; +for_each_pci_dev (display_dev) { if (display_dev->vendor == PCI_VENDOR_ID_INTEL && (display_dev->class >> 16) == PCI_BASE_CLASS_DISPLAY &&
Signature · 1 line
2.39.2
Re: [PATCH v2 2/9] ALSA: hda/i915: Allow override of gpu binding.
Quoted 11 lines · Maarten Lankhorst
Selecting
CONFIG_DRMselectsCONFIG_VIDEO_NOMODESET, which exportsvideo_firmware_drivers_only(). This can be used as a first approximation on whether i915 will be available. It's safe to use as this is only built whenCONFIG_SND_HDA_I915is selected byCONFIG_I915.It's not completely fool proof, as you can boot with "nomodeset i915.modeset=1" to make i915 load regardless, or use "i915.force_probe=!*" to never load i915, but the common case of booting with nomodeset to disable all GPU drivers this will work as intended.
Quoted 4 lines
Because of this, we add an extra module parameter, snd_hda_core.gpu_bind that can be used to signal users intent. -1 follows nomodeset, 0 disables binding, 1 forces wait/-EPROBE_DEFER on binding.
Quoted 33 lines
Signed-off-by Maarten Lankhorst <[email protected]>--- sound/hda/hdac_i915.c | 10 ++++++++++ 1 file changed, 10 insertions(+)sound/hda/hdac_i915.c +10
-0@@ -11,6 +11,13 @@#include <sound/hda_i915.h> #include <sound/hda_register.h> +#include <video/nomodeset.h> + +static int gpu_bind =-1 ; +module_param (gpu_bind, int,0644 ); +MODULE_PARM_DESC (gpu_bind,"Whether to bind sound component to GPU " +"(1=always, 0=never, -1=on nomodeset(default))" ); +#define IS_HSW_CONTROLLER (pci) (((pci)->device == 0x0a0c) || \ ((pci)->device == 0x0c0c) || \ ((pci)->device == 0x0d0c) || \@@ -121,6 +128,9 @@ static int i915_gfx_present(struct pci_dev *hdac_pci) {struct pci_dev *display_dev =NULL ; +if (!gpu_bind || (gpu_bind <0 &&video_firmware_drivers_only ())) +return false; +for_each_pci_dev (display_dev) { if (display_dev->vendor == PCI_VENDOR_ID_INTEL && (display_dev->class >> 16) == PCI_BASE_CLASS_DISPLAY &&
Signature · 1 line
Péter
Re: [PATCH v2 2/9] ALSA: hda/i915: Allow override of gpu binding.
Quoted 48 lines · Péter Ujfalusi
Quoted 11 lines · Maarten Lankhorst
Selecting
CONFIG_DRMselectsCONFIG_VIDEO_NOMODESET, which exportsvideo_firmware_drivers_only(). This can be used as a first approximation on whether i915 will be available. It's safe to use as this is only built whenCONFIG_SND_HDA_I915is selected byCONFIG_I915.It's not completely fool proof, as you can boot with "nomodeset i915.modeset=1" to make i915 load regardless, or use "i915.force_probe=!*" to never load i915, but the common case of booting with nomodeset to disable all GPU drivers this will work as intended.
Quoted 4 lines
Because of this, we add an extra module parameter, snd_hda_core.gpu_bind that can be used to signal users intent. -1 follows nomodeset, 0 disables binding, 1 forces wait/-EPROBE_DEFER on binding.
Reviewed-by Peter Ujfalusi <[email protected]>Quoted 27 lines
Signed-off-by Maarten Lankhorst <[email protected]>--- sound/hda/hdac_i915.c | 10 ++++++++++ 1 file changed, 10 insertions(+)sound/hda/hdac_i915.c +7
-0@@ -11,6 +11,13 @@#include <sound/hda_i915.h> #include <sound/hda_register.h> +#include <video/nomodeset.h> + +static int gpu_bind =-1 ; +module_param (gpu_bind, int,0644 ); +MODULE_PARM_DESC (gpu_bind,"Whether to bind sound component to GPU " +"(1=always, 0=never, -1=on nomodeset(default))" ); +#define IS_HSW_CONTROLLER (pci) (((pci)->device == 0x0a0c) || \ ((pci)->device == 0x0c0c) || \ ((pci)->device == 0x0d0c) || \@@ -121,6 +128,9 @@ static int i915_gfx_present(struct pci_dev *hdac_pci) {struct pci_dev *display_dev =NULL ;
Quoted 2 lines
sound/hda/hdac_i915.c static int i915_gfx_present(struct pci_dev *hdac_pci) · line 132
Quoted 2 lines
sound/hda/hdac_i915.c +2
-0+if (!gpu_bind || (gpu_bind <0 &&video_firmware_drivers_only ())) +return false;
Bear with me since I am just going back to work mode but I can't figure out what the second part of the test does
bool video_firmware_drivers_only(void)
{
return video_nomodeset;
}EXPORT_SYMBOL(video_firmware_drivers_only);
and video_nomodeset=1 by default, so why would we return false when gpu_bind = -1?
This seems to be a change of functionality, what am I missing?
Quoted 5 lines
Quoted 4 lines
sound/hda/hdac_i915.c +1
-0+for_each_pci_dev (display_dev) { if (display_dev->vendor == PCI_VENDOR_ID_INTEL && (display_dev->class >> 16) == PCI_BASE_CLASS_DISPLAY &&
Re: [PATCH v2 2/9] ALSA: hda/i915: Allow override of gpu binding.
Hey,
Quoted 62 lines · Pierre-Louis Bossart
Quoted 48 lines · Péter Ujfalusi
Quoted 11 lines · Maarten Lankhorst
Selecting
CONFIG_DRMselectsCONFIG_VIDEO_NOMODESET, which exportsvideo_firmware_drivers_only(). This can be used as a first approximation on whether i915 will be available. It's safe to use as this is only built whenCONFIG_SND_HDA_I915is selected byCONFIG_I915.It's not completely fool proof, as you can boot with "nomodeset i915.modeset=1" to make i915 load regardless, or use "i915.force_probe=!*" to never load i915, but the common case of booting with nomodeset to disable all GPU drivers this will work as intended.
Quoted 4 lines
Because of this, we add an extra module parameter, snd_hda_core.gpu_bind that can be used to signal users intent. -1 follows nomodeset, 0 disables binding, 1 forces wait/-EPROBE_DEFER on binding.
Reviewed-by Peter Ujfalusi <[email protected]>Quoted 27 lines
Signed-off-by Maarten Lankhorst <[email protected]>--- sound/hda/hdac_i915.c | 10 ++++++++++ 1 file changed, 10 insertions(+)sound/hda/hdac_i915.c +7
-0@@ -11,6 +11,13 @@#include <sound/hda_i915.h> #include <sound/hda_register.h> +#include <video/nomodeset.h> + +static int gpu_bind =-1 ; +module_param (gpu_bind, int,0644 ); +MODULE_PARM_DESC (gpu_bind,"Whether to bind sound component to GPU " +"(1=always, 0=never, -1=on nomodeset(default))" ); +#define IS_HSW_CONTROLLER (pci) (((pci)->device == 0x0a0c) || \ ((pci)->device == 0x0c0c) || \ ((pci)->device == 0x0d0c) || \@@ -121,6 +128,9 @@ static int i915_gfx_present(struct pci_dev *hdac_pci) {struct pci_dev *display_dev =NULL ;Quoted 2 lines
sound/hda/hdac_i915.c static int i915_gfx_present(struct pci_dev *hdac_pci) · line 132
Quoted 2 lines
sound/hda/hdac_i915.c +2
-0+if (!gpu_bind || (gpu_bind <0 &&video_firmware_drivers_only ())) +return false;Bear with me since I am just going back to work mode but I can't figure out what the second part of the test does
bool
video_firmware_drivers_only(void){ return video_nomodeset; }
Quoted 6 lines
EXPORT_SYMBOL(video_firmware_drivers_only);and video_nomodeset=1 by default, so why would we return false when
gpu_bind= -1?This seems to be a change of functionality, what am I missing?
video_nomodeset is 0 by default, only when nomodeset is given as argument is it set to 1. :-)
Cheers,
~Maarten
Re: [PATCH v2 2/9] ALSA: hda/i915: Allow override of gpu binding.
Quoted 19 lines
Quoted 19 lines
Quoted 8 lines
Quoted 8 lines
sound/hda/hdac_i915.c +0
-0@@ -121,6 +128,9 @@ static int i915_gfx_present(struct pci_dev *hdac_pci) { struct pci_dev *display_dev = NULL;+ if (!gpu_bind || (
gpu_bind< 0 &&video_firmware_drivers_only()))
+ return false;Bear with me since I am just going back to work mode but I can't figure out what the second part of the test does
bool
video_firmware_drivers_only(void)
{
returnvideo_nomodeset;
}EXPORT_SYMBOL(video_firmware_drivers_only);
Quoted 6 lines
Quoted 4 lines
and video_nomodeset=1 by default, so why would we return false when
gpu_bind= -1?This seems to be a change of functionality, what am I missing?
video_nomodesetis 0 by default, only when nomodeset is given as argument is it set to 1. :-)
I must be missing something on how the default is handled.
bool video_firmware_drivers_only(void)
{
return video_nomodeset;
}EXPORT_SYMBOL(video_firmware_drivers_only);
static int __init disable_modeset(char *str)
{
video_nomodeset = true;isn't default 'true' then?
Re: [PATCH v2 2/9] ALSA: hda/i915: Allow override of gpu binding.
Quoted 34 lines · Pierre-Louis Bossart
Quoted 20 lines
Quoted 20 lines
Quoted 9 lines
Quoted 9 lines
sound/hda/hdac_i915.c +0
-0@@ -121,6 +128,9 @@ static int i915_gfx_present(struct pci_dev *hdac_pci) { struct pci_dev *display_dev = NULL;+ if (!gpu_bind || (
gpu_bind< 0 &&video_firmware_drivers_only()))
+ return false;Bear with me since I am just going back to work mode but I can't figure out what the second part of the test does
bool
video_firmware_drivers_only(void)
{
returnvideo_nomodeset;
}EXPORT_SYMBOL(video_firmware_drivers_only);Quoted 6 lines
Quoted 4 lines
and video_nomodeset=1 by default, so why would we return false when
gpu_bind= -1?This seems to be a change of functionality, what am I missing?
video_nomodesetis 0 by default, only when nomodeset is given as argument is it set to 1. :-)I must be missing something on how the default is handled.
bool
video_firmware_drivers_only(void){ return video_nomodeset; }
Quoted 7 lines
EXPORT_SYMBOL(video_firmware_drivers_only);static int
__initdisable_modeset(char *str){ video_nomodeset = true;isn't default 'true' then?
disable_modeset() is called *only* when nomodeset boot option is given. Then it overrides the value to true.
Takashi
PATCH v2 3/9 ALSA: hda/i915: Add an allow_modprobe argument to snd_hdac_i915_init
In reply to Maarten LankhorstXe is a new GPU driver that re-uses the display (and sound) code from i915. It's no longer possible to load i915, as the GPU can be driven by the xe driver instead.
The new behavior will return -EPROBE_DEFER, and wait for a compatible driver to be loaded instead of modprobing i915.
Converting all drivers at the same time is a lot of work, instead we will convert each user one by one.
Changes since v1:
- Use dev_err_probe to set a probe reason for debugfs' deferred_devices.
--- include/sound/hda_i915.h | 4 ++-- sound/hda/hdac_i915.c | 8 ++++---- sound/pci/hda/hda_intel.c | 2 +- sound/soc/intel/avs/core.c | 2 +- sound/soc/intel/skylake/skl.c | 2 +- sound/soc/sof/intel/hda-codec.c | 2 +- 6 files changed, 10 insertions(+), 10 deletions(-)
include/sound/hda_i915.h +2 -2
@@ -9,12 +9,12 @@#ifdef CONFIG_SND_HDA_I915 void snd_hdac_i915_set_bclk (struct hdac_bus *bus); -int snd_hdac_i915_init (struct hdac_bus *bus); +int snd_hdac_i915_init (struct hdac_bus *bus,bool allow_modprobe);#else static inline void snd_hdac_i915_set_bclk (struct hdac_bus *bus) { } -static inline int snd_hdac_i915_init (struct hdac_bus *bus) +static inline int snd_hdac_i915_init (struct hdac_bus *bus,bool allow_modprobe) {return -ENODEV ; }
sound/hda/hdac_i915.c +4 -4
@@ -155,7 +155,7 @@ static int i915_gfx_present(struct pci_dev *hdac_pci)* * Returns zero for success or a negative error code. */ -int snd_hdac_i915_init (struct hdac_bus *bus) +int snd_hdac_i915_init (struct hdac_bus *bus,bool allow_modprobe) {struct drm_audio_component *acomp;int err;
@@ -171,7 +171,7 @@ int snd_hdac_i915_init(struct hdac_bus *bus) acomp = bus->audio_component;if (!acomp)return -ENODEV ; -if (!acomp->ops) { +if (allow_modprobe && !acomp->ops) {if (!IS_ENABLED (CONFIG_MODULES ) || !request_module ("i915" )) {/* 60s timeout */
@@ -180,9 +180,9 @@ int snd_hdac_i915_init(struct hdac_bus *bus) } }if (!acomp->ops) { -dev_info (bus->dev,"couldn't bind with audio component\n" ); +int err = allow_modprobe ? -ENODEV : -EPROBE_DEFER ;snd_hdac_acomp_exit (bus); -return -ENODEV ; +return dev_err_probe (bus->dev, err,"couldn't bind with audio component\n" ); }return 0 ; }
sound/pci/hda/hda_intel.c +1 -1
@@ -2277,7 +2277,7 @@ static int azx_probe_continue(struct azx *chip)/* bind with i915 if needed */ if (chip->driver_caps &AZX_DCAPS_I915_COMPONENT ) { - err =snd_hdac_i915_init (bus); + err =snd_hdac_i915_init (bus, true);if (err <0 ) {/* if the controller is bound only with HDMI/DP * (for HSW and BDW), we need to abort the probe;
sound/soc/intel/avs/core.c +1 -1
@@ -191,7 +191,7 @@ static void avs_hda_probe_work(struct work_struct *work)pm_runtime_set_active (bus->dev);/* clear runtime_error flag */ - ret =snd_hdac_i915_init (bus); + ret =snd_hdac_i915_init (bus, true);if (ret <0 )dev_info (bus->dev,"i915 init unsuccessful: %d\n" , ret);
sound/soc/intel/skylake/skl.c +1 -1
@@ -791,7 +791,7 @@ static int skl_i915_init(struct hdac_bus *bus)* The HDMI codec is in GPU so we need to ensure that it is powered * up and ready for probe */ - err =snd_hdac_i915_init (bus); + err =snd_hdac_i915_init (bus, true);if (err <0 )return err;
sound/soc/sof/intel/hda-codec.c +1 -1
@@ -415,7 +415,7 @@ int hda_codec_i915_init(struct snd_sof_dev *sdev)return 0 ;/* i915 exposes a HDA codec for HDMI audio */ - ret =snd_hdac_i915_init (bus); + ret =snd_hdac_i915_init (bus, true);if (ret <0 )return ret;
Signature · 1 line
2.39.2
Péter Ujfalusi
maintainerRe: [PATCH v2 3/9] ALSA: hda/i915: Add an allow_modprobe argument to snd_hdac_i915_init
Quoted 46 lines · Maarten Lankhorst
Xe is a new GPU driver that re-uses the display (and sound) code from i915. It's no longer possible to load i915, as the GPU can be driven by the xe driver instead.
The new behavior will return -EPROBE_DEFER, and wait for a compatible driver to be loaded instead of modprobing i915.
Converting all drivers at the same time is a lot of work, instead we will convert each user one by one.
Changes since v1:
- Usedev_err_probeto set a probe reason for debugfs'deferred_devices.Signed-off-by Maarten Lankhorst <[email protected]>--- include/sound/hda_i915.h | 4 ++-- sound/hda/hdac_i915.c | 8 ++++---- sound/pci/hda/hda_intel.c | 2 +- sound/soc/intel/avs/core.c | 2 +- sound/soc/intel/skylake/skl.c | 2 +- sound/soc/sof/intel/hda-codec.c | 2 +- 6 files changed, 10 insertions(+), 10 deletions(-)sound/hda/hdac_i915.c +2
-2@@ -155,7 +155,7 @@ static int i915_gfx_present(struct pci_dev *hdac_pci)* * Returns zero for success or a negative error code. */ -int snd_hdac_i915_init (struct hdac_bus *bus) +int snd_hdac_i915_init (struct hdac_bus *bus,bool allow_modprobe) {struct drm_audio_component *acomp;int err;@@ -171,7 +171,7 @@ int snd_hdac_i915_init(struct hdac_bus *bus) acomp = bus->audio_component;if (!acomp)return -ENODEV ; -if (!acomp->ops) { +if (allow_modprobe && !acomp->ops) {if (!IS_ENABLED (CONFIG_MODULES ) || !request_module ("i915" )) {/* 60s timeout */
sound/hda/hdac_i915.c int snd_hdac_i915_init(struct hdac_bus *bus) · line 183
Quoted 5 lines
sound/hda/hdac_i915.c +1
-1@@ -180,9 +180,9 @@ int snd_hdac_i915_init(struct hdac_bus *bus) } }if (!acomp->ops) { -dev_info (bus->dev,"couldn't bind with audio component\n" ); +int err = allow_modprobe ? -ENODEV : -EPROBE_DEFER ;
Add one blank line here.
Quoted 6 lines
sound/hda/hdac_i915.c +1
-1snd_hdac_acomp_exit (bus); -return -ENODEV ; +return dev_err_probe (bus->dev, err,"couldn't bind with audio component\n" ); }return 0 ; }
Signature · 1 line
Péter
PATCH v2 4/9 ALSA: hda/i915: Allow xe as match for i915_component_master_match
In reply to Maarten Lankhorstxe is a new driver for intel GPU's that shares the sound related code with i915.
Don't allow it to be modprobed though; the module is not upstream yet and we should exclusively use the EPROBE_DEFER mechanism.
--- sound/hda/hdac_i915.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
sound/hda/hdac_i915.c +2 -1
@@ -115,7 +115,8 @@ static int i915_component_master_match(struct device *dev, int subcomponent, hdac_pci =to_pci_dev (bus->dev); i915_pci =to_pci_dev (dev); -if (!strcmp (dev->driver->name,"i915" ) && +if ((!strcmp (dev->driver->name,"i915" ) || + !strcmp (dev->driver->name,"xe" )) && subcomponent ==I915_COMPONENT_AUDIO &&connectivity_check (i915_pci, hdac_pci))return 1 ;
Signature · 1 line
2.39.2
Re: [PATCH v2 4/9] ALSA: hda/i915: Allow xe as match for i915_component_master_match
Quoted 5 lines · Maarten Lankhorst
xe is a new driver for intel GPU's that shares the sound related code with i915.
Don't allow it to be modprobed though; the module is not upstream yet and we should exclusively use the
EPROBE_DEFERmechanism.
Quoted 19 lines
Signed-off-by Maarten Lankhorst <[email protected]>--- sound/hda/hdac_i915.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)sound/hda/hdac_i915.c +2
-1@@ -115,7 +115,8 @@ static int i915_component_master_match(struct device *dev, int subcomponent, hdac_pci =to_pci_dev (bus->dev); i915_pci =to_pci_dev (dev); -if (!strcmp (dev->driver->name,"i915" ) && +if ((!strcmp (dev->driver->name,"i915" ) || + !strcmp (dev->driver->name,"xe" )) && subcomponent ==I915_COMPONENT_AUDIO &&connectivity_check (i915_pci, hdac_pci))return 1 ;
Signature · 1 line
Péter
Re: [PATCH v2 4/9] ALSA: hda/i915: Allow xe as match for i915_component_master_match
In reply to Maarten LankhorstQuoted 5 lines · Maarten Lankhorst
xe is a new driver for intel GPU's that shares the sound related code with i915.
Don't allow it to be modprobed though; the module is not upstream yet and we should exclusively use the
EPROBE_DEFERmechanism.
I can't figure out what this comment means.
how would the -EPROBE_DEFER mechanism help if the driver that will trigger a new probe is not upstream?
Not following at all what you intended to explain.
Quoted 20 lines
Signed-off-by Maarten Lankhorst <[email protected]>--- sound/hda/hdac_i915.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)sound/hda/hdac_i915.c +2
-1@@ -115,7 +115,8 @@ static int i915_component_master_match(struct device *dev, int subcomponent, hdac_pci =to_pci_dev (bus->dev); i915_pci =to_pci_dev (dev); -if (!strcmp (dev->driver->name,"i915" ) && +if ((!strcmp (dev->driver->name,"i915" ) || + !strcmp (dev->driver->name,"xe" )) && subcomponent ==I915_COMPONENT_AUDIO &&connectivity_check (i915_pci, hdac_pci))return 1 ;
Re: [PATCH v2 4/9] ALSA: hda/i915: Allow xe as match for i915_component_master_match
Hey,
Quoted 9 lines · Pierre-Louis Bossart
Quoted 5 lines · Maarten Lankhorst
xe is a new driver for intel GPU's that shares the sound related code with i915.
Don't allow it to be modprobed though; the module is not upstream yet and we should exclusively use the
EPROBE_DEFERmechanism.
Quoted 6 lines
I can't figure out what this comment means.
how would the -EPROBE_DEFER mechanism help if the driver that will trigger a new probe is not upstream?
Not following at all what you intended to explain.
What I mean is that there is code inside the current code that does request_module("i915"), the comment meant I didn't try to add any logic for request_module("xe"), as the driver is not merged yet.
Additionally I am removing the request_module logic, but this comment was written when I first tried the simple solution of request_module("xe").
Turns out telepathy is hard, and using -EPROBE_DEFER is much simpler. :-)
Cheers,
~Maarten
PATCH v2 5/9 ASoC: Intel: avs: Move snd_hdac_i915_init to before probe_work.
In reply to Maarten LankhorstNow that we can use -EPROBE_DEFER, it's no longer required to spin off the snd_hdac_i915_init into a workqueue. It's likely the whole workqueue can be destroyed, but I don't have the means to test this.
Removing the workqueue would simplify init even further, but is left as exercise for the reviewer.
Changes since v1:
- Rename error label.
--- sound/soc/intel/avs/core.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-)
sound/soc/intel/avs/core.c +9 -4
@@ -191,10 +191,6 @@ static void avs_hda_probe_work(struct work_struct *work)pm_runtime_set_active (bus->dev);/* clear runtime_error flag */ - ret =snd_hdac_i915_init (bus, true); -if (ret <0 ) -dev_info (bus->dev,"i915 init unsuccessful: %d\n" , ret); -snd_hdac_display_power (bus,HDA_CODEC_IDX_CONTROLLER , true);avs_hdac_bus_init_chip (bus, true);avs_hdac_bus_probe_codecs (bus);
@@ -465,10 +461,19 @@ static int avs_pci_probe(struct pci_dev *pci, const struct pci_device_id *id)pci_set_drvdata (pci, bus);device_disable_async_suspend (dev); + ret =snd_hdac_i915_init (bus, false); +if (ret == -EPROBE_DEFER ) + goto err_i915_init; +else if (ret <0 ) +dev_info (bus->dev,"i915 init unsuccessful: %d\n" , ret); +schedule_work (&adev->probe_work);return 0 ; +err_i915_init: +pci_clear_master (pci); +pci_set_drvdata (pci,NULL ); err_acquire_irq:snd_hdac_bus_free_stream_pages (bus);snd_hdac_ext_stream_free_all (bus);
Signature · 1 line
2.39.2
PATCH v2 6/9 ASoC: Intel: Skylake: Move snd_hdac_i915_init to before probe_work.
In reply to Maarten LankhorstNow that we can use -EPROBE_DEFER, it's no longer required to spin off the snd_hdac_i915_init into a workqueue. It's likely the whole workqueue can be destroyed, but I don't have the means to test this.
Removing the workqueue would simplify init even further, but is left as exercise for the reviewer.
--- sound/soc/intel/skylake/skl.c | 31 +++++++++---------------------- 1 file changed, 9 insertions(+), 22 deletions(-)
sound/soc/intel/skylake/skl.c +9 -22
@@ -783,23 +783,6 @@ static void skl_codec_create(struct hdac_bus *bus) } } -static int skl_i915_init (struct hdac_bus *bus) -{ -int err; - -/* -* The HDMI codec is in GPU so we need to ensure that it is powered -* up and ready for probe -*/ - err =snd_hdac_i915_init (bus, true); -if (err <0 ) -return err; - -snd_hdac_display_power (bus,HDA_CODEC_IDX_CONTROLLER , true); - -return 0 ; -} -static void skl_probe_work (struct work_struct *work) { struct skl_dev *skl = container_of(work, struct skl_dev, probe_work);
@@ -807,11 +790,8 @@ static void skl_probe_work(struct work_struct *work)struct hdac_ext_link *hlink;int err; -if (IS_ENABLED (CONFIG_SND_SOC_HDAC_HDMI )) { - err =skl_i915_init (bus); -if (err <0 ) -return ; - } +if (IS_ENABLED (CONFIG_SND_SOC_HDAC_HDMI )) +snd_hdac_display_power (bus,HDA_CODEC_IDX_CONTROLLER , true);skl_init_pci (skl);skl_dum_set (bus);
@@ -1075,10 +1055,17 @@ static int skl_probe(struct pci_dev *pci, goto out_dsp_free; } +if (IS_ENABLED (CONFIG_SND_SOC_HDAC_HDMI )) { + err =snd_hdac_i915_init (bus, false); +if (err <0 ) + goto out_dmic_unregister; + }schedule_work (&skl->probe_work);return 0 ; +out_dmic_unregister: +skl_dmic_device_unregister (skl); out_dsp_free:skl_free_dsp (skl); out_clk_free:
Signature · 1 line
2.39.2
PATCH v2 7/9 ALSA: hda/intel: Move snd_hdac_i915_init to before probe_work.
In reply to Maarten LankhorstNow that we can use -EPROBE_DEFER, it's no longer required to spin off the snd_hdac_i915_init into a workqueue.
Use the -EPROBE_DEFER mechanism instead, which must be returned in the probe function.
Changes since v1:
- Use dev_err_probe()
- Don't move probed_devs bitmap unnecessarily. (tiwai)
- Move snd_hdac_i915_init slightly upward, to ensure it's always initialised before vga-switcheroo is called.
--- sound/pci/hda/hda_intel.c | 59 ++++++++++++++++++++------------------- 1 file changed, 30 insertions(+), 29 deletions(-)
sound/pci/hda/hda_intel.c +30 -29
@@ -2147,6 +2147,36 @@ static int azx_probe(struct pci_dev *pci,pci_set_drvdata (pci, card); +#ifdef CONFIG_SND_HDA_I915 +/* bind with i915 if needed */ +if (chip->driver_caps &AZX_DCAPS_I915_COMPONENT ) { + err =snd_hdac_i915_init (azx_bus (chip), false); +if (err <0 ) { +/* if the controller is bound only with HDMI/DP +* (for HSW and BDW), we need to abort the probe; +* for other chips, still continue probing as other +* codecs can be on the same link. +*/ +if (CONTROLLER_IN_GPU (pci)) { +dev_err_probe (card->dev, err, +"HSW/BDW HD-audio HDMI/DP requires binding with gfx driver\n" ); + + goto out_free; + }else { +/* don't bother any longer */ + chip->driver_caps &= ~AZX_DCAPS_I915_COMPONENT ; + } + } + +/* HSW/BDW controllers need this power */ +if (CONTROLLER_IN_GPU (pci)) + hda->need_i915_power = true; + } +#else +if (CONTROLLER_IN_GPU (pci)) +dev_err (card->dev,"Haswell/Broadwell HDMI/DP must build in CONFIG_SND_HDA_I915\n" ); +#endif + err =register_vga_switcheroo (chip);if (err <0 ) {dev_err (card->dev,"Error registering vga_switcheroo client\n" );
@@ -2174,11 +2204,6 @@ static int azx_probe(struct pci_dev *pci, }#endif /* CONFIG_SND_HDA_PATCH_LOADER */ -#ifndef CONFIG_SND_HDA_I915 -if (CONTROLLER_IN_GPU (pci)) -dev_err (card->dev,"Haswell/Broadwell HDMI/DP must build in CONFIG_SND_HDA_I915\n" ); -#endif -if (schedule_probe)schedule_delayed_work (&hda->probe_work,0 );
@@ -2275,30 +2300,6 @@ static int azx_probe_continue(struct azx *chip)to_hda_bus (bus)->bus_probing =1 ; hda->probe_continued =1 ; -/* bind with i915 if needed */ -if (chip->driver_caps &AZX_DCAPS_I915_COMPONENT ) { - err =snd_hdac_i915_init (bus, true); -if (err <0 ) { -/* if the controller is bound only with HDMI/DP -* (for HSW and BDW), we need to abort the probe; -* for other chips, still continue probing as other -* codecs can be on the same link. -*/ -if (CONTROLLER_IN_GPU (pci)) { -dev_err (chip->card->dev, -"HSW/BDW HD-audio HDMI/DP requires binding with gfx driver\n" ); - goto out_free; - }else { -/* don't bother any longer */ - chip->driver_caps &= ~AZX_DCAPS_I915_COMPONENT ; - } - } - -/* HSW/BDW controllers need this power */ -if (CONTROLLER_IN_GPU (pci)) - hda->need_i915_power = true; - } -/* Request display power well for the HDA controller or codec. For * Haswell/Broadwell, both the display HDA controller and codec need * this power. For other platforms, like Baytrail/Braswell, only the
Signature · 1 line
2.39.2
Re: [PATCH v2 7/9] ALSA: hda/intel: Move snd_hdac_i915_init to before probe_work.
Quoted 44 lines · Maarten Lankhorst
Now that we can use -EPROBE_DEFER, it's no longer required to spin off the
snd_hdac_i915_initinto a workqueue.Use the -EPROBE_DEFER mechanism instead, which must be returned in the probe function.
Changes since v1:
- Usedev_err_probe()
- Don't moveprobed_devsbitmap unnecessarily. (tiwai)
- Movesnd_hdac_i915_initslightly upward, to ensure it's always initialised before vga-switcheroo is called.Signed-off-by Maarten Lankhorst <[email protected]>--- sound/pci/hda/hda_intel.c | 59 ++++++++++++++++++++------------------- 1 file changed, 30 insertions(+), 29 deletions(-)sound/pci/hda/hda_intel.c +19
-0@@ -2147,6 +2147,36 @@ static int azx_probe(struct pci_dev *pci,pci_set_drvdata (pci, card); +#ifdef CONFIG_SND_HDA_I915 +/* bind with i915 if needed */ +if (chip->driver_caps &AZX_DCAPS_I915_COMPONENT ) { + err =snd_hdac_i915_init (azx_bus (chip), false); +if (err <0 ) { +/* if the controller is bound only with HDMI/DP +* (for HSW and BDW), we need to abort the probe; +* for other chips, still continue probing as other +* codecs can be on the same link. +*/ +if (CONTROLLER_IN_GPU (pci)) { +dev_err_probe (card->dev, err, +"HSW/BDW HD-audio HDMI/DP requires binding with gfx driver\n" ); + + goto out_free; + }else { +/* don't bother any longer */ + chip->driver_caps &= ~AZX_DCAPS_I915_COMPONENT ; + }
sound/pci/hda/hda_intel.c static int azx_probe(struct pci_dev *pci, · line 2178
Quoted 10 lines
sound/pci/hda/hda_intel.c +10
-0+ } + +/* HSW/BDW controllers need this power */ +if (CONTROLLER_IN_GPU (pci)) + hda->need_i915_power = true; + } +#else +if (CONTROLLER_IN_GPU (pci)) +dev_err (card->dev,"Haswell/Broadwell HDMI/DP must build in CONFIG_SND_HDA_I915\n" ); +#endif
Is it intentional that the display_power() is left in the probe workqueue?
this piece of code follows the stuff above in the existing code?
/* Request display power well for the HDA controller or codec. For
* Haswell/Broadwell, both the display HDA controller and codec need
* this power. For other platforms, like Baytrail/Braswell, only the
* display codec needs the power and it can be released after probe. */display_power(chip, true);
Quoted 47 lines
sound/pci/hda/hda_intel.c +1
-29+ err =register_vga_switcheroo (chip);if (err <0 ) {dev_err (card->dev,"Error registering vga_switcheroo client\n" );@@ -2174,11 +2204,6 @@ static int azx_probe(struct pci_dev *pci, }#endif /* CONFIG_SND_HDA_PATCH_LOADER */ -#ifndef CONFIG_SND_HDA_I915 -if (CONTROLLER_IN_GPU (pci)) -dev_err (card->dev,"Haswell/Broadwell HDMI/DP must build in CONFIG_SND_HDA_I915\n" ); -#endif -if (schedule_probe)schedule_delayed_work (&hda->probe_work,0 );@@ -2275,30 +2300,6 @@ static int azx_probe_continue(struct azx *chip)to_hda_bus (bus)->bus_probing =1 ; hda->probe_continued =1 ; -/* bind with i915 if needed */ -if (chip->driver_caps &AZX_DCAPS_I915_COMPONENT ) { - err =snd_hdac_i915_init (bus, true); -if (err <0 ) { -/* if the controller is bound only with HDMI/DP -* (for HSW and BDW), we need to abort the probe; -* for other chips, still continue probing as other -* codecs can be on the same link. -*/ -if (CONTROLLER_IN_GPU (pci)) { -dev_err (chip->card->dev, -"HSW/BDW HD-audio HDMI/DP requires binding with gfx driver\n" ); - goto out_free; - }else { -/* don't bother any longer */ - chip->driver_caps &= ~AZX_DCAPS_I915_COMPONENT ; - } - } - -/* HSW/BDW controllers need this power */ -if (CONTROLLER_IN_GPU (pci)) - hda->need_i915_power = true; - } -/* Request display power well for the HDA controller or codec. For * Haswell/Broadwell, both the display HDA controller and codec need * this power. For other platforms, like Baytrail/Braswell, only the
Re: [PATCH v2 7/9] ALSA: hda/intel: Move snd_hdac_i915_init to before probe_work.
Hey,
Quoted 60 lines · Pierre-Louis Bossart
Quoted 44 lines · Maarten Lankhorst
Now that we can use -EPROBE_DEFER, it's no longer required to spin off the
snd_hdac_i915_initinto a workqueue.Use the -EPROBE_DEFER mechanism instead, which must be returned in the probe function.
Changes since v1:
- Usedev_err_probe()
- Don't moveprobed_devsbitmap unnecessarily. (tiwai)
- Movesnd_hdac_i915_initslightly upward, to ensure it's always initialised before vga-switcheroo is called.Signed-off-by Maarten Lankhorst <[email protected]>--- sound/pci/hda/hda_intel.c | 59 ++++++++++++++++++++------------------- 1 file changed, 30 insertions(+), 29 deletions(-)sound/pci/hda/hda_intel.c +19
-0@@ -2147,6 +2147,36 @@ static int azx_probe(struct pci_dev *pci,pci_set_drvdata (pci, card); +#ifdef CONFIG_SND_HDA_I915 +/* bind with i915 if needed */ +if (chip->driver_caps &AZX_DCAPS_I915_COMPONENT ) { + err =snd_hdac_i915_init (azx_bus (chip), false); +if (err <0 ) { +/* if the controller is bound only with HDMI/DP +* (for HSW and BDW), we need to abort the probe; +* for other chips, still continue probing as other +* codecs can be on the same link. +*/ +if (CONTROLLER_IN_GPU (pci)) { +dev_err_probe (card->dev, err, +"HSW/BDW HD-audio HDMI/DP requires binding with gfx driver\n" ); + + goto out_free; + }else { +/* don't bother any longer */ + chip->driver_caps &= ~AZX_DCAPS_I915_COMPONENT ; + }sound/pci/hda/hda_intel.c static int azx_probe(struct pci_dev *pci, · line 2178
Quoted 10 lines
sound/pci/hda/hda_intel.c +10
-0+ } + +/* HSW/BDW controllers need this power */ +if (CONTROLLER_IN_GPU (pci)) + hda->need_i915_power = true; + } +#else +if (CONTROLLER_IN_GPU (pci)) +dev_err (card->dev,"Haswell/Broadwell HDMI/DP must build in CONFIG_SND_HDA_I915\n" ); +#endif Is it intentional that the
display_power()is left in the probe workqueue?
Quoted 8 lines
this piece of code follows the stuff above in the existing code?
/* Request display power well for the HDA controller or codec. For
* Haswell/Broadwell, both the display HDA controller and codec need
* this power. For other platforms, like Baytrail/Braswell, only the
* display codec needs the power and it can be released after probe. */display_power(chip, true);
I think for the binding itself, there isn't any harm. We are not poking any hardware when binding, only software. This appears to be true on the i915 side as well.
Cheers,
~Maarten
PATCH v2 8/9 ASoC: SOF: Intel: Remove deferred probe for SOF
In reply to Maarten LankhorstThis was only used to allow modprobing i915, by converting to the -EPROBE_DEFER mechanism, it can be completely removed, and is in fact counterproductive since -EPROBE_DEFER otherwise won't be handled correctly.
--- sound/soc/sof/Kconfig | 19 ----------------- sound/soc/sof/core.c | 38 ++------------------------------- sound/soc/sof/intel/Kconfig | 1 - sound/soc/sof/intel/hda-codec.c | 2 +- sound/soc/sof/intel/hda.c | 32 ++++++++++++++++----------- sound/soc/sof/sof-pci-dev.c | 3 +-- sound/soc/sof/sof-priv.h | 5 ----- 7 files changed, 23 insertions(+), 77 deletions(-)
sound/soc/sof/Kconfig +0 -19
@@ -82,17 +82,6 @@ config SND_SOC_SOF_DEVELOPER_SUPPORT if SND_SOC_SOF_DEVELOPER_SUPPORT -config SND_SOC_SOF_FORCE_PROBE_WORKQUEUE - bool "SOF force probe workqueue" - select SND_SOC_SOF_PROBE_WORK_QUEUE - help - This option forces the use of a probe workqueue, which is only used - when HDaudio is enabled due to module dependencies. Forcing this - option is intended for debug only, but this should not add any - functional issues in nominal cases. - Say Y if you are involved in SOF development and need this option. - If not, select N. - config SND_SOC_SOF_NOCODEC tristate
@@ -271,14 +260,6 @@ config SND_SOC_SOF module dependencies but since the module or built-in type is decided at the top level it doesn't matter. -config SND_SOC_SOF_PROBE_WORK_QUEUE - bool - help - This option is not user-selectable but automagically handled by - 'select' statements at a higher level. - When selected, the probe is handled in two steps, for example to - avoid lockdeps if request_module is used in the probe. - # Supported IPC versions config SND_SOC_SOF_IPC3 bool
sound/soc/sof/core.c +2 -36
@@ -191,7 +191,8 @@ static int sof_probe_continue(struct snd_sof_dev *sdev)/* probe the DSP hardware */ ret =snd_sof_probe (sdev);if (ret <0 ) { -dev_err (sdev->dev,"error: failed to probe DSP %d\n" , ret); +if (ret != -EPROBE_DEFER ) +dev_err (sdev->dev,"error: failed to probe DSP %d\n" , ret); goto probe_err; }
@@ -309,8 +310,6 @@ static int sof_probe_continue(struct snd_sof_dev *sdev)if (plat_data->sof_probe_complete) plat_data->sof_probe_complete (sdev->dev); - sdev->probe_completed = true; -return 0 ; sof_machine_err:
@@ -336,19 +335,6 @@ static int sof_probe_continue(struct snd_sof_dev *sdev)return ret; } -static void sof_probe_work (struct work_struct *work) -{ -struct snd_sof_dev *sdev = - container_of(work, struct snd_sof_dev, probe_work); -int ret; - - ret =sof_probe_continue (sdev); -if (ret <0 ) { -/* errors cannot be propagated, log */ -dev_err (sdev->dev,"error: %s failed err: %d\n" , __func__, ret); - } -} -int snd_sof_device_probe (struct device *dev,struct snd_sof_pdata *plat_data) {struct snd_sof_dev *sdev;
@@ -436,33 +422,16 @@ int snd_sof_device_probe(struct device *dev, struct snd_sof_pdata *plat_data)sof_set_fw_state (sdev,SOF_FW_BOOT_NOT_STARTED ); -if (IS_ENABLED (CONFIG_SND_SOC_SOF_PROBE_WORK_QUEUE )) { -INIT_WORK (&sdev->probe_work, sof_probe_work); -schedule_work (&sdev->probe_work); -return 0 ; - } -return sof_probe_continue (sdev); }EXPORT_SYMBOL (snd_sof_device_probe); -bool snd_sof_device_probe_completed (struct device *dev) -{ -struct snd_sof_dev *sdev =dev_get_drvdata (dev); - -return sdev->probe_completed; -} -EXPORT_SYMBOL (snd_sof_device_probe_completed); -int snd_sof_device_remove (struct device *dev) {struct snd_sof_dev *sdev =dev_get_drvdata (dev);struct snd_sof_pdata *pdata = sdev->pdata;int ret; -if (IS_ENABLED (CONFIG_SND_SOC_SOF_PROBE_WORK_QUEUE )) -cancel_work_sync (&sdev->probe_work); -/* * Unregister any registered client device first before IPC and debugfs * to allow client drivers to be removed cleanly
@@ -501,9 +470,6 @@ int snd_sof_device_shutdown(struct device *dev) {struct snd_sof_dev *sdev =dev_get_drvdata (dev); -if (IS_ENABLED (CONFIG_SND_SOC_SOF_PROBE_WORK_QUEUE )) -cancel_work_sync (&sdev->probe_work); -if (sdev->fw_state ==SOF_FW_BOOT_COMPLETE ) {sof_fw_trace_free (sdev);return snd_sof_shutdown (sdev);
sound/soc/sof/intel/Kconfig +0 -1
@@ -293,7 +293,6 @@ config SND_SOC_SOF_HDA_LINK config SND_SOC_SOF_HDA_AUDIO_CODEC bool "SOF support for HDAudio codecs" depends on SND_SOC_SOF_HDA_LINK - select SND_SOC_SOF_PROBE_WORK_QUEUE help This adds support for HDAudio codecs with Sound Open Firmware for Intel(R) platforms.
sound/soc/sof/intel/hda-codec.c +1 -1
@@ -415,7 +415,7 @@ int hda_codec_i915_init(struct snd_sof_dev *sdev)return 0 ;/* i915 exposes a HDA codec for HDMI audio */ - ret =snd_hdac_i915_init (bus, true); + ret =snd_hdac_i915_init (bus, false);if (ret <0 )return ret;
sound/soc/sof/intel/hda.c +19 -13
@@ -801,8 +801,11 @@ static int hda_init(struct snd_sof_dev *sdev)/* init i915 and HDMI codecs */ ret =hda_codec_i915_init (sdev); -if (ret <0 ) -dev_warn (sdev->dev,"init of i915 and HDMI codec failed\n" ); +if (ret <0 ) { +if (ret != -EPROBE_DEFER ) +dev_warn (sdev->dev,"init of i915 and HDMI codec failed: %i\n" , ret); +return ret; + }/* get controller capabilities */ ret =hda_dsp_ctrl_get_caps (sdev);
@@ -1115,14 +1118,6 @@ int hda_dsp_probe(struct snd_sof_dev *sdev) sdev->pdata->hw_pdata = hdev; hdev->desc = chip; - hdev->dmic_dev =platform_device_register_data (sdev->dev,"dmic-codec" , -PLATFORM_DEVID_NONE , -NULL ,0 ); -if (IS_ERR (hdev->dmic_dev)) { -dev_err (sdev->dev,"error: failed to create DMIC device\n" ); -return PTR_ERR (hdev->dmic_dev); - } -/* * use position update IPC if either it is forced * or we don't have other choice
@@ -1142,6 +1137,15 @@ int hda_dsp_probe(struct snd_sof_dev *sdev)if (ret <0 ) goto hdac_bus_unmap; + hdev->dmic_dev =platform_device_register_data (sdev->dev,"dmic-codec" , +PLATFORM_DEVID_NONE , +NULL ,0 ); +if (IS_ERR (hdev->dmic_dev)) { +dev_err (sdev->dev,"error: failed to create DMIC device\n" ); + ret =PTR_ERR (hdev->dmic_dev); + goto hdac_exit; + } +if (sdev->dspless_mode_selected) goto skip_dsp_setup;
@@ -1150,7 +1154,7 @@ int hda_dsp_probe(struct snd_sof_dev *sdev)if (!sdev->bar[HDA_DSP_BAR ]) {dev_err (sdev->dev,"error: ioremap error\n" ); ret = -ENXIO ; - goto hdac_bus_unmap; + goto platform_unreg; } sdev->mmio_bar =HDA_DSP_BAR ;
@@ -1248,10 +1252,12 @@ int hda_dsp_probe(struct snd_sof_dev *sdev)/* dsp_unmap: not currently used */ if (!sdev->dspless_mode_selected)iounmap (sdev->bar[HDA_DSP_BAR ]); -hdac_bus_unmap: +platform_unreg:platform_device_unregister (hdev->dmic_dev); -iounmap (bus->remap_addr); +hdac_exit:hda_codec_i915_exit (sdev); +hdac_bus_unmap: +iounmap (bus->remap_addr); err:return ret; }
sound/soc/sof/sof-pci-dev.c +1 -2
@@ -339,8 +339,7 @@ void sof_pci_remove(struct pci_dev *pci)snd_sof_device_remove (&pci->dev);/* follow recommendation in pci-driver.c to increment usage counter */ -if (snd_sof_device_probe_completed (&pci->dev) && - !(sof_pci_debug &SOF_PCI_DISABLE_PM_RUNTIME )) +if (!(sof_pci_debug &SOF_PCI_DISABLE_PM_RUNTIME ))pm_runtime_get_noresume (&pci->dev);/* release pci regions and disable device */
sound/soc/sof/sof-priv.h +0 -5
@@ -564,10 +564,6 @@ struct snd_sof_dev {enum sof_fw_state fw_state;bool first_boot; -/* work queue in case the probe is implemented in two steps */ -struct work_struct probe_work; -bool probe_completed; -/* DSP HW differentiation */ struct snd_sof_pdata *pdata;
@@ -675,7 +671,6 @@ struct snd_sof_dev {int snd_sof_device_probe (struct device *dev,struct snd_sof_pdata *plat_data);int snd_sof_device_remove (struct device *dev);int snd_sof_device_shutdown (struct device *dev); -bool snd_sof_device_probe_completed (struct device *dev);int snd_sof_runtime_suspend (struct device *dev);int snd_sof_runtime_resume (struct device *dev);
Signature · 1 line
2.39.2
Péter Ujfalusi
maintainerRe: [PATCH v2 8/9] ASoC: SOF: Intel: Remove deferred probe for SOF
Quoted 60 lines · Maarten Lankhorst
This was only used to allow modprobing i915, by converting to the -EPROBE_DEFER mechanism, it can be completely removed, and is in fact counterproductive since -EPROBE_DEFER otherwise won't be handled correctly.
Signed-off-by Maarten Lankhorst <[email protected]>Acked-by Matthew Auld <[email protected]>Acked-by Mark Brown <[email protected]>--- sound/soc/sof/Kconfig | 19 ----------------- sound/soc/sof/core.c | 38 ++------------------------------- sound/soc/sof/intel/Kconfig | 1 - sound/soc/sof/intel/hda-codec.c | 2 +- sound/soc/sof/intel/hda.c | 32 ++++++++++++++++----------- sound/soc/sof/sof-pci-dev.c | 3 +-- sound/soc/sof/sof-priv.h | 5 ----- 7 files changed, 23 insertions(+), 77 deletions(-)sound/soc/sof/Kconfig +0
-19@@ -82,17 +82,6 @@ config SND_SOC_SOF_DEVELOPER_SUPPORT if SND_SOC_SOF_DEVELOPER_SUPPORT -config SND_SOC_SOF_FORCE_PROBE_WORKQUEUE - bool "SOF force probe workqueue" - select SND_SOC_SOF_PROBE_WORK_QUEUE - help - This option forces the use of a probe workqueue, which is only used - when HDaudio is enabled due to module dependencies. Forcing this - option is intended for debug only, but this should not add any - functional issues in nominal cases. - Say Y if you are involved in SOF development and need this option. - If not, select N. - config SND_SOC_SOF_NOCODEC tristate@@ -271,14 +260,6 @@ config SND_SOC_SOF module dependencies but since the module or built-in type is decided at the top level it doesn't matter. -config SND_SOC_SOF_PROBE_WORK_QUEUE - bool - help - This option is not user-selectable but automagically handled by - 'select' statements at a higher level. - When selected, the probe is handled in two steps, for example to - avoid lockdeps if request_module is used in the probe. - # Supported IPC versions config SND_SOC_SOF_IPC3 boolsound/soc/sof/core.c +0
-0
sound/soc/sof/core.c static int sof_probe_continue(struct snd_sof_dev *sdev) · line 195
Quoted 6 lines
sound/soc/sof/core.c +2
-1@@ -191,7 +191,8 @@ static int sof_probe_continue(struct snd_sof_dev *sdev)/* probe the DSP hardware */ ret =snd_sof_probe (sdev);if (ret <0 ) { -dev_err (sdev->dev,"error: failed to probe DSP %d\n" , ret); +if (ret != -EPROBE_DEFER ) +dev_err (sdev->dev,"error: failed to probe DSP %d\n" , ret);
While at it, can you drop thee "error:" prefix from the print?
Quoted 135 lines
sound/soc/sof/core.c +0
-35goto probe_err; }@@ -309,8 +310,6 @@ static int sof_probe_continue(struct snd_sof_dev *sdev)if (plat_data->sof_probe_complete) plat_data->sof_probe_complete (sdev->dev); - sdev->probe_completed = true; -return 0 ; sof_machine_err:@@ -336,19 +335,6 @@ static int sof_probe_continue(struct snd_sof_dev *sdev)return ret; } -static void sof_probe_work (struct work_struct *work) -{ -struct snd_sof_dev *sdev = - container_of(work, struct snd_sof_dev, probe_work); -int ret; - - ret =sof_probe_continue (sdev); -if (ret <0 ) { -/* errors cannot be propagated, log */ -dev_err (sdev->dev,"error: %s failed err: %d\n" , __func__, ret); - } -} -int snd_sof_device_probe (struct device *dev,struct snd_sof_pdata *plat_data) {struct snd_sof_dev *sdev;@@ -436,33 +422,16 @@ int snd_sof_device_probe(struct device *dev, struct snd_sof_pdata *plat_data)sof_set_fw_state (sdev,SOF_FW_BOOT_NOT_STARTED ); -if (IS_ENABLED (CONFIG_SND_SOC_SOF_PROBE_WORK_QUEUE )) { -INIT_WORK (&sdev->probe_work, sof_probe_work); -schedule_work (&sdev->probe_work); -return 0 ; - } -return sof_probe_continue (sdev); }EXPORT_SYMBOL (snd_sof_device_probe); -bool snd_sof_device_probe_completed (struct device *dev) -{ -struct snd_sof_dev *sdev =dev_get_drvdata (dev); - -return sdev->probe_completed; -} -EXPORT_SYMBOL (snd_sof_device_probe_completed); -int snd_sof_device_remove (struct device *dev) {struct snd_sof_dev *sdev =dev_get_drvdata (dev);struct snd_sof_pdata *pdata = sdev->pdata;int ret; -if (IS_ENABLED (CONFIG_SND_SOC_SOF_PROBE_WORK_QUEUE )) -cancel_work_sync (&sdev->probe_work); -/* * Unregister any registered client device first before IPC and debugfs * to allow client drivers to be removed cleanly @@ -501,9 +470,6 @@ int snd_sof_device_shutdown(struct device *dev) {struct snd_sof_dev *sdev =dev_get_drvdata (dev); -if (IS_ENABLED (CONFIG_SND_SOC_SOF_PROBE_WORK_QUEUE )) -cancel_work_sync (&sdev->probe_work); -if (sdev->fw_state ==SOF_FW_BOOT_COMPLETE ) {sof_fw_trace_free (sdev);return snd_sof_shutdown (sdev);sound/soc/sof/intel/Kconfig +0
-1@@ -293,7 +293,6 @@ config SND_SOC_SOF_HDA_LINK config SND_SOC_SOF_HDA_AUDIO_CODEC bool "SOF support for HDAudio codecs" depends on SND_SOC_SOF_HDA_LINK - select SND_SOC_SOF_PROBE_WORK_QUEUE help This adds support for HDAudio codecs with Sound Open Firmware for Intel(R) platforms.sound/soc/sof/intel/hda-codec.c +1
-1@@ -415,7 +415,7 @@ int hda_codec_i915_init(struct snd_sof_dev *sdev)return 0 ;/* i915 exposes a HDA codec for HDMI audio */ - ret =snd_hdac_i915_init (bus, true); + ret =snd_hdac_i915_init (bus, false);if (ret <0 )return ret;sound/soc/sof/intel/hda.c +5
-10@@ -801,8 +801,11 @@ static int hda_init(struct snd_sof_dev *sdev)/* init i915 and HDMI codecs */ ret =hda_codec_i915_init (sdev); -if (ret <0 ) -dev_warn (sdev->dev,"init of i915 and HDMI codec failed\n" ); +if (ret <0 ) { +if (ret != -EPROBE_DEFER ) +dev_warn (sdev->dev,"init of i915 and HDMI codec failed: %i\n" , ret); +return ret; + }/* get controller capabilities */ ret =hda_dsp_ctrl_get_caps (sdev);@@ -1115,14 +1118,6 @@ int hda_dsp_probe(struct snd_sof_dev *sdev) sdev->pdata->hw_pdata = hdev; hdev->desc = chip; - hdev->dmic_dev =platform_device_register_data (sdev->dev,"dmic-codec" , -PLATFORM_DEVID_NONE , -NULL ,0 ); -if (IS_ERR (hdev->dmic_dev)) { -dev_err (sdev->dev,"error: failed to create DMIC device\n" ); -return PTR_ERR (hdev->dmic_dev); - } -/* * use position update IPC if either it is forced * or we don't have other choice
sound/soc/sof/intel/hda.c int hda_dsp_probe(struct snd_sof_dev *sdev) · line 1144
Quoted 8 lines
sound/soc/sof/intel/hda.c +5
-0@@ -1142,6 +1137,15 @@ int hda_dsp_probe(struct snd_sof_dev *sdev)if (ret <0 ) goto hdac_bus_unmap; + hdev->dmic_dev =platform_device_register_data (sdev->dev,"dmic-codec" , +PLATFORM_DEVID_NONE , +NULL ,0 ); +if (IS_ERR (hdev->dmic_dev)) { +dev_err (sdev->dev,"error: failed to create DMIC device\n" );
From here also, let's not add them back.
Quoted 68 lines
sound/soc/sof/intel/hda.c +9
-3+ ret =PTR_ERR (hdev->dmic_dev); + goto hdac_exit; + } +if (sdev->dspless_mode_selected) goto skip_dsp_setup;@@ -1150,7 +1154,7 @@ int hda_dsp_probe(struct snd_sof_dev *sdev)if (!sdev->bar[HDA_DSP_BAR ]) {dev_err (sdev->dev,"error: ioremap error\n" ); ret = -ENXIO ; - goto hdac_bus_unmap; + goto platform_unreg; } sdev->mmio_bar =HDA_DSP_BAR ;@@ -1248,10 +1252,12 @@ int hda_dsp_probe(struct snd_sof_dev *sdev)/* dsp_unmap: not currently used */ if (!sdev->dspless_mode_selected)iounmap (sdev->bar[HDA_DSP_BAR ]); -hdac_bus_unmap: +platform_unreg:platform_device_unregister (hdev->dmic_dev); -iounmap (bus->remap_addr); +hdac_exit:hda_codec_i915_exit (sdev); +hdac_bus_unmap: +iounmap (bus->remap_addr); err:return ret; }sound/soc/sof/sof-pci-dev.c +1
-2@@ -339,8 +339,7 @@ void sof_pci_remove(struct pci_dev *pci)snd_sof_device_remove (&pci->dev);/* follow recommendation in pci-driver.c to increment usage counter */ -if (snd_sof_device_probe_completed (&pci->dev) && - !(sof_pci_debug &SOF_PCI_DISABLE_PM_RUNTIME )) +if (!(sof_pci_debug &SOF_PCI_DISABLE_PM_RUNTIME ))pm_runtime_get_noresume (&pci->dev);/* release pci regions and disable device */ sound/soc/sof/sof-priv.h +0
-5@@ -564,10 +564,6 @@ struct snd_sof_dev {enum sof_fw_state fw_state;bool first_boot; -/* work queue in case the probe is implemented in two steps */ -struct work_struct probe_work; -bool probe_completed; -/* DSP HW differentiation */ struct snd_sof_pdata *pdata;@@ -675,7 +671,6 @@ struct snd_sof_dev {int snd_sof_device_probe (struct device *dev,struct snd_sof_pdata *plat_data);int snd_sof_device_remove (struct device *dev);int snd_sof_device_shutdown (struct device *dev); -bool snd_sof_device_probe_completed (struct device *dev);int snd_sof_runtime_suspend (struct device *dev);int snd_sof_runtime_resume (struct device *dev);
Signature · 1 line
Péter
Re: [PATCH v2 8/9] ASoC: SOF: Intel: Remove deferred probe for SOF
In reply to Maarten LankhorstQuoted 4 lines · Maarten Lankhorst
This was only used to allow modprobing i915, by converting to the -EPROBE_DEFER mechanism, it can be completely removed, and is in fact counterproductive since -EPROBE_DEFER otherwise won't be handled correctly.
I personally remember only that the request_module("i915") was the main motivation for the use of the workqueue, but when it comes to the HDaudio codec management we don't even know what we don't know.
I am a bit worried that the snd-hda-intel driver keeps the workqueue for HDaudio codec initialization, and this patch removes the workqueue completely for SOF. That doesn't seem right. Either both drivers need a workqueue or none need a workqueue.
Maybe what we need is to move the i915/xe initialization out of the workqueue, and see in a second pass if that workqueue can be safely removed from the SOF driver?
Quoted 198 lines
Signed-off-by Maarten Lankhorst <[email protected]>Acked-by Matthew Auld <[email protected]>Acked-by Mark Brown <[email protected]>--- sound/soc/sof/Kconfig | 19 ----------------- sound/soc/sof/core.c | 38 ++------------------------------- sound/soc/sof/intel/Kconfig | 1 - sound/soc/sof/intel/hda-codec.c | 2 +- sound/soc/sof/intel/hda.c | 32 ++++++++++++++++----------- sound/soc/sof/sof-pci-dev.c | 3 +-- sound/soc/sof/sof-priv.h | 5 ----- 7 files changed, 23 insertions(+), 77 deletions(-)sound/soc/sof/Kconfig +0
-19@@ -82,17 +82,6 @@ config SND_SOC_SOF_DEVELOPER_SUPPORT if SND_SOC_SOF_DEVELOPER_SUPPORT -config SND_SOC_SOF_FORCE_PROBE_WORKQUEUE - bool "SOF force probe workqueue" - select SND_SOC_SOF_PROBE_WORK_QUEUE - help - This option forces the use of a probe workqueue, which is only used - when HDaudio is enabled due to module dependencies. Forcing this - option is intended for debug only, but this should not add any - functional issues in nominal cases. - Say Y if you are involved in SOF development and need this option. - If not, select N. - config SND_SOC_SOF_NOCODEC tristate@@ -271,14 +260,6 @@ config SND_SOC_SOF module dependencies but since the module or built-in type is decided at the top level it doesn't matter. -config SND_SOC_SOF_PROBE_WORK_QUEUE - bool - help - This option is not user-selectable but automagically handled by - 'select' statements at a higher level. - When selected, the probe is handled in two steps, for example to - avoid lockdeps if request_module is used in the probe. - # Supported IPC versions config SND_SOC_SOF_IPC3 boolsound/soc/sof/core.c +2
-36@@ -191,7 +191,8 @@ static int sof_probe_continue(struct snd_sof_dev *sdev)/* probe the DSP hardware */ ret =snd_sof_probe (sdev);if (ret <0 ) { -dev_err (sdev->dev,"error: failed to probe DSP %d\n" , ret); +if (ret != -EPROBE_DEFER ) +dev_err (sdev->dev,"error: failed to probe DSP %d\n" , ret); goto probe_err; }@@ -309,8 +310,6 @@ static int sof_probe_continue(struct snd_sof_dev *sdev)if (plat_data->sof_probe_complete) plat_data->sof_probe_complete (sdev->dev); - sdev->probe_completed = true; -return 0 ; sof_machine_err:@@ -336,19 +335,6 @@ static int sof_probe_continue(struct snd_sof_dev *sdev)return ret; } -static void sof_probe_work (struct work_struct *work) -{ -struct snd_sof_dev *sdev = - container_of(work, struct snd_sof_dev, probe_work); -int ret; - - ret =sof_probe_continue (sdev); -if (ret <0 ) { -/* errors cannot be propagated, log */ -dev_err (sdev->dev,"error: %s failed err: %d\n" , __func__, ret); - } -} -int snd_sof_device_probe (struct device *dev,struct snd_sof_pdata *plat_data) {struct snd_sof_dev *sdev;@@ -436,33 +422,16 @@ int snd_sof_device_probe(struct device *dev, struct snd_sof_pdata *plat_data)sof_set_fw_state (sdev,SOF_FW_BOOT_NOT_STARTED ); -if (IS_ENABLED (CONFIG_SND_SOC_SOF_PROBE_WORK_QUEUE )) { -INIT_WORK (&sdev->probe_work, sof_probe_work); -schedule_work (&sdev->probe_work); -return 0 ; - } -return sof_probe_continue (sdev); }EXPORT_SYMBOL (snd_sof_device_probe); -bool snd_sof_device_probe_completed (struct device *dev) -{ -struct snd_sof_dev *sdev =dev_get_drvdata (dev); - -return sdev->probe_completed; -} -EXPORT_SYMBOL (snd_sof_device_probe_completed); -int snd_sof_device_remove (struct device *dev) {struct snd_sof_dev *sdev =dev_get_drvdata (dev);struct snd_sof_pdata *pdata = sdev->pdata;int ret; -if (IS_ENABLED (CONFIG_SND_SOC_SOF_PROBE_WORK_QUEUE )) -cancel_work_sync (&sdev->probe_work); -/* * Unregister any registered client device first before IPC and debugfs * to allow client drivers to be removed cleanly @@ -501,9 +470,6 @@ int snd_sof_device_shutdown(struct device *dev) {struct snd_sof_dev *sdev =dev_get_drvdata (dev); -if (IS_ENABLED (CONFIG_SND_SOC_SOF_PROBE_WORK_QUEUE )) -cancel_work_sync (&sdev->probe_work); -if (sdev->fw_state ==SOF_FW_BOOT_COMPLETE ) {sof_fw_trace_free (sdev);return snd_sof_shutdown (sdev);sound/soc/sof/intel/Kconfig +0
-1@@ -293,7 +293,6 @@ config SND_SOC_SOF_HDA_LINK config SND_SOC_SOF_HDA_AUDIO_CODEC bool "SOF support for HDAudio codecs" depends on SND_SOC_SOF_HDA_LINK - select SND_SOC_SOF_PROBE_WORK_QUEUE help This adds support for HDAudio codecs with Sound Open Firmware for Intel(R) platforms.sound/soc/sof/intel/hda-codec.c +1
-1@@ -415,7 +415,7 @@ int hda_codec_i915_init(struct snd_sof_dev *sdev)return 0 ;/* i915 exposes a HDA codec for HDMI audio */ - ret =snd_hdac_i915_init (bus, true); + ret =snd_hdac_i915_init (bus, false);if (ret <0 )return ret;sound/soc/sof/intel/hda.c +5
-10@@ -801,8 +801,11 @@ static int hda_init(struct snd_sof_dev *sdev)/* init i915 and HDMI codecs */ ret =hda_codec_i915_init (sdev); -if (ret <0 ) -dev_warn (sdev->dev,"init of i915 and HDMI codec failed\n" ); +if (ret <0 ) { +if (ret != -EPROBE_DEFER ) +dev_warn (sdev->dev,"init of i915 and HDMI codec failed: %i\n" , ret); +return ret; + }/* get controller capabilities */ ret =hda_dsp_ctrl_get_caps (sdev);@@ -1115,14 +1118,6 @@ int hda_dsp_probe(struct snd_sof_dev *sdev) sdev->pdata->hw_pdata = hdev; hdev->desc = chip; - hdev->dmic_dev =platform_device_register_data (sdev->dev,"dmic-codec" , -PLATFORM_DEVID_NONE , -NULL ,0 ); -if (IS_ERR (hdev->dmic_dev)) { -dev_err (sdev->dev,"error: failed to create DMIC device\n" ); -return PTR_ERR (hdev->dmic_dev); - } -/* * use position update IPC if either it is forced * or we don't have other choice @@ -1142,6 +1137,15 @@ int hda_dsp_probe(struct snd_sof_dev *sdev)if (ret <0 ) goto hdac_bus_unmap;
sound/soc/sof/intel/hda.c int hda_dsp_probe(struct snd_sof_dev *sdev) · line 1148
Quoted 10 lines
sound/soc/sof/intel/hda.c +9
-0+ hdev->dmic_dev =platform_device_register_data (sdev->dev,"dmic-codec" , +PLATFORM_DEVID_NONE , +NULL ,0 ); +if (IS_ERR (hdev->dmic_dev)) { +dev_err (sdev->dev,"error: failed to create DMIC device\n" ); + ret =PTR_ERR (hdev->dmic_dev); + goto hdac_exit; + } +
I am not following why we have to move dmic-related code, can we try to move this in a separate patch?
Quoted 64 lines
sound/soc/sof/intel/hda.c +5
-3if (sdev->dspless_mode_selected) goto skip_dsp_setup;@@ -1150,7 +1154,7 @@ int hda_dsp_probe(struct snd_sof_dev *sdev)if (!sdev->bar[HDA_DSP_BAR ]) {dev_err (sdev->dev,"error: ioremap error\n" ); ret = -ENXIO ; - goto hdac_bus_unmap; + goto platform_unreg; } sdev->mmio_bar =HDA_DSP_BAR ;@@ -1248,10 +1252,12 @@ int hda_dsp_probe(struct snd_sof_dev *sdev)/* dsp_unmap: not currently used */ if (!sdev->dspless_mode_selected)iounmap (sdev->bar[HDA_DSP_BAR ]); -hdac_bus_unmap: +platform_unreg:platform_device_unregister (hdev->dmic_dev); -iounmap (bus->remap_addr); +hdac_exit:hda_codec_i915_exit (sdev); +hdac_bus_unmap: +iounmap (bus->remap_addr); err:return ret; }sound/soc/sof/sof-pci-dev.c +1
-2@@ -339,8 +339,7 @@ void sof_pci_remove(struct pci_dev *pci)snd_sof_device_remove (&pci->dev);/* follow recommendation in pci-driver.c to increment usage counter */ -if (snd_sof_device_probe_completed (&pci->dev) && - !(sof_pci_debug &SOF_PCI_DISABLE_PM_RUNTIME )) +if (!(sof_pci_debug &SOF_PCI_DISABLE_PM_RUNTIME ))pm_runtime_get_noresume (&pci->dev);/* release pci regions and disable device */ sound/soc/sof/sof-priv.h +0
-5@@ -564,10 +564,6 @@ struct snd_sof_dev {enum sof_fw_state fw_state;bool first_boot; -/* work queue in case the probe is implemented in two steps */ -struct work_struct probe_work; -bool probe_completed; -/* DSP HW differentiation */ struct snd_sof_pdata *pdata;@@ -675,7 +671,6 @@ struct snd_sof_dev {int snd_sof_device_probe (struct device *dev,struct snd_sof_pdata *plat_data);int snd_sof_device_remove (struct device *dev);int snd_sof_device_shutdown (struct device *dev); -bool snd_sof_device_probe_completed (struct device *dev);int snd_sof_runtime_suspend (struct device *dev);int snd_sof_runtime_resume (struct device *dev);
Re: [PATCH v2 8/9] ASoC: SOF: Intel: Remove deferred probe for SOF
Hey,
Quoted 12 lines · Pierre-Louis Bossart
Quoted 4 lines · Maarten Lankhorst
This was only used to allow modprobing i915, by converting to the -EPROBE_DEFER mechanism, it can be completely removed, and is in fact counterproductive since -EPROBE_DEFER otherwise won't be handled correctly.
I personally remember only that the
request_module("i915")was the main motivation for the use of the workqueue, but when it comes to the HDaudio codec management we don't even know what we don't know.
Quoted 9 lines
I am a bit worried that the snd-hda-intel driver keeps the workqueue for HDaudio codec initialization, and this patch removes the workqueue completely for SOF. That doesn't seem right. Either both drivers need a workqueue or none need a workqueue.
Maybe what we need is to move the i915/xe initialization out of the workqueue, and see in a second pass if that workqueue can be safely removed from the SOF driver?
As I mentioned in some of the other sound driver conversions. I believe it's possible to completely kill off most workqueues.
However, I don´t have the hardware or knowledge to test it. I saw that the SOF had the non-workqueue path already, so it felt less risky to simply convert it to always use that path.
avs/skylake drivers should be easy to convert too. This is why I left the comment: "Removing the workqueue would simplify init even further, but is left as exercise for the reviewer."
HDA-intel has this retry-probe logic used on AMD's, which makes me more hesitant to convert it.
I wanted to tackle one problem at a time, I believe workqueue removal can be done by anyone.
Cheers,
~Maarten
Re: [PATCH v2 8/9] ASoC: SOF: Intel: Remove deferred probe for SOF
Quoted 32 lines · Maarten Lankhorst
Hey,
Quoted 12 lines · Pierre-Louis Bossart
Quoted 4 lines · Maarten Lankhorst
This was only used to allow modprobing i915, by converting to the -EPROBE_DEFER mechanism, it can be completely removed, and is in fact counterproductive since -EPROBE_DEFER otherwise won't be handled correctly.
I personally remember only that the
request_module("i915")was the main motivation for the use of the workqueue, but when it comes to the HDaudio codec management we don't even know what we don't know.Quoted 9 lines
I am a bit worried that the snd-hda-intel driver keeps the workqueue for HDaudio codec initialization, and this patch removes the workqueue completely for SOF. That doesn't seem right. Either both drivers need a workqueue or none need a workqueue.
Maybe what we need is to move the i915/xe initialization out of the workqueue, and see in a second pass if that workqueue can be safely removed from the SOF driver?
As I mentioned in some of the other sound driver conversions. I believe it's possible to completely kill off most workqueues.
However, I don´t have the hardware or knowledge to test it. I saw that the SOF had the non-workqueue path already, so it felt less risky to simply convert it to always use that path.
Quoted 6 lines
avs/skylake drivers should be easy to convert too. This is why I left the comment: "Removing the workqueue would simplify init even further, but is left as exercise for the reviewer."
HDA-intel has this retry-probe logic used on AMD's, which makes me more hesitant to convert it.
Yes, HDA-Intel requires either a workqueue or async firmware-loader callback because there is some codec module-autoload mechanism that may happen during the probe phase. It's not only on AMD, but it's required in general for all codecs.
Takashi
PATCH v2 9/9 ALSA: hda/i915: Remove extra argument from snd_hdac_i915_init
In reply to Maarten LankhorstNow that all drivers have moved from modprobe loading to handling -EPROBE_DEFER, we can remove the argument again.
Changes since v1:
- Use dev_err_probe() to set reason in debugfs for deferred probe.
--- include/sound/hda_i915.h | 4 ++-- sound/hda/hdac_i915.c | 14 +++----------- sound/pci/hda/hda_intel.c | 2 +- sound/soc/intel/avs/core.c | 2 +- sound/soc/intel/skylake/skl.c | 2 +- sound/soc/sof/intel/hda-codec.c | 2 +- 6 files changed, 9 insertions(+), 17 deletions(-)
include/sound/hda_i915.h +2 -2
@@ -9,12 +9,12 @@#ifdef CONFIG_SND_HDA_I915 void snd_hdac_i915_set_bclk (struct hdac_bus *bus); -int snd_hdac_i915_init (struct hdac_bus *bus,bool allow_modprobe); +int snd_hdac_i915_init (struct hdac_bus *bus);#else static inline void snd_hdac_i915_set_bclk (struct hdac_bus *bus) { } -static inline int snd_hdac_i915_init (struct hdac_bus *bus,bool allow_modprobe) +static inline int snd_hdac_i915_init (struct hdac_bus *bus) {return -ENODEV ; }
sound/hda/hdac_i915.c +3 -11
@@ -156,7 +156,7 @@ static int i915_gfx_present(struct pci_dev *hdac_pci)* * Returns zero for success or a negative error code. */ -int snd_hdac_i915_init (struct hdac_bus *bus,bool allow_modprobe) +int snd_hdac_i915_init (struct hdac_bus *bus) {struct drm_audio_component *acomp;int err;
@@ -172,18 +172,10 @@ int snd_hdac_i915_init(struct hdac_bus *bus, bool allow_modprobe) acomp = bus->audio_component;if (!acomp)return -ENODEV ; -if (allow_modprobe && !acomp->ops) { -if (!IS_ENABLED (CONFIG_MODULES ) || - !request_module ("i915" )) { -/* 60s timeout */ -wait_for_completion_killable_timeout (&acomp->master_bind_complete, -msecs_to_jiffies (60 *1000 )); - } - }if (!acomp->ops) { -int err = allow_modprobe ? -ENODEV : -EPROBE_DEFER ;snd_hdac_acomp_exit (bus); -return dev_err_probe (bus->dev, err,"couldn't bind with audio component\n" ); +return dev_err_probe (bus->dev, -EPROBE_DEFER , +"couldn't bind with audio component\n" ); }return 0 ; }
sound/pci/hda/hda_intel.c +1 -1
@@ -2150,7 +2150,7 @@ static int azx_probe(struct pci_dev *pci,#ifdef CONFIG_SND_HDA_I915 /* bind with i915 if needed */ if (chip->driver_caps &AZX_DCAPS_I915_COMPONENT ) { - err =snd_hdac_i915_init (azx_bus (chip), false); + err =snd_hdac_i915_init (azx_bus (chip));if (err <0 ) {/* if the controller is bound only with HDMI/DP * (for HSW and BDW), we need to abort the probe;
sound/soc/intel/avs/core.c +1 -1
@@ -461,7 +461,7 @@ static int avs_pci_probe(struct pci_dev *pci, const struct pci_device_id *id)pci_set_drvdata (pci, bus);device_disable_async_suspend (dev); - ret =snd_hdac_i915_init (bus, false); + ret =snd_hdac_i915_init (bus);if (ret == -EPROBE_DEFER ) goto err_i915_init;else if (ret <0 )
sound/soc/intel/skylake/skl.c +1 -1
@@ -1056,7 +1056,7 @@ static int skl_probe(struct pci_dev *pci, }if (IS_ENABLED (CONFIG_SND_SOC_HDAC_HDMI )) { - err =snd_hdac_i915_init (bus, false); + err =snd_hdac_i915_init (bus);if (err <0 ) goto out_dmic_unregister; }
sound/soc/sof/intel/hda-codec.c +1 -1
@@ -415,7 +415,7 @@ int hda_codec_i915_init(struct snd_sof_dev *sdev)return 0 ;/* i915 exposes a HDA codec for HDMI audio */ - ret =snd_hdac_i915_init (bus, false); + ret =snd_hdac_i915_init (bus);if (ret <0 )return ret;
Signature · 1 line
2.39.2
Hi,
Quoted 7 lines · Maarten Lankhorst
Explicitly loading i915 becomes a problem when upstreaming the new intel driver for Tiger Lake and higher graphics (xe). By loading i915, it doesn't wait for driver load of xe, and will fail completely before it loads.
-EPROBE_DEFER has to be returned before any device is created in
probe(), otherwise the removal of the device will causeEPROBE_DEFERto try again in an infinite loop.
thanks, series looks good to me now. We'll need to adopt the new gpu_bind parameter in a number of CI systems (where we test without i915/xe), but this looks perfectly doable.
I'll give my
... for the hdac_i915.c changes. For AVS and SOF, I'd ask for some more review time to allow Cezary, Pierre et al to weigh in. I don't personally recall e.g. where we've used CONFIG_SOF_FORCE_PROBE_WORKQUEUE and do we have grounds to keep it even if workqueue is no longer set for HDA codec support.
Br, Kai
Péter Ujfalusi
maintainerHi Maarten,
Quoted 14 lines · Maarten Lankhorst
Explicitly loading i915 becomes a problem when upstreaming the new intel driver for Tiger Lake and higher graphics (xe). By loading i915, it doesn't wait for driver load of xe, and will fail completely before it loads.
-EPROBE_DEFER has to be returned before any device is created in
probe(), otherwise the removal of the device will causeEPROBE_DEFERto try again in an infinite loop.The conversion is done in gradual steps. First I add an argument to
snd_hdac_i915_initto allow for -EPROBE_DEFER so I can convert each driver separately. Then I convert each driver to movesnd_hdac_i915_initout of the workqueue. Finally I drop the ability to choose modprobe behavior after the last user is converted.
Quoted 3 lines
I suspect the avs and skylake drivers used
snd_hdac_i915_initpurely for the modprobe, but I don't have the hardware to test if it can be safely removed. It can still be done easily in a followup patch to simplify probing.
Apart from the few comments I had, this looks great and works OK on the machines I have tested (iow, no regression so far).
Thank you for the work!
Signature · 1 line
Péter
Quoted 48 lines
---
New since first version:- snd_hda_core.gpu_bind is added as a mechanism to force gpu binding, for testing. snd_hda_core.gpu_bind=0 forces waiting for GPU bind to off, snd_hda_core.gpu_bind=1 forces waiting for gpu bind. Default setting depends on whether kernel booted with nomodeset.
- Incorporated all feedback review.Cc Jaroslav Kysela <[email protected]>Cc Takashi Iwai <[email protected]>Cc Cezary Rojewski <[email protected]>Cc Pierre-Louis Bossart <[email protected]>Cc Liam Girdwood <[email protected]>Cc Peter Ujfalusi <[email protected]>Cc Bard Liao <[email protected]>Cc Ranjani Sridharan <[email protected]>Cc Kai Vehmanen <[email protected]>Cc Mark Brown <[email protected]>Cc Daniel Baluta <[email protected]>Maarten Lankhorst (9):
ALSA: hda/intel: Fix error handling inazx_probe()
ALSA: hda/i915: Allow override of gpu binding.
ALSA: hda/i915: Add anallow_modprobeargument tosnd_hdac_i915_init
ALSA: hda/i915: Allow xe as match fori915_component_master_match
ASoC: Intel: avs: Movesnd_hdac_i915_initto beforeprobe_work.
ASoC: Intel: Skylake: Movesnd_hdac_i915_initto beforeprobe_work.
ALSA: hda/intel: Movesnd_hdac_i915_initto beforeprobe_work.
ASoC: SOF: Intel: Remove deferred probe for SOF
ALSA: hda/i915: Remove extra argument fromsnd_hdac_i915_initsound/hda/hdac_i915.c | 25 ++++++++------- sound/pci/hda/hda_intel.c | 60 ++++++++++++++++++----------------- sound/soc/intel/avs/core.c | 13 +++++--- sound/soc/intel/skylake/skl.c | 31 ++++++------------ sound/soc/sof/Kconfig | 19 ----------- sound/soc/sof/core.c | 38 ++-------------------- sound/soc/sof/intel/Kconfig | 1 - sound/soc/sof/intel/hda.c | 32 +++++++++++-------- sound/soc/sof/sof-pci-dev.c | 3 +- sound/soc/sof/sof-priv.h | 5 --- 10 files changed, 85 insertions(+), 142 deletions(-)
Quoted 19 lines · Maarten Lankhorst
Explicitly loading i915 becomes a problem when upstreaming the new intel driver for Tiger Lake and higher graphics (xe). By loading i915, it doesn't wait for driver load of xe, and will fail completely before it loads.
-EPROBE_DEFER has to be returned before any device is created in
probe(), otherwise the removal of the device will causeEPROBE_DEFERto try again in an infinite loop.The conversion is done in gradual steps. First I add an argument to
snd_hdac_i915_initto allow for -EPROBE_DEFER so I can convert each driver separately. Then I convert each driver to movesnd_hdac_i915_initout of the workqueue. Finally I drop the ability to choose modprobe behavior after the last user is converted.I suspect the avs and skylake drivers used
snd_hdac_i915_initpurely for the modprobe, but I don't have the hardware to test if it can be safely removed. It can still be done easily in a followup patch to simplify probing.
Quoted 8 lines
---
New since first version:- snd_hda_core.gpu_bind is added as a mechanism to force gpu binding, for testing. snd_hda_core.gpu_bind=0 forces waiting for GPU bind to off, snd_hda_core.gpu_bind=1 forces waiting for gpu bind. Default setting depends on whether kernel booted with nomodeset.
- Incorporated all feedback review.
Maarten, are you working on v3 patch set?
Or, for moving forward, should we merge v2 now and fix the rest based on that later?
thanks,
Takashi
Hey,
Den 2023-07-31 kl. 17:51, skrev Takashi Iwai:
Quoted 23 lines
Quoted 21 lines · Maarten Lankhorst
Explicitly loading i915 becomes a problem when upstreaming the new intel driver for Tiger Lake and higher graphics (xe). By loading i915, it doesn't wait for driver load of xe, and will fail completely before it loads.
-EPROBE_DEFER has to be returned before any device is created in
probe(), otherwise the removal of the device will causeEPROBE_DEFERto try again in an infinite loop.The conversion is done in gradual steps. First I add an argument to
snd_hdac_i915_initto allow for -EPROBE_DEFER so I can convert each driver separately. Then I convert each driver to movesnd_hdac_i915_initout of the workqueue. Finally I drop the ability to choose modprobe behavior after the last user is converted.I suspect the avs and skylake drivers used
snd_hdac_i915_initpurely for the modprobe, but I don't have the hardware to test if it can be safely removed. It can still be done easily in a followup patch to simplify probing.---
New since first version:
Quoted 8 lines
Quoted 5 lines
- snd_hda_core.gpu_bind is added as a mechanism to force gpu binding, for testing. snd_hda_core.gpu_bind=0 forces waiting for GPU bind to off, snd_hda_core.gpu_bind=1 forces waiting for gpu bind. Default setting depends on whether kernel booted with nomodeset.
- Incorporated all feedback review.Maarten, are you working on v3 patch set?
Or, for moving forward, should we merge v2 now and fix the rest based on that later?
I've been working on a small change to keep the workqueue in SOF and only move the binding to the probe function to match what snd-hda-intel is doing, but I don't know if that is needed?
It was a bit unclear to me based on feedback if I should try to kill the workqueue on all drivers (but with no way to test), or keep it around.
Cheers,
~Maarten
Quoted 36 lines · Maarten Lankhorst
Hey,
Den 2023-07-31 kl. 17:51, skrev Takashi Iwai:
Quoted 23 lines
Quoted 21 lines · Maarten Lankhorst
Explicitly loading i915 becomes a problem when upstreaming the new intel driver for Tiger Lake and higher graphics (xe). By loading i915, it doesn't wait for driver load of xe, and will fail completely before it loads.
-EPROBE_DEFER has to be returned before any device is created in
probe(), otherwise the removal of the device will causeEPROBE_DEFERto try again in an infinite loop.The conversion is done in gradual steps. First I add an argument to
snd_hdac_i915_initto allow for -EPROBE_DEFER so I can convert each driver separately. Then I convert each driver to movesnd_hdac_i915_initout of the workqueue. Finally I drop the ability to choose modprobe behavior after the last user is converted.I suspect the avs and skylake drivers used
snd_hdac_i915_initpurely for the modprobe, but I don't have the hardware to test if it can be safely removed. It can still be done easily in a followup patch to simplify probing.---
New since first version:Quoted 8 lines
Quoted 5 lines
- snd_hda_core.gpu_bind is added as a mechanism to force gpu binding, for testing. snd_hda_core.gpu_bind=0 forces waiting for GPU bind to off, snd_hda_core.gpu_bind=1 forces waiting for gpu bind. Default setting depends on whether kernel booted with nomodeset.
- Incorporated all feedback review.Maarten, are you working on v3 patch set?
Or, for moving forward, should we merge v2 now and fix the rest based on that later?
Quoted 7 lines
I've been working on a small change to keep the workqueue in SOF and only move the binding to the probe function to match what snd-hda-intel is doing, but I don't know if that is needed?
It was a bit unclear to me based on feedback if I should try to kill the workqueue on all drivers (but with no way to test), or keep it around.
I guess it's still safer to keep the workqueue in many drivers. There can be modprobe or firmware loading at any later stage.
We can get rid of the workqueue once after confirming that it's really safe, too.
So, if you can work on the patch set in that regard, it's fine, I can wait for it.
thanks,
Takashi
Hey,
Den 2023-07-31 kl. 21:32, skrev Takashi Iwai:
Quoted 43 lines
Quoted 34 lines · Maarten Lankhorst
Hey,
Den 2023-07-31 kl. 17:51, skrev Takashi Iwai:
Quoted 23 lines
Quoted 21 lines · Maarten Lankhorst
Explicitly loading i915 becomes a problem when upstreaming the new intel driver for Tiger Lake and higher graphics (xe). By loading i915, it doesn't wait for driver load of xe, and will fail completely before it loads.
-EPROBE_DEFER has to be returned before any device is created in
probe(), otherwise the removal of the device will causeEPROBE_DEFERto try again in an infinite loop.The conversion is done in gradual steps. First I add an argument to
snd_hdac_i915_initto allow for -EPROBE_DEFER so I can convert each driver separately. Then I convert each driver to movesnd_hdac_i915_initout of the workqueue. Finally I drop the ability to choose modprobe behavior after the last user is converted.I suspect the avs and skylake drivers used
snd_hdac_i915_initpurely for the modprobe, but I don't have the hardware to test if it can be safely removed. It can still be done easily in a followup patch to simplify probing.---
New since first version:Quoted 8 lines
Quoted 5 lines
- snd_hda_core.gpu_bind is added as a mechanism to force gpu binding, for testing. snd_hda_core.gpu_bind=0 forces waiting for GPU bind to off, snd_hda_core.gpu_bind=1 forces waiting for gpu bind. Default setting depends on whether kernel booted with nomodeset.
- Incorporated all feedback review.Maarten, are you working on v3 patch set?
Or, for moving forward, should we merge v2 now and fix the rest based on that later?Quoted 7 lines
I've been working on a small change to keep the workqueue in SOF and only move the binding to the probe function to match what snd-hda-intel is doing, but I don't know if that is needed?
It was a bit unclear to me based on feedback if I should try to kill the workqueue on all drivers (but with no way to test), or keep it around.
Quoted 7 lines
I guess it's still safer to keep the workqueue in many drivers. There can be modprobe or firmware loading at any later stage.
We can get rid of the workqueue once after confirming that it's really safe, too.So, if you can work on the patch set in that regard, it's fine, I can wait for it.
I've finished that patch, but it caused regressions (oops) while rebooting. I think it's safer to kill the workqueue for SOC, and then convert all other drivers later.
Cheers,
~Maarten
Quoted 7 lines
I've been working on a small change to keep the workqueue in SOF and only move the binding to the probe function to match what snd-hda-intel is doing, but I don't know if that is needed?
It was a bit unclear to me based on feedback if I should try to kill the workqueue on all drivers (but with no way to test), or keep it around.
My understanding is that we only want to move the binding to the probe function and leave the workqueue removal for another day - possibly never.
PATCH 1/1 ASoC: SOF: Intel: Move binding to display driver outside of deferred probe
Hey,
Quoted 10 lines · Pierre-Louis Bossart
Quoted 7 lines
I've been working on a small change to keep the workqueue in SOF and only move the binding to the probe function to match what snd-hda-intel is doing, but I don't know if that is needed?
It was a bit unclear to me based on feedback if I should try to kill the workqueue on all drivers (but with no way to test), or keep it around.
My understanding is that we only want to move the binding to the probe function and leave the workqueue removal for another day - possibly never.
Patch 8/9 removed the workqueue, but can be replaced by the patch below, that simply moves out snd_sof_probe().
I've attempted this before, but didn't have snd_sof_remove in snd_sof_device_remove, which is why I would get a OOPS when attempting to do a shutdown/reboot.
With that I hopefully addressed the last concern.
Cheers,
Maarten
This mail can be applied with git am -c.
------8<---------
Now that we can use -EPROBE_DEFER, it's no longer required to spin off the snd_hdac_i915_init into a workqueue.
Use the -EPROBE_DEFER mechanism instead, which must be returned in the probe function.
--- sound/soc/sof/core.c | 19 +++++++------------ sound/soc/sof/intel/hda-codec.c | 2 +- 2 files changed, 8 insertions(+), 13 deletions(-)
sound/soc/sof/core.c +7 -12
@@ -188,13 +188,6 @@ static int sof_probe_continue(struct snd_sof_dev *sdev)struct snd_sof_pdata *plat_data = sdev->pdata;int ret; -/* probe the DSP hardware */ - ret =snd_sof_probe (sdev); -if (ret <0 ) { -dev_err (sdev->dev,"error: failed to probe DSP %d\n" , ret); - goto probe_err; - } -sof_set_fw_state (sdev,SOF_FW_BOOT_PREPARE );/* check machine info */
@@ -325,10 +318,6 @@ static int sof_probe_continue(struct snd_sof_dev *sdev) dbg_err:snd_sof_free_debug (sdev); dsp_err: -snd_sof_remove (sdev); -probe_err: -sof_ops_free (sdev); -/* all resources freed, update state to match */ sof_set_fw_state (sdev,SOF_FW_BOOT_NOT_STARTED ); sdev->first_boot = true;
@@ -436,6 +425,12 @@ int snd_sof_device_probe(struct device *dev, struct snd_sof_pdata *plat_data)sof_set_fw_state (sdev,SOF_FW_BOOT_NOT_STARTED ); + ret =snd_sof_probe (sdev); +if (ret) { +dev_err_probe (sdev->dev, ret,"failed to probe DSP\n" ); +return ret; + } +if (IS_ENABLED (CONFIG_SND_SOC_SOF_PROBE_WORK_QUEUE )) {INIT_WORK (&sdev->probe_work, sof_probe_work);schedule_work (&sdev->probe_work);
@@ -485,9 +480,9 @@ int snd_sof_device_remove(struct device *dev)snd_sof_ipc_free (sdev);snd_sof_free_debug (sdev); -snd_sof_remove (sdev); } +snd_sof_remove (sdev);sof_ops_free (sdev);/* release firmware */
sound/soc/sof/intel/hda-codec.c +1 -1
@@ -415,7 +415,7 @@ int hda_codec_i915_init(struct snd_sof_dev *sdev)return 0 ;/* i915 exposes a HDA codec for HDMI audio */ - ret =snd_hdac_i915_init (bus, true); + ret =snd_hdac_i915_init (bus, false);if (ret <0 )return ret;
Signature · 1 line
2.39.2
Mark Brown
maintainerRe: [PATCH] ASoC: SOF: Intel: Move binding to display driver outside of deferred probe
Quoted 5 lines · Maarten Lankhorst
On 2023-08-01 18:32, Pierre-Louis Bossart wrote:
This mail can be applied with git am -c.
------8<---------
Now that we can use -EPROBE_DEFER, it's no longer required to spin off
Don't do this, it breaks my automation and means I very nearly just skipped the patch entirely since it looked like the middle of some x86 discussion.
Re: [PATCH] ASoC: SOF: Intel: Move binding to display driver outside of deferred probe
Hey,
Den 2023-08-04 kl. 13:59, skrev Mark Brown:
Quoted 8 lines · Maarten Lankhorst
Quoted 4 lines · Pierre-Louis Bossart
This mail can be applied with git am -c.
------8<---------
Now that we can use -EPROBE_DEFER, it's no longer required to spin offDon't do this, it breaks my automation and means I very nearly just skipped the patch entirely since it looked like the middle of some x86 discussion.
Yeah, it's replacing the patch from earlier. I can resend, but means having to add all acks, r-b'd, etc. :)
If you have scripts that do that, all the better.
Cheers,
~Maarten
Mark Brown
maintainerRe: [PATCH] ASoC: SOF: Intel: Move binding to display driver outside of deferred probe
Quoted 6 lines · Maarten Lankhorst
Den 2023-08-04 kl. 13:59, skrev Mark Brown:
Quoted 3 lines
Quoted 3 lines · Pierre-Louis Bossart
This mail can be applied with git am -c.
------8<---------
Quoted 7 lines
Quoted 4 lines
Quoted 1 line
Now that we can use -EPROBE_DEFER, it's no longer required to spin off
Don't do this, it breaks my automation and means I very nearly just skipped the patch entirely since it looked like the middle of some x86 discussion.
Yeah, it's replacing the patch from earlier. I can resend, but means having to add all acks, r-b'd, etc. :)
*Defintely* do not do that:
Please don't send new patches in reply to old patches or serieses, this makes it harder for both people and tools to understand what is going on - it can bury things in mailboxes and make it difficult to keep track of what current patches are, both for the new patches and the old ones.
Quoted 1 line
If you have scripts that do that, all the better.
If you're using b4 then b4 trailers --update.