linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 2/4] gpu/radeon: Move 64-bit MSI quirk from arch to driver
@ 2014-10-02  0:33 Benjamin Herrenschmidt
  2014-10-02  2:18 ` Alex Deucher
  0 siblings, 1 reply; 8+ messages in thread
From: Benjamin Herrenschmidt @ 2014-10-02  0:33 UTC (permalink / raw)
  To: Alex Deucher, Bjorn Helgaas
  Cc: linuxppc-dev, Dave Airlie, linux-pci, Anton Blanchard,
	Yijing Wang, Takashi Iwai, Brian King

A number of radeon cards have a HW limitation causing them to be
unable to generate the full 64-bit of address bits for MSIs. This
breaks MSIs on some platforms such as POWER machines.

We used to have a powerpc specific quirk to address that on a
single card, but this doesn't scale very well, this is better
put under control of the drivers who know precisely what a given
HW revision can do.

This moves the setting of the quirk flag to the radeon driver

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
CC: <stable@vger.kernel.org>
---

v2: This is just adjusted to the new flag name

 arch/powerpc/kernel/pci_64.c            |  1 -
 drivers/gpu/drm/radeon/radeon_irq_kms.c | 10 ++++++++++
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/arch/powerpc/kernel/pci_64.c b/arch/powerpc/kernel/pci_64.c
index d41a831..5330f6d 100644
--- a/arch/powerpc/kernel/pci_64.c
+++ b/arch/powerpc/kernel/pci_64.c
@@ -271,5 +271,4 @@ static void quirk_radeon_32bit_msi(struct pci_dev *dev)
 {
 	dev->no_64bit_msi = true;
 }
-DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, 0x68f2, quirk_radeon_32bit_msi);
 DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, 0xaa68, quirk_radeon_32bit_msi);
diff --git a/drivers/gpu/drm/radeon/radeon_irq_kms.c b/drivers/gpu/drm/radeon/radeon_irq_kms.c
index 16807af..e760671 100644
--- a/drivers/gpu/drm/radeon/radeon_irq_kms.c
+++ b/drivers/gpu/drm/radeon/radeon_irq_kms.c
@@ -202,6 +202,16 @@ static bool radeon_msi_ok(struct radeon_device *rdev)
 	if (rdev->flags & RADEON_IS_AGP)
 		return false;
 
+	/*
+	 * Older chips have a HW limitation, they can only generate 40 bits
+	 * of address for "64-bit" MSIs which breaks on some platforms, notably
+	 * IBM POWER servers, so we limit them
+	 */
+	if (rdev->family < CHIP_BONAIRE) {
+		dev_info(rdev->dev, "radeon: MSI limited to 32-bit\n");
+		rdev->pdev->no_64bit_msi = true;
+	}
+
 	/* force MSI on */
 	if (radeon_msi == 1)
 		return true;

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

* [PATCH v2 2/4] gpu/radeon: Move 64-bit MSI quirk from arch to driver
@ 2014-10-02  0:34 Benjamin Herrenschmidt
  2014-10-02  1:52 ` Stephen Rothwell
  2014-10-02 15:34 ` Bjorn Helgaas
  0 siblings, 2 replies; 8+ messages in thread
From: Benjamin Herrenschmidt @ 2014-10-02  0:34 UTC (permalink / raw)
  To: Alex Deucher, Bjorn Helgaas
  Cc: linuxppc-dev, Dave Airlie, linux-pci, Anton Blanchard,
	Yijing Wang, Takashi Iwai, Brian King


A number of radeon cards have a HW limitation causing them to be
unable to generate the full 64-bit of address bits for MSIs. This
breaks MSIs on some platforms such as POWER machines.

We used to have a powerpc specific quirk to address that on a
single card, but this doesn't scale very well, this is better
put under control of the drivers who know precisely what a given
HW revision can do.

This moves the setting of the quirk flag to the radeon driver

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---

v2: This is just adjusted to the new flag name

 arch/powerpc/kernel/pci_64.c            |  1 -
 drivers/gpu/drm/radeon/radeon_irq_kms.c | 10 ++++++++++
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/arch/powerpc/kernel/pci_64.c b/arch/powerpc/kernel/pci_64.c
index d41a831..5330f6d 100644
--- a/arch/powerpc/kernel/pci_64.c
+++ b/arch/powerpc/kernel/pci_64.c
@@ -271,5 +271,4 @@ static void quirk_radeon_32bit_msi(struct pci_dev *dev)
 {
 	dev->no_64bit_msi = true;
 }
-DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, 0x68f2, quirk_radeon_32bit_msi);
 DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, 0xaa68, quirk_radeon_32bit_msi);
diff --git a/drivers/gpu/drm/radeon/radeon_irq_kms.c b/drivers/gpu/drm/radeon/radeon_irq_kms.c
index 16807af..e760671 100644
--- a/drivers/gpu/drm/radeon/radeon_irq_kms.c
+++ b/drivers/gpu/drm/radeon/radeon_irq_kms.c
@@ -202,6 +202,16 @@ static bool radeon_msi_ok(struct radeon_device *rdev)
 	if (rdev->flags & RADEON_IS_AGP)
 		return false;
 
+	/*
+	 * Older chips have a HW limitation, they can only generate 40 bits
+	 * of address for "64-bit" MSIs which breaks on some platforms, notably
+	 * IBM POWER servers, so we limit them
+	 */
+	if (rdev->family < CHIP_BONAIRE) {
+		dev_info(rdev->dev, "radeon: MSI limited to 32-bit\n");
+		rdev->pdev->no_64bit_msi = true;
+	}
+
 	/* force MSI on */
 	if (radeon_msi == 1)
 		return true;

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

* Re: [PATCH v2 2/4] gpu/radeon: Move 64-bit MSI quirk from arch to driver
  2014-10-02  0:34 [PATCH v2 2/4] gpu/radeon: Move 64-bit MSI quirk from arch to driver Benjamin Herrenschmidt
@ 2014-10-02  1:52 ` Stephen Rothwell
  2014-10-02 15:34 ` Bjorn Helgaas
  1 sibling, 0 replies; 8+ messages in thread
From: Stephen Rothwell @ 2014-10-02  1:52 UTC (permalink / raw)
  To: Benjamin Herrenschmidt
  Cc: linuxppc-dev, Dave Airlie, linux-pci, Brian King, Anton Blanchard,
	Bjorn Helgaas, Yijing Wang, Takashi Iwai, Alex Deucher

[-- Attachment #1: Type: text/plain, Size: 813 bytes --]

Hi Ben,

On Thu, 02 Oct 2014 10:34:22 +1000 Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote:
>
> --- a/drivers/gpu/drm/radeon/radeon_irq_kms.c
> +++ b/drivers/gpu/drm/radeon/radeon_irq_kms.c
> @@ -202,6 +202,16 @@ static bool radeon_msi_ok(struct radeon_device *rdev)
>  	if (rdev->flags & RADEON_IS_AGP)
>  		return false;
>  
> +	/*
> +	 * Older chips have a HW limitation, they can only generate 40 bits
> +	 * of address for "64-bit" MSIs which breaks on some platforms, notably
> +	 * IBM POWER servers, so we limit them
> +	 */
> +	if (rdev->family < CHIP_BONAIRE) {
> +		dev_info(rdev->dev, "radeon: MSI limited to 32-bit\n");
> +		rdev->pdev->no_64bit_msi = true;

Again, no_64bit_msi is not a bool ...

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

* Re: [PATCH v2 2/4] gpu/radeon: Move 64-bit MSI quirk from arch to driver
  2014-10-02  0:33 Benjamin Herrenschmidt
@ 2014-10-02  2:18 ` Alex Deucher
  0 siblings, 0 replies; 8+ messages in thread
