search for: pm_cap

Displaying 20 results from an estimated 41 matches for "pm_cap".

2020 Mar 21
3
[PATCH v7] pci: prevent putting nvidia GPUs into lower device states on certain intel bridges
...ots of mailing > list discussion. Can you include links to some of that? > > IIUC this basically just turns off PCI power management for the GPU. > Can you do that with something like the following? I don't know > anything about DRM, so I don't know where you could save the pm_cap, > but I'm sure the driver could keep it somewhere. > Sure this would work? From a quick look over the pci code, it looks like a of code would be skipped we really need, like the platform code to turn off the GPU via ACPI. But I could also remember incorrectly on how all of that worked a...
2020 Mar 10
2
[PATCH v7] pci: prevent putting nvidia GPUs into lower device states on certain intel bridges
...r management can be disabled for certain devices as they don't + * come back up later on runtime_resume. We rely on platform means to + * cut power consumption instead (e.g. ACPI). + */ + if (state != PCI_D0 && dev->parent_d3cold) + return 0; + pci_read_config_word(dev, dev->pm_cap + PCI_PM_CTRL, &pmcsr); if (pmcsr == (u16) ~0) { pci_err(dev, "can't change power state from %s to %s (config space inaccessible)\n", diff --git a/include/linux/pci.h b/include/linux/pci.h index 3840a541a9de..3c01f043519a 100644 --- a/include/linux/pci.h +++ b/include/linux/p...
2020 Mar 20
0
[PATCH v7] pci: prevent putting nvidia GPUs into lower device states on certain intel bridges
...The bugzilla mentions lots of mailing list discussion. Can you include links to some of that? IIUC this basically just turns off PCI power management for the GPU. Can you do that with something like the following? I don't know anything about DRM, so I don't know where you could save the pm_cap, but I'm sure the driver could keep it somewhere. diff --git a/drivers/gpu/drm/nouveau/nouveau_drm.c b/drivers/gpu/drm/nouveau/nouveau_drm.c index b65ae817eabf..2ad825e8891c 100644 --- a/drivers/gpu/drm/nouveau/nouveau_drm.c +++ b/drivers/gpu/drm/nouveau/nouveau_drm.c @@ -618,6 +618,23 @@ nou...
2020 Mar 24
0
[PATCH v7] pci: prevent putting nvidia GPUs into lower device states on certain intel bridges
...list discussion. Can you include links to some of that? > > > > IIUC this basically just turns off PCI power management for the GPU. > > Can you do that with something like the following? I don't know > > anything about DRM, so I don't know where you could save the pm_cap, > > but I'm sure the driver could keep it somewhere. > > > > Sure this would work? From a quick look over the pci code, it looks > like a of code would be skipped we really need, like the platform code > to turn off the GPU via ACPI. But I could also remember incorrectl...
2020 Jul 21
4
nouveau regression with 5.7 caused by "PCI/PM: Assume ports without DLL Link Active train links in 100 ms"
...ot one of them > locally at my apartment and don't mind setting up AMT/KVM/SSH Probably no need for remote access (thanks for the offer, though). I attached a test patch to the bug report: https://bugzilla.kernel.org/show_bug.cgi?id=208597 that tries to work it around (based on the ->pm_cap == 0). I wonder if anyone would have time to try it out.
2020 Mar 24
1
[PATCH v8] pci: prevent putting nvidia GPUs into lower device states on certain intel bridges
...d nvidia hardware v4: simplify quirk by setting flag on the GPU itself v5: restructure quirk to make it easier to add new IDs fix whitespace issues fix potential NULL pointer access update the quirk documentation v6: move quirk into nouveau v7: fix typos and commit message v8: reset the pm_cap field to get rid of changes in pci core (thanks to Bjorn for this idea) drivers/gpu/drm/nouveau/nouveau_drm.c | 63 +++++++++++++++++++++++++++ drivers/gpu/drm/nouveau/nouveau_drv.h | 2 + 2 files changed, 65 insertions(+) diff --git a/drivers/gpu/drm/nouveau/nouveau_drm.c b/drivers/gpu/drm...
2011 Feb 28
12
[RFC PATCH] set current_state to D0 in register_slot
Hi all, if a device doesn''t support power management (pm_cap == 0) but it is acpi_pci_power_manageable() because there is a _PS0 method declared for it and _EJ0 is also declared for the slot then nobody is going to set current_state = PCI_D0 for this device. This is what I think it is happening: pci_enable_device | __pci_enable_device_flags /* here we...
2020 Apr 15
2
[PATCH AUTOSEL 5.6 084/129] drm/nouveau: workaround runpm fail by disabling PCI power management on certain intel bridges
..._dev *pdev) +{ + struct drm_device *dev = pci_get_drvdata(pdev); + struct nouveau_drm *drm = nouveau_drm(dev); + struct pci_dev *bridge = pci_upstream_bridge(pdev); + + if (!bridge || bridge->vendor != PCI_VENDOR_ID_INTEL) + return; + + switch (bridge->device) { + case 0x1901: + drm->old_pm_cap = pdev->pm_cap; + pdev->pm_cap = 0; + NV_INFO(drm, "Disabling PCI power management to avoid bug\n"); + break; + } +} + static int nouveau_drm_probe(struct pci_dev *pdev, const struct pci_device_id *pent) { @@ -699,6 +757,7 @@ static int nouveau_drm_probe(struct pci_dev...
2020 Jul 23
2
nouveau regression with 5.7 caused by "PCI/PM: Assume ports without DLL Link Active train links in 100 ms"
...gt; > > Probably no need for remote access (thanks for the offer, though). I > > > attached a test patch to the bug report: > > > > > > https://bugzilla.kernel.org/show_bug.cgi?id=208597 > > > > > > that tries to work it around (based on the ->pm_cap == 0). I wonder if > > > anyone would have time to try it out. > > > > > > Hi Mika, > > > > I can confirm that this patch applied to 5.4.52 fixes the issue with > > hybrid graphics on the Thinkpad X1 Extreme gen2. > > Great, thanks for testing! &gt...
2020 Apr 22
0
[PATCH 5.4 076/118] drm/nouveau: workaround runpm fail by disabling PCI power management on certain intel bridges
..._dev *pdev) +{ + struct drm_device *dev = pci_get_drvdata(pdev); + struct nouveau_drm *drm = nouveau_drm(dev); + struct pci_dev *bridge = pci_upstream_bridge(pdev); + + if (!bridge || bridge->vendor != PCI_VENDOR_ID_INTEL) + return; + + switch (bridge->device) { + case 0x1901: + drm->old_pm_cap = pdev->pm_cap; + pdev->pm_cap = 0; + NV_INFO(drm, "Disabling PCI power management to avoid bug\n"); + break; + } +} + static int nouveau_drm_probe(struct pci_dev *pdev, const struct pci_device_id *pent) { @@ -699,6 +757,7 @@ static int nouveau_drm_probe(struct pci_dev...
2020 Apr 22
0
[PATCH 5.6 108/166] drm/nouveau: workaround runpm fail by disabling PCI power management on certain intel bridges
..._dev *pdev) +{ + struct drm_device *dev = pci_get_drvdata(pdev); + struct nouveau_drm *drm = nouveau_drm(dev); + struct pci_dev *bridge = pci_upstream_bridge(pdev); + + if (!bridge || bridge->vendor != PCI_VENDOR_ID_INTEL) + return; + + switch (bridge->device) { + case 0x1901: + drm->old_pm_cap = pdev->pm_cap; + pdev->pm_cap = 0; + NV_INFO(drm, "Disabling PCI power management to avoid bug\n"); + break; + } +} + static int nouveau_drm_probe(struct pci_dev *pdev, const struct pci_device_id *pent) { @@ -699,6 +757,7 @@ static int nouveau_drm_probe(struct pci_dev...
2020 Apr 15
0
[PATCH AUTOSEL 5.5 072/106] drm/nouveau: workaround runpm fail by disabling PCI power management on certain intel bridges
..._dev *pdev) +{ + struct drm_device *dev = pci_get_drvdata(pdev); + struct nouveau_drm *drm = nouveau_drm(dev); + struct pci_dev *bridge = pci_upstream_bridge(pdev); + + if (!bridge || bridge->vendor != PCI_VENDOR_ID_INTEL) + return; + + switch (bridge->device) { + case 0x1901: + drm->old_pm_cap = pdev->pm_cap; + pdev->pm_cap = 0; + NV_INFO(drm, "Disabling PCI power management to avoid bug\n"); + break; + } +} + static int nouveau_drm_probe(struct pci_dev *pdev, const struct pci_device_id *pent) { @@ -699,6 +757,7 @@ static int nouveau_drm_probe(struct pci_dev...
2020 Apr 15
0
[PATCH AUTOSEL 5.4 55/84] drm/nouveau: workaround runpm fail by disabling PCI power management on certain intel bridges
..._dev *pdev) +{ + struct drm_device *dev = pci_get_drvdata(pdev); + struct nouveau_drm *drm = nouveau_drm(dev); + struct pci_dev *bridge = pci_upstream_bridge(pdev); + + if (!bridge || bridge->vendor != PCI_VENDOR_ID_INTEL) + return; + + switch (bridge->device) { + case 0x1901: + drm->old_pm_cap = pdev->pm_cap; + pdev->pm_cap = 0; + NV_INFO(drm, "Disabling PCI power management to avoid bug\n"); + break; + } +} + static int nouveau_drm_probe(struct pci_dev *pdev, const struct pci_device_id *pent) { @@ -699,6 +757,7 @@ static int nouveau_drm_probe(struct pci_dev...
2020 Apr 18
0
[PATCH AUTOSEL 5.5 32/75] drm/nouveau: workaround runpm fail by disabling PCI power management on certain intel bridges
..._dev *pdev) +{ + struct drm_device *dev = pci_get_drvdata(pdev); + struct nouveau_drm *drm = nouveau_drm(dev); + struct pci_dev *bridge = pci_upstream_bridge(pdev); + + if (!bridge || bridge->vendor != PCI_VENDOR_ID_INTEL) + return; + + switch (bridge->device) { + case 0x1901: + drm->old_pm_cap = pdev->pm_cap; + pdev->pm_cap = 0; + NV_INFO(drm, "Disabling PCI power management to avoid bug\n"); + break; + } +} + static int nouveau_drm_probe(struct pci_dev *pdev, const struct pci_device_id *pent) { @@ -699,6 +757,7 @@ static int nouveau_drm_probe(struct pci_dev...
2020 Apr 18
0
[PATCH AUTOSEL 5.4 30/78] drm/nouveau: workaround runpm fail by disabling PCI power management on certain intel bridges
..._dev *pdev) +{ + struct drm_device *dev = pci_get_drvdata(pdev); + struct nouveau_drm *drm = nouveau_drm(dev); + struct pci_dev *bridge = pci_upstream_bridge(pdev); + + if (!bridge || bridge->vendor != PCI_VENDOR_ID_INTEL) + return; + + switch (bridge->device) { + case 0x1901: + drm->old_pm_cap = pdev->pm_cap; + pdev->pm_cap = 0; + NV_INFO(drm, "Disabling PCI power management to avoid bug\n"); + break; + } +} + static int nouveau_drm_probe(struct pci_dev *pdev, const struct pci_device_id *pent) { @@ -699,6 +757,7 @@ static int nouveau_drm_probe(struct pci_dev...
2020 Apr 18
0
[PATCH AUTOSEL 5.6 34/73] drm/nouveau: workaround runpm fail by disabling PCI power management on certain intel bridges
..._dev *pdev) +{ + struct drm_device *dev = pci_get_drvdata(pdev); + struct nouveau_drm *drm = nouveau_drm(dev); + struct pci_dev *bridge = pci_upstream_bridge(pdev); + + if (!bridge || bridge->vendor != PCI_VENDOR_ID_INTEL) + return; + + switch (bridge->device) { + case 0x1901: + drm->old_pm_cap = pdev->pm_cap; + pdev->pm_cap = 0; + NV_INFO(drm, "Disabling PCI power management to avoid bug\n"); + break; + } +} + static int nouveau_drm_probe(struct pci_dev *pdev, const struct pci_device_id *pent) { @@ -699,6 +757,7 @@ static int nouveau_drm_probe(struct pci_dev...
2020 Apr 15
0
[PATCH AUTOSEL 5.6 084/129] drm/nouveau: workaround runpm fail by disabling PCI power management on certain intel bridges
...= nouveau_drm(dev); > + struct pci_dev *bridge = pci_upstream_bridge(pdev); > + > + if (!bridge || bridge->vendor != PCI_VENDOR_ID_INTEL) > + return; > + > + switch (bridge->device) { > + case 0x1901: > + drm->old_pm_cap = pdev->pm_cap; > + pdev->pm_cap = 0; > + NV_INFO(drm, "Disabling PCI power management to avoid bug\n"); > + break; > + } > +} > + > static int nouveau_drm_probe(struct pci_dev *pdev, >...
2020 Jul 21
1
nouveau regression with 5.7 caused by "PCI/PM: Assume ports without DLL Link Active train links in 100 ms"
...at my apartment and don't mind setting up AMT/KVM/SSH > Probably no need for remote access (thanks for the offer, though). I > attached a test patch to the bug report: > > https://bugzilla.kernel.org/show_bug.cgi?id=208597 > > that tries to work it around (based on the ->pm_cap == 0). I wonder if > anyone would have time to try it out. Hi Mika, I can confirm that this patch applied to 5.4.52 fixes the issue with hybrid graphics on the Thinkpad X1 Extreme gen2. Thanks, Pat
2020 Jul 21
1
nouveau regression with 5.7 caused by "PCI/PM: Assume ports without DLL Link Active train links in 100 ms"
...up AMT/KVM/SSH > > > > Probably no need for remote access (thanks for the offer, though). I > > attached a test patch to the bug report: > > > > https://bugzilla.kernel.org/show_bug.cgi?id=208597 > > > > that tries to work it around (based on the ->pm_cap == 0). I wonder if > > anyone would have time to try it out. > > Will give it a shot today and let you know the result Ahh-actually, I thought the laptop I had locally could reproduce this bug but that doesn't appear to be the case whoops. Karol Herbst still has access to a machin...
2019 Oct 17
4
[PATCH v4] pci: prevent putting nvidia GPUs into lower device states on certain intel bridges
...&& !dev->d2_support)) return -EIO; + /* + * check if we have a bad combination of bridge controller and nvidia + * GPU, see quirk_broken_nv_runpm for more info + */ + if (state != PCI_D0 && dev->broken_nv_runpm) + return 0; + pci_read_config_word(dev, dev->pm_cap + PCI_PM_CTRL, &pmcsr); /* diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c index 44c4ae1abd00..0006c9e37b6f 100644 --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c @@ -5268,3 +5268,56 @@ static void quirk_reset_lenovo_thinkpad_p50_nvgpu(struct pci_dev *pdev) DECLARE_PCI_FIXUP...