All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
To: "Mukunda, Vijendar" <Vijendar.Mukunda@amd.com>,
	Alex Deucher <alexdeucher@gmail.com>,
	"alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>,
	"broonie@kernel.org" <broonie@kernel.org>,
	"tiwai@suse.de" <tiwai@suse.de>
Cc: "Deucher, Alexander" <Alexander.Deucher@amd.com>
Subject: Re: [PATCH 09/14] ASoC: amd: add Renoir ACP PCI driver PM ops
Date: Wed, 6 May 2020 12:58:33 -0500	[thread overview]
Message-ID: <5de8263b-414f-8ef0-1a46-215e9f736161@linux.intel.com> (raw)
In-Reply-To: <DM6PR12MB263348006EAC4B664E7E556F97A40@DM6PR12MB2633.namprd12.prod.outlook.com>




>>> @@ -233,6 +234,12 @@ static int snd_rn_acp_probe(struct pci_dev *pci,
>>>    		ret = PTR_ERR(adata->pdev);
>>>    		goto unregister_devs;
>>>    	}
>>> +	pm_runtime_set_autosuspend_delay(&pci->dev,
>> ACP_SUSPEND_DELAY_MS);
>>> +	pm_runtime_use_autosuspend(&pci->dev);
>>> +	pm_runtime_set_active(&pci->dev);
>>
>> is the set_active() needed? I haven't seen this in the other PCI audio
>> drivers? >
> We have similar implementation in our Raven ACP PCI driver as well
> which got up streamed.
> I will give a try by modifying this sequence.
> Could you please point me , what's exactly wrong with this code?

you would use pm_runtime_set_active() if the device was suspended. I 
don't think this can possibly happen since there is a _get done by the 
PCI core, which you compensate for in the line below.

Also look at drivers/pci/pci.c, the core already does this set_active() 
and _enable().

void pci_pm_init(struct pci_dev *dev)
{
...

	pm_runtime_forbid(&dev->dev);
	pm_runtime_set_active(&dev->dev);
	pm_runtime_enable(&dev->dev);

>>> +	pm_runtime_put_noidle(&pci->dev);
>>> +	pm_runtime_enable(&pci->dev);
>>
>> same, is the _enable() needed()?
> 
> We have similar implementation in Raven ACP PCI driver as well.

It's quite common unfortunately that extended pm_runtime sequences are 
used without checking what's necessary - it took Intel some time to 
clearly define what we needed and what was redundant/noop.

>>> +	pm_runtime_allow(&pci->dev);
>>>    	return 0;
>>>
>>>    unregister_devs:
>>> @@ -250,6 +257,42 @@ static int snd_rn_acp_probe(struct pci_dev *pci,
>>>    	return ret;
>>>    }
>>>
> 

  reply	other threads:[~2020-05-06 17:59 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-05 20:53 [PATCH 00/14] Add Renoir ACP driver Alex Deucher
2020-05-05 20:53 ` [PATCH 01/14] ASoC: amd: add Renoir ACP3x IP register header Alex Deucher
2020-05-05 20:53 ` [PATCH 02/14] ASoC: amd: add Renoir ACP PCI driver Alex Deucher
2020-05-05 20:53 ` [PATCH 03/14] ASoC: amd: add acp init/de-init functions Alex Deucher
2020-05-05 20:53 ` [PATCH 04/14] ASoC: amd: create acp3x pdm platform device Alex Deucher
2020-05-05 20:53 ` [PATCH 05/14] ASoC: amd: add ACP3x PDM platform driver Alex Deucher
2020-05-05 22:03   ` Pierre-Louis Bossart
2020-05-06 17:20     ` Mukunda, Vijendar
2020-05-05 20:53 ` [PATCH 06/14] ASoC: amd: irq handler changes for ACP3x PDM dma driver Alex Deucher
2020-05-05 20:53 ` [PATCH 07/14] ASoC: amd: add acp3x pdm driver dma ops Alex Deucher
2020-05-05 21:59   ` Pierre-Louis Bossart
2020-05-06 17:30     ` Mukunda, Vijendar
2020-05-06 18:02       ` Pierre-Louis Bossart
2020-05-05 20:53 ` [PATCH 08/14] ASoC: amd: add ACP PDM DMA driver dai ops Alex Deucher
2020-05-05 21:55   ` Pierre-Louis Bossart
2020-05-06 17:12     ` Mukunda, Vijendar
2020-05-05 20:53 ` [PATCH 09/14] ASoC: amd: add Renoir ACP PCI driver PM ops Alex Deucher
2020-05-05 21:48   ` Pierre-Louis Bossart
2020-05-06 17:42     ` Mukunda, Vijendar
2020-05-06 17:58       ` Pierre-Louis Bossart [this message]
2020-05-05 20:53 ` [PATCH 10/14] ASoC: amd: add ACP PDM DMA driver pm ops Alex Deucher
2020-05-05 20:53 ` [PATCH 11/14] ASoC: amd: enable Renoir acp3x drivers build Alex Deucher
2020-05-05 20:53 ` [PATCH 12/14] ASoC: amd: create platform devices for Renoir Alex Deucher
2020-05-05 20:53 ` [PATCH 13/14] ASoC: amd: RN machine driver using dmic Alex Deucher
2020-05-05 21:37   ` Pierre-Louis Bossart
2020-05-06 16:01     ` Mukunda, Vijendar
2020-05-05 20:53 ` [PATCH 14/14] ASoC: amd: enable build for RN machine driver Alex Deucher
2020-05-05 21:39   ` Pierre-Louis Bossart
2020-05-06 15:54     ` Mukunda, Vijendar
2020-05-06 16:26     ` Mark Brown
2020-05-06 16:33       ` Mukunda, Vijendar
2020-05-06 16:43         ` Mark Brown
2020-05-06 17:17           ` Pierre-Louis Bossart
2020-05-06 17:25             ` Mark Brown
2020-05-06 17:27               ` Mukunda, Vijendar
2020-05-06 17:28                 ` Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5de8263b-414f-8ef0-1a46-215e9f736161@linux.intel.com \
    --to=pierre-louis.bossart@linux.intel.com \
    --cc=Alexander.Deucher@amd.com \
    --cc=Vijendar.Mukunda@amd.com \
    --cc=alexdeucher@gmail.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=tiwai@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.