From: Alex Deucher @ 2014-10-02  2:18 UTC (permalink / raw)
  To: Benjamin Herrenschmidt
  Cc: linuxppc-dev, Dave Airlie, Linux PCI, Anton Blanchard, Brian King,
	Yijing Wang, Takashi Iwai, Bjorn Helgaas

On Wed, Oct 1, 2014 at 8:33 PM, Benjamin Herrenschmidt
<benh@kernel.crashing.org> wrote:
> A number of radeon cards have a HW limitation causing them to be
> unable to generate the full 64-bit of address bits for MSIs. This
> breaks MSIs on some platforms such as POWER machines.
>
> We used to have a powerpc specific quirk to address that on a
> single card, but this doesn't scale very well, this is better
> put under control of the drivers who know precisely what a given
> HW revision can do.
>
> This moves the setting of the quirk flag to the radeon driver
>
> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> CC: <stable@vger.kernel.org>

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

> ---
>
> v2: This is just adjusted to the new flag name
>
>  arch/powerpc/kernel/pci_64.c            |  1 -
>  drivers/gpu/drm/radeon/radeon_irq_kms.c | 10 ++++++++++
>  2 files changed, 10 insertions(+), 1 deletion(-)
>
> diff --git a/arch/powerpc/kernel/pci_64.c b/arch/powerpc/kernel/pci_64.c
> index d41a831..5330f6d 100644
> --- a/arch/powerpc/kernel/pci_64.c
> +++ b/arch/powerpc/kernel/pci_64.c
> @@ -271,5 +271,4 @@ static void quirk_radeon_32bit_msi(struct pci_dev *dev)
>  {
>         dev->no_64bit_msi = true;
>  }
> -DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, 0x68f2, quirk_radeon_32bit_msi);
>  DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, 0xaa68, quirk_radeon_32bit_msi);
> diff --git a/drivers/gpu/drm/radeon/radeon_irq_kms.c b/drivers/gpu/drm/radeon/radeon_irq_kms.c
> index 16807af..e760671 100644
> --- a/drivers/gpu/drm/radeon/radeon_irq_kms.c
> +++ b/drivers/gpu/drm/radeon/radeon_irq_kms.c
> @@ -202,6 +202,16 @@ static bool radeon_msi_ok(struct radeon_device *rdev)
>         if (rdev->flags & RADEON_IS_AGP)
>                 return false;
>
> +       /*
> +        * Older chips have a HW limitation, they can only generate 40 bits
> +        * of address for "64-bit" MSIs which breaks on some platforms, notably
> +        * IBM POWER servers, so we limit them
> +        */
> +       if (rdev->family < CHIP_BONAIRE) {
> +               dev_info(rdev->dev, "radeon: MSI limited to 32-bit\n");
> +               rdev->pdev->no_64bit_msi = true;
> +       }
> +
>         /* force MSI on */
>         if (radeon_msi == 1)
>                 return true;
>
>

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

