[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.22.394.2309011526300.3390143@eliteleevi.tm.intel.com>
Date: Fri, 1 Sep 2023 15:33:19 +0300 (EEST)
From: Kai Vehmanen <kai.vehmanen@...ux.intel.com>
To: Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>
cc: Alsa-devel <alsa-devel@...a-project.org>,
Jaroslav Kysela <perex@...ex.cz>,
Takashi Iwai <tiwai@...e.com>,
Cezary Rojewski <cezary.rojewski@...el.com>,
Pierre-Louis Bossart <pierre-louis.bossart@...ux.intel.com>,
Liam Girdwood <liam.r.girdwood@...ux.intel.com>,
Peter Ujfalusi <peter.ujfalusi@...ux.intel.com>,
Bard Liao <yung-chuan.liao@...ux.intel.com>,
Ranjani Sridharan <ranjani.sridharan@...ux.intel.com>,
Kai Vehmanen <kai.vehmanen@...ux.intel.com>,
Mark Brown <broonie@...nel.org>,
Daniel Baluta <daniel.baluta@....com>,
linux-kernel@...r.kernel.org, sound-open-firmware@...a-project.org
Subject: Re: [PATCH v4 10/11] ASoC: SOF: Intel: Move binding to display driver
outside of deferred probe
Hey,
On Wed, 30 Aug 2023, Maarten Lankhorst wrote:
> 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.
>
> The previously added probe_no_wq can be used for this,
> and we also use the newly added remove_no_wq for unbinding afterwards.
[...]
> @@ -1317,7 +1313,6 @@ int hda_dsp_remove(struct snd_sof_dev *sdev)
> {
> struct sof_intel_hda_dev *hda = sdev->pdata->hw_pdata;
> const struct sof_intel_dsp_desc *chip = hda->desc;
> - struct hdac_bus *bus = sof_to_bus(sdev);
> struct pci_dev *pci = to_pci_dev(sdev->dev);
> struct nhlt_acpi_table *nhlt = hda->nhlt;
>
> @@ -1368,10 +1363,12 @@ int hda_dsp_remove(struct snd_sof_dev *sdev)
> if (!sdev->dspless_mode_selected)
> iounmap(sdev->bar[HDA_DSP_BAR]);
>
> - iounmap(bus->remap_addr);
> -
> - sof_hda_bus_exit(sdev);
> + return 0;
> +}
>
> +int hda_dsp_remove_no_wq(struct snd_sof_dev *sdev)
> +{
> + iounmap(sof_to_bus(sdev)->remap_addr);
> hda_codec_i915_exit(sdev);
I think here we drop the call to sof_hda_bus_exit() which should be done
in hda_dsp_remove_no_wq() to counter hda_init().
Rest looks good to me, the "no_wq" variants do symmetric ops,
so we can handle both wq an non-wq cases.
Br, Kai
Powered by blists - more mailing lists