All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xhci-pci: Allow host runtime PM as default for Intel Maple Ridge xHCI
@ 2020-11-05 11:00 Mika Westerberg
  2020-11-05 11:37 ` Felipe Balbi
  0 siblings, 1 reply; 4+ messages in thread
From: Mika Westerberg @ 2020-11-05 11:00 UTC (permalink / raw)
  To: Mathias Nyman; +Cc: Greg Kroah-Hartman, Mika Westerberg, linux-usb

Intel Maple Ridge is successor of Titan Ridge Thunderbolt controller. As
Titan Ridge this one also includes xHCI host controller. In order to
safe energy we should put it to low power state by default when idle.
For this reason allow host runtime PM for Maple Ridge.

Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
---
 drivers/usb/host/xhci-pci.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c
index bf89172c43ca..d17e463087df 100644
--- a/drivers/usb/host/xhci-pci.c
+++ b/drivers/usb/host/xhci-pci.c
@@ -55,6 +55,7 @@
 #define PCI_DEVICE_ID_INTEL_ICE_LAKE_XHCI		0x8a13
 #define PCI_DEVICE_ID_INTEL_CML_XHCI			0xa3af
 #define PCI_DEVICE_ID_INTEL_TIGER_LAKE_XHCI		0x9a13
+#define PCI_DEVICE_ID_INTEL_MAPLE_RIDGE_XHCI		0x1138
 
 #define PCI_DEVICE_ID_AMD_PROMONTORYA_4			0x43b9
 #define PCI_DEVICE_ID_AMD_PROMONTORYA_3			0x43ba
@@ -238,7 +239,8 @@ static void xhci_pci_quirks(struct device *dev, struct xhci_hcd *xhci)
 	     pdev->device == PCI_DEVICE_ID_INTEL_TITAN_RIDGE_4C_XHCI ||
 	     pdev->device == PCI_DEVICE_ID_INTEL_TITAN_RIDGE_DD_XHCI ||
 	     pdev->device == PCI_DEVICE_ID_INTEL_ICE_LAKE_XHCI ||
-	     pdev->device == PCI_DEVICE_ID_INTEL_TIGER_LAKE_XHCI))
+	     pdev->device == PCI_DEVICE_ID_INTEL_TIGER_LAKE_XHCI ||
+	     pdev->device == PCI_DEVICE_ID_INTEL_MAPLE_RIDGE_XHCI))
 		xhci->quirks |= XHCI_DEFAULT_PM_RUNTIME_ALLOW;
 
 	if (pdev->vendor == PCI_VENDOR_ID_ETRON &&
-- 
2.28.0


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

* Re: [PATCH] xhci-pci: Allow host runtime PM as default for Intel Maple Ridge xHCI
  2020-11-05 11:00 [PATCH] xhci-pci: Allow host runtime PM as default for Intel Maple Ridge xHCI Mika Westerberg
@ 2020-11-05 11:37 ` Felipe Balbi
  2020-11-05 11:50   ` Mika Westerberg
  0 siblings, 1 reply; 4+ messages in thread
From: Felipe Balbi @ 2020-11-05 11:37 UTC (permalink / raw)
  To: Mika Westerberg, Mathias Nyman
  Cc: Greg Kroah-Hartman, Mika Westerberg, linux-usb


Hi,

Mika Westerberg <mika.westerberg@linux.intel.com> writes:
> Intel Maple Ridge is successor of Titan Ridge Thunderbolt controller. As
> Titan Ridge this one also includes xHCI host controller. In order to
> safe energy we should put it to low power state by default when idle.
  ^^^^
  save

> For this reason allow host runtime PM for Maple Ridge.
>
> Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
> ---
>  drivers/usb/host/xhci-pci.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c
> index bf89172c43ca..d17e463087df 100644
> --- a/drivers/usb/host/xhci-pci.c
> +++ b/drivers/usb/host/xhci-pci.c
> @@ -55,6 +55,7 @@
>  #define PCI_DEVICE_ID_INTEL_ICE_LAKE_XHCI		0x8a13
>  #define PCI_DEVICE_ID_INTEL_CML_XHCI			0xa3af
>  #define PCI_DEVICE_ID_INTEL_TIGER_LAKE_XHCI		0x9a13
> +#define PCI_DEVICE_ID_INTEL_MAPLE_RIDGE_XHCI		0x1138
>  
>  #define PCI_DEVICE_ID_AMD_PROMONTORYA_4			0x43b9
>  #define PCI_DEVICE_ID_AMD_PROMONTORYA_3			0x43ba
> @@ -238,7 +239,8 @@ static void xhci_pci_quirks(struct device *dev, struct xhci_hcd *xhci)
>  	     pdev->device == PCI_DEVICE_ID_INTEL_TITAN_RIDGE_4C_XHCI ||
>  	     pdev->device == PCI_DEVICE_ID_INTEL_TITAN_RIDGE_DD_XHCI ||
>  	     pdev->device == PCI_DEVICE_ID_INTEL_ICE_LAKE_XHCI ||
> -	     pdev->device == PCI_DEVICE_ID_INTEL_TIGER_LAKE_XHCI))
> +	     pdev->device == PCI_DEVICE_ID_INTEL_TIGER_LAKE_XHCI ||
> +	     pdev->device == PCI_DEVICE_ID_INTEL_MAPLE_RIDGE_XHCI))
>  		xhci->quirks |= XHCI_DEFAULT_PM_RUNTIME_ALLOW;

the ever growing list of quirks to *allow* PM :-) Perhaps the logic
should be inverted here and call a quirk to something that *can't*
handle PM?

-- 
balbi

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

* Re: [PATCH] xhci-pci: Allow host runtime PM as default for Intel Maple Ridge xHCI
  2020-11-05 11:37 ` Felipe Balbi