* Re: [PATCH v2 2/4] gpu/radeon: Move 64-bit MSI quirk from arch to driver
  2014-10-02  0:34 [PATCH v2 2/4] gpu/radeon: Move 64-bit MSI quirk from arch to driver Benjamin Herrenschmidt
  2014-10-02  1:52 ` Stephen Rothwell
@ 2014-10-02 15:34 ` Bjorn Helgaas
  2014-10-02 21:02   ` Benjamin Herrenschmidt
  1 sibling, 1 reply; 8+ messages in thread
From: Bjorn Helgaas @ 2014-10-02 15:34 UTC (permalink / raw)
  To: Benjamin Herrenschmidt
  Cc: linuxppc-dev, Dave Airlie, linux-pci, Anton Blanchard, Brian King,
	Yijing Wang, Takashi Iwai, Alex Deucher

On Thu, Oct 02, 2014 at 10:34:22AM +1000, Benjamin Herrenschmidt wrote:
> 
> A number of radeon cards have a HW limitation causing them to be
> unable to generate the full 64-bit of address bits for MSIs. This
> breaks MSIs on some platforms such as POWER machines.
> 
> We used to have a powerpc specific quirk to address that on a
> single card, but this doesn't scale very well, this is better
> put under control of the drivers who know precisely what a given
> HW revision can do.
> 
> This moves the setting of the quirk flag to the radeon driver
> 
> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> ---
> 
> v2: This is just adjusted to the new flag name

I'm sorta confused because I got two "v2 2/4" emails a minute or so apart.
I assume they're the same.

> 
>  arch/powerpc/kernel/pci_64.c            |  1 -
>  drivers/gpu/drm/radeon/radeon_irq_kms.c | 10 ++++++++++
>  2 files changed, 10 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/powerpc/kernel/pci_64.c b/arch/powerpc/kernel/pci_64.c
> index d41a831..5330f6d 100644
> --- a/arch/powerpc/kernel/pci_64.c
> +++ b/arch/powerpc/kernel/pci_64.c
> @@ -271,5 +271,4 @@ static void quirk_radeon_32bit_msi(struct pci_dev *dev)
>  {
>  	dev->no_64bit_msi = true;
>  }
> -DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, 0x68f2, quirk_radeon_32bit_msi);
>  DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, 0xaa68, quirk_radeon_32bit_msi);

Why do we keep the 0xaa68 quirk?  Shouldn't that be made generic, too?

> diff --git a/drivers/gpu/drm/radeon/radeon_irq_kms.c b/drivers/gpu/drm/radeon/radeon_irq_kms.c
> index 16807af..e760671 100644
> --- a/drivers/gpu/drm/radeon/radeon_irq_kms.c
> +++ b/drivers/gpu/drm/radeon/radeon_irq_kms.c
> @@ -202,6 +202,16 @@ static bool radeon_msi_ok(struct radeon_device *rdev)
>  	if (rdev->flags & RADEON_IS_AGP)
>  		return false;
>  
> +	/*
> +	 * Older chips have a HW limitation, they can only generate 40 bits
> +	 * of address for "64-bit" MSIs which breaks on some platforms, notably
> +	 * IBM POWER servers, so we limit them
> +	 */
> +	if (rdev->family < CHIP_BONAIRE) {
> +		dev_info(rdev->dev, "radeon: MSI limited to 32-bit\n");
> +		rdev->pdev->no_64bit_msi = true;
> +	}
> +
>  	/* force MSI on */
>  	if (radeon_msi == 1)
>  		return true;
> 
> 
> 

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

* Re: [PATCH v2 2/4] gpu/radeon: Move 64-bit MSI quirk from arch to driver
  2014-10-02 15:34 ` Bjorn Helgaas
