diff mbox series

[1/7] ASoC: amd: No need PCI-MSI interrupts

Message ID 1569891524-18875-1-git-send-email-Vishnuvardhanrao.Ravulapati@amd.com (mailing list archive)
State New, archived
Headers show
Series [1/7] ASoC: amd: No need PCI-MSI interrupts | expand

Commit Message

RAVULAPATI, VISHNU VARDHAN RAO Oct. 1, 2019, 12:58 a.m. UTC
ACP-PCI controller driver does not depends msi interrupts.
So removed msi related pci functions which have no
use and does not impact on existing functionality.

Signed-off-by: Ravulapati Vishnu vardhan rao <Vishnuvardhanrao.Ravulapati@amd.com>
---
 sound/soc/amd/raven/pci-acp3x.c | 11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)

Comments

Alex Deucher Oct. 1, 2019, 5:23 p.m. UTC | #1
> -----Original Message-----
> From: Ravulapati Vishnu vardhan rao
> <Vishnuvardhanrao.Ravulapati@amd.com>
> Sent: Monday, September 30, 2019 8:58 PM
> Cc: Deucher, Alexander <Alexander.Deucher@amd.com>; RAVULAPATI,
> VISHNU VARDHAN RAO <Vishnuvardhanrao.Ravulapati@amd.com>; Liam
> Girdwood <lgirdwood@gmail.com>; Mark Brown <broonie@kernel.org>;
> Jaroslav Kysela <perex@perex.cz>; Takashi Iwai <tiwai@suse.com>;
> Mukunda, Vijendar <Vijendar.Mukunda@amd.com>; Maruthi Srinivas
> Bayyavarapu <Maruthi.Bayyavarapu@amd.com>; Deucher, Alexander
> <Alexander.Deucher@amd.com>; Colin Ian King
> <colin.king@canonical.com>; Dan Carpenter <dan.carpenter@oracle.com>;
> moderated list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM...
> <alsa-devel@alsa-project.org>; open list <linux-kernel@vger.kernel.org>
> Subject: [PATCH 1/7] ASoC: amd: No need PCI-MSI interrupts
> 
> ACP-PCI controller driver does not depends msi interrupts.
> So removed msi related pci functions which have no use and does not impact
> on existing functionality.

In general, however, aren't MSIs preferred to legacy interrupts?  Doesn't the driver have to opt into MSI support?  As such, won't removing this code effectively disable MSI support?

Alex

> 
> Signed-off-by: Ravulapati Vishnu vardhan rao
> <Vishnuvardhanrao.Ravulapati@amd.com>
> ---
>  sound/soc/amd/raven/pci-acp3x.c | 11 +----------
>  1 file changed, 1 insertion(+), 10 deletions(-)
> 
> diff --git a/sound/soc/amd/raven/pci-acp3x.c b/sound/soc/amd/raven/pci-
> acp3x.c index facec24..8f6bf00 100644
> --- a/sound/soc/amd/raven/pci-acp3x.c
> +++ b/sound/soc/amd/raven/pci-acp3x.c
> @@ -46,14 +46,7 @@ static int snd_acp3x_probe(struct pci_dev *pci,
>  		goto release_regions;
>  	}
> 
> -	/* check for msi interrupt support */
> -	ret = pci_enable_msi(pci);
> -	if (ret)
> -		/* msi is not enabled */
> -		irqflags = IRQF_SHARED;
> -	else
> -		/* msi is enabled */
> -		irqflags = 0;
> +	irqflags = 0;
> 
>  	addr = pci_resource_start(pci, 0);
>  	adata->acp3x_base = ioremap(addr, pci_resource_len(pci, 0)); @@ -
> 112,7 +105,6 @@ static int snd_acp3x_probe(struct pci_dev *pci,
>  	return 0;
> 
>  unmap_mmio:
> -	pci_disable_msi(pci);
>  	iounmap(adata->acp3x_base);
>  release_regions:
>  	pci_release_regions(pci);
> @@ -129,7 +121,6 @@ static void snd_acp3x_remove(struct pci_dev *pci)
>  	platform_device_unregister(adata->pdev);
>  	iounmap(adata->acp3x_base);
> 
> -	pci_disable_msi(pci);
>  	pci_release_regions(pci);
>  	pci_disable_device(pci);
>  }
> --
> 2.7.4
Mark Brown Oct. 1, 2019, 5:29 p.m. UTC | #2
On Tue, Oct 01, 2019 at 05:23:43PM +0000, Deucher, Alexander wrote:

> > ACP-PCI controller driver does not depends msi interrupts.
> > So removed msi related pci functions which have no use and does not impact
> > on existing functionality.

> In general, however, aren't MSIs preferred to legacy interrupts?

As I understand it.  Or at the very least I'm not aware of any situation
where they're harmful.  It'd be good to have a clear explanation of why
we're removing the support.

> Doesn't the driver have to opt into MSI support?  As such, won't
> removing this code effectively disable MSI support?

Yes.
vishnu Oct. 10, 2019, 10:40 a.m. UTC | #3
Hi,
Please find my inline comments.

Thanks,
Vishnu

On 01/10/19 10:59 PM, Mark Brown wrote:
> On Tue, Oct 01, 2019 at 05:23:43PM +0000, Deucher, Alexander wrote:
> 
>>> ACP-PCI controller driver does not depends msi interrupts.
>>> So removed msi related pci functions which have no use and does not impact
>>> on existing functionality.
> 
>> In general, however, aren't MSIs preferred to legacy interrupts?
> 
> As I understand it.  Or at the very least I'm not aware of any situation
> where they're harmful.  It'd be good to have a clear explanation of why
> we're removing the support.

Actually our device is audio device and it does not depends on MSI`s.
So we thought to remove it as it has no purpose or meaning to have
this code in our audio based ACP-PCI driver.

>> Doesn't the driver have to opt into MSI support?  As such, won't
>> removing this code effectively disable MSI support?
> 
> Yes.
vishnu Oct. 17, 2019, 9:31 a.m. UTC | #4
On 01/10/19 10:59 PM, Mark Brown wrote:
> On Tue, Oct 01, 2019 at 05:23:43PM +0000, Deucher, Alexander wrote:
> 
>>> ACP-PCI controller driver does not depends msi interrupts.
>>> So removed msi related pci functions which have no use and does not impact
>>> on existing functionality.
> 
>> In general, however, aren't MSIs preferred to legacy interrupts?
> 
> As I understand it.  Or at the very least I'm not aware of any situation
> where they're harmful.  It'd be good to have a clear explanation of why
> we're removing the support.
> 
>> Doesn't the driver have to opt into MSI support?  As such, won't
>> removing this code effectively disable MSI support?
> 
> Yes.
> 
Hi Mark,

Any further updates on this patch.

Regards,
Vishnu
vishnu Oct. 17, 2019, 9:33 a.m. UTC | #5
On 11/10/19 3:03 AM, vishnu wrote:
> Hi,
> Please find my inline comments.
> 
> Thanks,
> Vishnu
> 
> On 01/10/19 10:59 PM, Mark Brown wrote:
>> On Tue, Oct 01, 2019 at 05:23:43PM +0000, Deucher, Alexander wrote:
>>
>>>> ACP-PCI controller driver does not depends msi interrupts.
>>>> So removed msi related pci functions which have no use and does not 
>>>> impact
>>>> on existing functionality.
>>
>>> In general, however, aren't MSIs preferred to legacy interrupts?
>>
>> As I understand it.  Or at the very least I'm not aware of any situation
>> where they're harmful.  It'd be good to have a clear explanation of why
>> we're removing the support.
> 
> Actually our device is audio device and it does not depends on MSI`s.
> So we thought to remove it as it has no purpose or meaning to have
> this code in our audio based ACP-PCI driver.
> 
>>> Doesn't the driver have to opt into MSI support?  As such, won't
>>> removing this code effectively disable MSI support?
>>
>> Yes.
> 
> 

Hi Mark,

Any updates on this patch.

Regards,
Vishnu
Mark Brown Oct. 17, 2019, 11:12 a.m. UTC | #6
On Thu, Oct 17, 2019 at 09:33:06AM +0000, vishnu wrote:

> Any updates on this patch.