@ 2020-11-05 11:50   ` Mika Westerberg
  2020-11-05 11:57     ` Mathias Nyman
  0 siblings, 1 reply; 4+ messages in thread
From: Mika Westerberg @ 2020-11-05 11:50 UTC (permalink / raw)
  To: Felipe Balbi; +Cc: Mathias Nyman, Greg Kroah-Hartman, linux-usb

On Thu, Nov 05, 2020 at 01:37:10PM +0200, Felipe Balbi wrote:
> 
> Hi,
> 
> Mika Westerberg <mika.westerberg@linux.intel.com> writes:
> > Intel Maple Ridge is successor of Titan Ridge Thunderbolt controller. As
> > Titan Ridge this one also includes xHCI host controller. In order to
> > safe energy we should put it to low power state by default when idle.
>   ^^^^
>   save

Indeed, thanks.

> > For this reason allow host runtime PM for Maple Ridge.
> >
> > Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
> > ---
> >  drivers/usb/host/xhci-pci.c | 4 +++-
> >  1 file changed, 3 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c
> > index bf89172c43ca..d17e463087df 100644
> > --- a/drivers/usb/host/xhci-pci.c
> > +++ b/drivers/usb/host/xhci-pci.c
> > @@ -55,6 +55,7 @@
> >  #define PCI_DEVICE_ID_INTEL_ICE_LAKE_XHCI		0x8a13
> >  #define PCI_DEVICE_ID_INTEL_CML_XHCI			0xa3af
> >  #define PCI_DEVICE_ID_INTEL_TIGER_LAKE_XHCI		0x9a13
> > +#define PCI_DEVICE_ID_INTEL_MAPLE_RIDGE_XHCI		0x1138
> >  
> >  #define PCI_DEVICE_ID_AMD_PROMONTORYA_4			0x43b9
> >  #define PCI_DEVICE_ID_AMD_PROMONTORYA_3			0x43ba
> > @@ -238,7 +239,8 @@ static void xhci_pci_quirks(struct device *dev, struct xhci_hcd *xhci)
> >  	     pdev->device == PCI_DEVICE_ID_INTEL_TITAN_RIDGE_4C_XHCI ||
> >  	     pdev->device == PCI_DEVICE_ID_INTEL_TITAN_RIDGE_DD_XHCI ||
> >  	     pdev->device == PCI_DEVICE_ID_INTEL_ICE_LAKE_XHCI ||
> > -	     pdev->device == PCI_DEVICE_ID_INTEL_TIGER_LAKE_XHCI))
> > +	     pdev->device == PCI_DEVICE_ID_INTEL_TIGER_LAKE_XHCI ||
> > +	     pdev->device == PCI_DEVICE_ID_INTEL_MAPLE_RIDGE_XHCI))
> >  		xhci->quirks |= XHCI_DEFAULT_PM_RUNTIME_ALLOW;
> 
> the ever growing list of quirks to *allow* PM :-) Perhaps the logic
> should be inverted here and call a quirk to something that *can't*
> handle PM?