@ 2014-10-02 21:02   ` Benjamin Herrenschmidt
  2014-10-02 21:44     ` Bjorn Helgaas
  0 siblings, 1 reply; 8+ messages in thread
From: Benjamin Herrenschmidt @ 2014-10-02 21:02 UTC (permalink / raw)
  To: Bjorn Helgaas
  Cc: linuxppc-dev, Dave Airlie, linux-pci, Anton Blanchard, Brian King,
	Yijing Wang, Takashi Iwai, Alex Deucher

On Thu, 2014-10-02 at 09:34 -0600, Bjorn Helgaas wrote:
> On Thu, Oct 02, 2014 at 10:34:22AM +1000, Benjamin Herrenschmidt wrote:
> > 
> > A number of radeon cards have a HW limitation causing them to be
> > unable to generate the full 64-bit of address bits for MSIs. This
> > breaks MSIs on some platforms such as POWER machines.
> > 
> > We used to have a powerpc specific quirk to address that on a
> > single card, but this doesn't scale very well, this is better
> > put under control of the drivers who know precisely what a given
> > HW revision can do.
> > 
> > This moves the setting of the quirk flag to the radeon driver
> > 
> > Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> > ---
> > 
> > v2: This is just adjusted to the new flag name
> 
> I'm sorta confused because I got two "v2 2/4" emails a minute or so apart.
> I assume they're the same.