I already negatively reviewed it?
Alex Deucher Oct. 17, 2019, 1:56 p.m. UTC | #7
> -----Original Message-----
> From: RAVULAPATI, VISHNU VARDHAN RAO
> <Vishnuvardhanrao.Ravulapati@amd.com>
> Sent: Thursday, October 17, 2019 5:33 AM
> To: Mark Brown <broonie@kernel.org>; Deucher, Alexander
> <Alexander.Deucher@amd.com>
> Cc: RAVULAPATI, VISHNU VARDHAN RAO
> <Vishnuvardhanrao.Ravulapati@amd.com>; Liam Girdwood
> <lgirdwood@gmail.com>; Jaroslav Kysela <perex@perex.cz>; Takashi Iwai
> <tiwai@suse.com>; Mukunda, Vijendar <Vijendar.Mukunda@amd.com>;
> Maruthi Srinivas Bayyavarapu <Maruthi.Bayyavarapu@amd.com>; Colin Ian
> King <colin.king@canonical.com>; Dan Carpenter
> <dan.carpenter@oracle.com>; moderated list:SOUND - SOC LAYER /
> DYNAMIC AUDIO POWER MANAGEM... <alsa-devel@alsa-project.org>; open
> list <linux-kernel@vger.kernel.org>
> Subject: Re: [PATCH 1/7] ASoC: amd: No need PCI-MSI interrupts
> 
> 
> 
> On 11/10/19 3:03 AM, vishnu wrote:
> > Hi,
> > Please find my inline comments.
> >
> > Thanks,
> > Vishnu
> >
> > On 01/10/19 10:59 PM, Mark Brown wrote:
> >> On Tue, Oct 01, 2019 at 05:23:43PM +0000, Deucher, Alexander wrote:
> >>
> >>>> ACP-PCI controller driver does not depends msi interrupts.
> >>>> So removed msi related pci functions which have no use and does not
> >>>> impact on existing functionality.
> >>
> >>> In general, however, aren't MSIs preferred to legacy interrupts?
> >>
> >> As I understand it.  Or at the very least I'm not aware of any
> >> situation where they're harmful.  It'd be good to have a clear
> >> explanation of why we're removing the support.
> >
> > Actually our device is audio device and it does not depends on MSI`s.
> > So we thought to remove it as it has no purpose or meaning to have
> > this code in our audio based ACP-PCI driver.
> >
> >>> Doesn't the driver have to opt into MSI support?  As such, won't
> >>> removing this code effectively disable MSI support?
> >>
> >> Yes.
> >
> >
> 
> Hi Mark,
> 
> Any updates on this patch.

You are removing functionality from the driver with no rational as to why it's necessary.  What's the point of this patch?  Does it fix a particular issue?  If not, I suggest just dropping it.  The hw supports MSIs, why not use them?

Alex
diff mbox series

Patch

diff --git a/sound/soc/amd/raven/pci-acp3x.c b/sound/soc/amd/raven/pci-acp3x.c
index facec24..8f6bf00 100644
--- a/sound/soc/amd/raven/pci-acp3x.c
+++ b/sound/soc/amd/raven/pci-acp3x.c
@@ -46,14 +46,7 @@  static int snd_acp3x_probe(struct pci_dev *pci,
 		goto release_regions;
 	}
 
-	/* check for msi interrupt support */
-	ret = pci_enable_msi(pci);
-	if (ret)
-		/* msi is not enabled */
-		irqflags = IRQF_SHARED;
-	else
-		/* msi is enabled */
-		irqflags = 0;
+	irqflags = 0;
 
 	addr = pci_resource_start(pci, 0);
 	adata->acp3x_base = ioremap(addr, pci_resource_len(pci, 0));
@@ -112,7 +105,6 @@  static int snd_acp3x_probe(struct pci_dev *pci,
 	return 0;
 
 unmap_mmio:
-	pci_disable_msi(pci);
 	iounmap(adata->acp3x_base);
 release_regions:
 	pci_release_regions(pci);
@@ -129,7 +121,6 @@  static void snd_acp3x_remove(struct pci_dev *pci)
 	platform_device_unregister(adata->pdev);
 	iounmap(adata->acp3x_base);
 
-	pci_disable_msi(pci);
 	pci_release_regions(pci);
 	pci_disable_device(pci);
 }