I'm not a xHCI expert but I would expect that list to be even longer ;-)

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

* Re: [PATCH] xhci-pci: Allow host runtime PM as default for Intel Maple Ridge xHCI
  2020-11-05 11:50   ` Mika Westerberg
@ 2020-11-05 11:57     ` Mathias Nyman
  0 siblings, 0 replies; 4+ messages in thread
From: Mathias Nyman @ 2020-11-05 11:57 UTC (permalink / raw)
  To: Mika Westerberg, Felipe Balbi
  Cc: Mathias Nyman, Greg Kroah-Hartman, linux-usb

On 5.11.2020 13.50, Mika Westerberg wrote:
> On Thu, Nov 05, 2020 at 01:37:10PM +0200, Felipe Balbi wrote:
>>
>> Hi,
>>
>> Mika Westerberg <mika.westerberg@linux.intel.com> writes:
>>> Intel Maple Ridge is successor of Titan Ridge Thunderbolt controller. As
>>> Titan Ridge this one also includes xHCI host controller. In order to
>>> safe energy we should put it to low power state by default when idle.
>>   ^^^^
>>   save

I'll fix that while applying

> 
> Indeed, thanks.
> 
>>> For this reason allow host runtime PM for Maple Ridge.
>>>
>>> Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
>>> ---
>>>  drivers/usb/host/xhci-pci.c | 4 +++-
>>>  1 file changed, 3 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c
>>> index bf89172c43ca..d17e463087df 100644
>>> --- a/drivers/usb/host/xhci-pci.c
>>> +++ b/drivers/usb/host/xhci-pci.c
>>> @@ -55,6 +55,7 @@
>>>  #define PCI_DEVICE_ID_INTEL_ICE_LAKE_XHCI		0x8a13
>>>  #define PCI_DEVICE_ID_INTEL_CML_XHCI			0xa3af
>>>  #define PCI_DEVICE_ID_INTEL_TIGER_LAKE_XHCI		0x9a13
>>> +#define PCI_DEVICE_ID_INTEL_MAPLE_RIDGE_XHCI		0x1138
>>>  
>>>  #define PCI_DEVICE_ID_AMD_PROMONTORYA_4			0x43b9
>>>  #define PCI_DEVICE_ID_AMD_PROMONTORYA_3			0x43ba
>>> @@ -238,7 +239,8 @@ static void xhci_pci_quirks(struct device *dev, struct xhci_hcd *xhci)
>>>  	     pdev->device == PCI_DEVICE_ID_INTEL_TITAN_RIDGE_4C_XHCI ||
>>>  	     pdev->device == PCI_DEVICE_ID_INTEL_TITAN_RIDGE_DD_XHCI ||
>>>  	     pdev->device == PCI_DEVICE_ID_INTEL_ICE_LAKE_XHCI ||
>>> -	     pdev->device == PCI_DEVICE_ID_INTEL_TIGER_LAKE_XHCI))
>>> +	     pdev->device == PCI_DEVICE_ID_INTEL_TIGER_LAKE_XHCI ||
>>> +	     pdev->device == PCI_DEVICE_ID_INTEL_MAPLE_RIDGE_XHCI))
>>>  		xhci->quirks |= XHCI_DEFAULT_PM_RUNTIME_ALLOW;
>>
>> the ever growing list of quirks to *allow* PM :-) Perhaps the logic
>> should be inverted here and call a quirk to something that *can't*
>> handle PM?
> 
> I'm not a xHCI expert but I would expect that list to be even longer ;-)
> 

Yes, in the long run either way isn't really an optimal solution, but for now, until we
figure out a better way this will have to do.

-Mathias

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

end of thread, other threads:[~2020-11-05 11:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-05 11:00 [PATCH] xhci-pci: Allow host runtime PM as default for Intel Maple Ridge xHCI Mika Westerberg
2020-11-05 11:37 ` Felipe Balbi
2020-11-05 11:50   ` Mika Westerberg
2020-11-05 11:57     ` Mathias Nyman

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.