Yes, evo blew up while sending the series the first time around :(
> > 
> >  arch/powerpc/kernel/pci_64.c            |  1 -
> >  drivers/gpu/drm/radeon/radeon_irq_kms.c | 10 ++++++++++
> >  2 files changed, 10 insertions(+), 1 deletion(-)
> > 
> > diff --git a/arch/powerpc/kernel/pci_64.c b/arch/powerpc/kernel/pci_64.c
> > index d41a831..5330f6d 100644
> > --- a/arch/powerpc/kernel/pci_64.c
> > +++ b/arch/powerpc/kernel/pci_64.c
> > @@ -271,5 +271,4 @@ static void quirk_radeon_32bit_msi(struct pci_dev *dev)
> >  {
> >  	dev->no_64bit_msi = true;
> >  }
> > -DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, 0x68f2, quirk_radeon_32bit_msi);
> >  DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, 0xaa68, quirk_radeon_32bit_msi);
> 
> Why do we keep the 0xaa68 quirk?  Shouldn't that be made generic, too?
> 
> > diff --git a/drivers/gpu/drm/radeon/radeon_irq_kms.c b/drivers/gpu/drm/radeon/radeon_irq_kms.c
> > index 16807af..e760671 100644
> > --- a/drivers/gpu/drm/radeon/radeon_irq_kms.c
> > +++ b/drivers/gpu/drm/radeon/radeon_irq_kms.c
> > @@ -202,6 +202,16 @@ static bool radeon_msi_ok(struct radeon_device *rdev)
> >  	if (rdev->flags & RADEON_IS_AGP)
> >  		return false;
> >  
> > +	/*
> > +	 * Older chips have a HW limitation, they can only generate 40 bits
> > +	 * of address for "64-bit" MSIs which breaks on some platforms, notably
> > +	 * IBM POWER servers, so we limit them
> > +	 */
> > +	if (rdev->family < CHIP_BONAIRE) {
> > +		dev_info(rdev->dev, "radeon: MSI limited to 32-bit\n");
> > +		rdev->pdev->no_64bit_msi = true;
> > +	}
> > +
> >  	/* force MSI on */
> >  	if (radeon_msi == 1)
> >  		return true;
> > 
> > 
> > 

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

* Re: [PATCH v2 2/4] gpu/radeon: Move 64-bit MSI quirk from arch to driver
  2014-10-02 21:02   ` Benjamin Herrenschmidt
@ 2014-10-02 21:44     ` Bjorn Helgaas
  2014-10-02 22:23       ` Benjamin Herrenschmidt
  0 siblings, 1 reply; 8+ messages in thread
From: Bjorn Helgaas @ 2014-10-02 21:44 UTC (permalink / raw)
  To: Benjamin Herrenschmidt
  Cc: linuxppc-dev, Dave Airlie, linux-pci@vger.kernel.org,
	Anton Blanchard, Brian King, Yijing Wang, Takashi Iwai,
	Alex Deucher

On Thu, Oct 2, 2014 at 3:02 PM, Benjamin Herrenschmidt
<benh@kernel.crashing.org> wrote:
> On Thu, 2014-10-02 at 09:34 -0600, Bjorn Helgaas wrote:
>> On Thu, Oct 02, 2014 at 10:34:22AM +1000, Benjamin Herrenschmidt wrote:
>> >
>> > A number of radeon cards have a HW limitation causing them to be
>> > unable to generate the full 64-bit of address bits for MSIs. This
>> > breaks MSIs on some platforms such as POWER machines.
>> >
>> > We used to have a powerpc specific quirk to address that on a
>> > single card, but this doesn't scale very well, this is better
>> > put under control of the drivers who know precisely what a given
>> > HW revision can do.
>> >
>> > This moves the setting of the quirk flag to the radeon driver
>> >
>> > Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
>> > ---
>> >
>> > v2: This is just adjusted to the new flag name
>>
>> I'm sorta confused because I got two "v2 2/4" emails a minute or so apart.
>> I assume they're the same.
>
> Yes, evo blew up while sending the series the first time around :(

No problem.  My real question is below, but you probably missed it
because of my email gripe :)

>> >  arch/powerpc/kernel/pci_64.c            |  1 -
>> >  drivers/gpu/drm/radeon/radeon_irq_kms.c | 10 ++++++++++
>> >  2 files changed, 10 insertions(+), 1 deletion(-)
>> >
>> > diff --git a/arch/powerpc/kernel/pci_64.c b/arch/powerpc/kernel/pci_64.c
>> > index d41a831..5330f6d 100644
>> > --- a/arch/powerpc/kernel/pci_64.c
>> > +++ b/arch/powerpc/kernel/pci_64.c
>> > @@ -271,5 +271,4 @@ static void quirk_radeon_32bit_msi(struct pci_dev *dev)
>> >  {
>> >     dev->no_64bit_msi = true;
>> >  }
>> > -DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, 0x68f2, quirk_radeon_32bit_msi);
>> >  DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, 0xaa68, quirk_radeon_32bit_msi);
>>
>> Why do we keep the 0xaa68 quirk?  Shouldn't that be made generic, too?
>>
>> > diff --git a/drivers/gpu/drm/radeon/radeon_irq_kms.c b/drivers/gpu/drm/radeon/radeon_irq_kms.c
>> > index 16807af..e760671 100644
>> > --- a/drivers/gpu/drm/radeon/radeon_irq_kms.c
>> > +++ b/drivers/gpu/drm/radeon/radeon_irq_kms.c
>> > @@ -202,6 +202,16 @@ static bool radeon_msi_ok(struct radeon_device *rdev)
>> >     if (rdev->flags & RADEON_IS_AGP)
>> >             return false;
>> >
>> > +   /*
>> > +    * Older chips have a HW limitation, they can only generate 40 bits
>> > +    * of address for "64-bit" MSIs which breaks on some platforms, notably
>> > +    * IBM POWER servers, so we limit them
>> > +    */
>> > +   if (rdev->family < CHIP_BONAIRE) {
>> > +           dev_info(rdev->dev, "radeon: MSI limited to 32-bit\n");
>> > +           rdev->pdev->no_64bit_msi = true;
>> > +   }
>> > +
>> >     /* force MSI on */
>> >     if (radeon_msi == 1)
>> >             return true;
>> >
>> >
>> >
>
>

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

* Re: [PATCH v2 2/4] gpu/radeon: Move 64-bit MSI quirk from arch to driver
  2014-10-02 21:44     ` Bjorn Helgaas
@ 2014-10-02 22:23       ` Benjamin Herrenschmidt
  0 siblings, 0 replies; 8+ messages in thread
From: Benjamin Herrenschmidt @ 2014-10-02 22:23 UTC (permalink / raw)
  To: Bjorn Helgaas
  Cc: linuxppc-dev, Dave Airlie, linux-pci@vger.kernel.org,
	Anton Blanchard, Brian King, Yijing Wang, Takashi Iwai,
	Alex Deucher

On Thu, 2014-10-02 at 15:44 -0600, Bjorn Helgaas wrote:
> On Thu, Oct 2, 2014 at 3:02 PM, Benjamin Herrenschmidt
> <benh@kernel.crashing.org> wrote:
> > On Thu, 2014-10-02 at 09:34 -0600, Bjorn Helgaas wrote:
> >> On Thu, Oct 02, 2014 at 10:34:22AM +1000, Benjamin Herrenschmidt wrote:
> >> >
> >> > A number of radeon cards have a HW limitation causing them to be
> >> > unable to generate the full 64-bit of address bits for MSIs. This
> >> > breaks MSIs on some platforms such as POWER machines.
> >> >
> >> > We used to have a powerpc specific quirk to address that on a
> >> > single card, but this doesn't scale very well, this is better
> >> > put under control of the drivers who know precisely what a given
> >> > HW revision can do.
> >> >
> >> > This moves the setting of the quirk flag to the radeon driver
> >> >
> >> > Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> >> > ---
> >> >
> >> > v2: This is just adjusted to the new flag name
> >>
> >> I'm sorta confused because I got two "v2 2/4" emails a minute or so apart.
> >> I assume they're the same.
> >
> > Yes, evo blew up while sending the series the first time around :(
> 
> No problem.  My real question is below, but you probably missed it
> because of my email gripe :)

Heh ok :-)

> >> >  arch/powerpc/kernel/pci_64.c            |  1 -
> >> >  drivers/gpu/drm/radeon/radeon_irq_kms.c | 10 ++++++++++
> >> >  2 files changed, 10 insertions(+), 1 deletion(-)
> >> >
> >> > diff --git a/arch/powerpc/kernel/pci_64.c b/arch/powerpc/kernel/pci_64.c
> >> > index d41a831..5330f6d 100644
> >> > --- a/arch/powerpc/kernel/pci_64.c
> >> > +++ b/arch/powerpc/kernel/pci_64.c
> >> > @@ -271,5 +271,4 @@ static void quirk_radeon_32bit_msi(struct pci_dev *dev)
> >> >  {
> >> >     dev->no_64bit_msi = true;
> >> >  }
> >> > -DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, 0x68f2, quirk_radeon_32bit_msi);
> >> >  DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, 0xaa68, quirk_radeon_32bit_msi);
> >>
> >> Why do we keep the 0xaa68 quirk?  Shouldn't that be made generic, too?

aa68 is the audio part, it's removed by the audio driver patch.

But I can break things down into smaller bits as you suggested. I'll try
to get that sorted later today.

Cheers,
Ben.

> >> > diff --git a/drivers/gpu/drm/radeon/radeon_irq_kms.c b/drivers/gpu/drm/radeon/radeon_irq_kms.c
> >> > index 16807af..e760671 100644
> >> > --- a/drivers/gpu/drm/radeon/radeon_irq_kms.c
> >> > +++ b/drivers/gpu/drm/radeon/radeon_irq_kms.c
> >> > @@ -202,6 +202,16 @@ static bool radeon_msi_ok(struct radeon_device *rdev)
> >> >     if (rdev->flags & RADEON_IS_AGP)
> >> >             return false;
> >> >
> >> > +   /*
> >> > +    * Older chips have a HW limitation, they can only generate 40 bits
> >> > +    * of address for "64-bit" MSIs which breaks on some platforms, notably
> >> > +    * IBM POWER servers, so we limit them
> >> > +    */
> >> > +   if (rdev->family < CHIP_BONAIRE) {
> >> > +           dev_info(rdev->dev, "radeon: MSI limited to 32-bit\n");
> >> > +           rdev->pdev->no_64bit_msi = true;
> >> > +   }
> >> > +
> >> >     /* force MSI on */
> >> >     if (radeon_msi == 1)
> >> >             return true;
> >> >
> >> >
> >> >
> >
> >

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

end of thread, other threads:[~2014-10-02 22:23 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-02  0:34 [PATCH v2 2/4] gpu/radeon: Move 64-bit MSI quirk from arch to driver Benjamin Herrenschmidt
2014-10-02  1:52 ` Stephen Rothwell
2014-10-02 15:34 ` Bjorn Helgaas
2014-10-02 21:02   ` Benjamin Herrenschmidt
2014-10-02 21:44     ` Bjorn Helgaas
2014-10-02 22:23       ` Benjamin Herrenschmidt
  -- strict thread matches above, loose matches on Subject: below --
2014-10-02  0:33 Benjamin Herrenschmidt
2014-10-02  2:18 ` Alex Deucher

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).