search for: drm_switch_power_dynamic_off

Displaying 20 results from an estimated 23 matches for "drm_switch_power_dynamic_off".

2016 Nov 08
2
[PATCH] drm/nouveau: Drop superfluous DRM_SWITCH_POWER_DYNAMIC_OFF checks
nouveau's ->suspend and ->resume callbacks are currently skipped if the device's status is either DRM_SWITCH_POWER_OFF (powered off by vga_switcheroo manual power control) or DRM_SWITCH_POWER_DYNAMIC_OFF (runtime suspended). In the former case this makes sense since the device is powered off behind the PM core's back: It will try to execute the ->suspend and ->resume callbacks upon system sleep, not knowing that the device is inaccessible. Therefore the callbacks have to become no-ops....
2016 Dec 14
1
[PATCH] drm/nouveau: Drop superfluous DRM_SWITCH_POWER_DYNAMIC_OFF checks
...ter Wu wrote: > On Tue, Nov 08, 2016 at 12:57:00PM +0100, Lukas Wunner wrote: > > nouveau's ->suspend and ->resume callbacks are currently skipped if the > > device's status is either DRM_SWITCH_POWER_OFF (powered off by > > vga_switcheroo manual power control) or DRM_SWITCH_POWER_DYNAMIC_OFF > > (runtime suspended). > > > > In the former case this makes sense since the device is powered off > > behind the PM core's back: It will try to execute the ->suspend and > > ->resume callbacks upon system sleep, not knowing that the device is > > i...
2016 Nov 08
0
[PATCH] drm/nouveau: Drop superfluous DRM_SWITCH_POWER_DYNAMIC_OFF checks
On Tue, Nov 08, 2016 at 12:57:00PM +0100, Lukas Wunner wrote: > nouveau's ->suspend and ->resume callbacks are currently skipped if the > device's status is either DRM_SWITCH_POWER_OFF (powered off by > vga_switcheroo manual power control) or DRM_SWITCH_POWER_DYNAMIC_OFF > (runtime suspended). > > In the former case this makes sense since the device is powered off > behind the PM core's back: It will try to execute the ->suspend and > ->resume callbacks upon system sleep, not knowing that the device is > inaccessible. Therefore the ca...
2019 Nov 20
2
[PATCH v4] pci: prevent putting nvidia GPUs into lower device states on certain intel bridges
...urn -EBUSY; } nouveau_switcheroo_optimus_dsm(); ret = nouveau_do_suspend(drm_dev, true); pci_save_state(pdev); pci_disable_device(pdev); pci_ignore_hotplug(pdev); pci_set_power_state(pdev, PCI_D3cold); drm_dev->switch_power_state = DRM_SWITCH_POWER_DYNAMIC_OFF; return ret; } Normally PCI drivers leave the PCI bus PM things to PCI core but here the driver does these. So I wonder if it makes any difference if we let the core handle all that: static int nouveau_pmops_runtime_suspend(struct device *dev) { struct pci_dev *pdev = to_pc...
2019 Nov 20
0
[PATCH v4] pci: prevent putting nvidia GPUs into lower device states on certain intel bridges
...nouveau_switcheroo_optimus_dsm(); > ret = nouveau_do_suspend(drm_dev, true); > pci_save_state(pdev); > pci_disable_device(pdev); > pci_ignore_hotplug(pdev); > pci_set_power_state(pdev, PCI_D3cold); > drm_dev->switch_power_state = DRM_SWITCH_POWER_DYNAMIC_OFF; > return ret; > } > > Normally PCI drivers leave the PCI bus PM things to PCI core but here > the driver does these. So I wonder if it makes any difference if we let > the core handle all that: > > static int > nouveau_pmops_runtime_suspend(struct device *dev) &g...
2019 Nov 20
1
[PATCH v4] pci: prevent putting nvidia GPUs into lower device states on certain intel bridges
On Wed, Nov 20, 2019 at 12:58:00PM +0100, Karol Herbst wrote: > overall, what I really want to know is, _why_ does it work on windows? So do I ;-) > Or what are we doing differently on Linux so that it doesn't work? If > anybody has any idea on how we could dig into this and figure it out > on this level, this would probably allow us to get closer to the root > cause? no?
2019 May 07
2
[PATCH 1/5] drm: don't set the pci power state if the pci subsystem handles the ACPI bits
...nouveau_do_suspend(drm_dev, true); > pci_save_state(pdev); > pci_disable_device(pdev); > pci_ignore_hotplug(pdev); > - pci_set_power_state(pdev, PCI_D3cold); > + if (drm->runpm_dsm) > + pci_set_power_state(pdev, PCI_D3cold); > + > drm_dev->switch_power_state = DRM_SWITCH_POWER_DYNAMIC_OFF; > return ret; > } > @@ -925,7 +929,8 @@ nouveau_pmops_runtime_resume(struct device *dev) > { > struct pci_dev *pdev = to_pci_dev(dev); > struct drm_device *drm_dev = pci_get_drvdata(pdev); > - struct nvif_device *device = &nouveau_drm(drm_dev)->client.device; &g...
2018 Nov 24
1
[PATCH 2/2] drm/nouveau: Grab an rpm reference before/after DP AUX transactions
...gt; ret = nouveau_do_suspend(drm_dev, true); > pci_save_state(pdev); > @@ -873,6 +876,8 @@ nouveau_pmops_runtime_suspend(struct device *dev) > pci_ignore_hotplug(pdev); > pci_set_power_state(pdev, PCI_D3cold); > drm_dev->switch_power_state = DRM_SWITCH_POWER_DYNAMIC_OFF; > + > + drm->rpm_task = NULL; > return ret; > } > > @@ -881,6 +886,7 @@ nouveau_pmops_runtime_resume(struct device *dev) > { > struct pci_dev *pdev = to_pci_dev(dev); > struct drm_device *drm_dev = pci_get_drvdata(pdev); > + st...
2018 Jul 16
0
[PATCH 1/5] drm/nouveau: Prevent RPM callback recursion in suspend/resume paths
...h++; + drm_kms_helper_poll_disable(drm_dev); nouveau_switcheroo_optimus_dsm(); ret = nouveau_do_suspend(drm_dev, true); @@ -843,6 +845,8 @@ nouveau_pmops_runtime_suspend(struct device *dev) pci_ignore_hotplug(pdev); pci_set_power_state(pdev, PCI_D3cold); drm_dev->switch_power_state = DRM_SWITCH_POWER_DYNAMIC_OFF; + + dev->power.disable_depth--; return ret; } @@ -859,11 +863,13 @@ nouveau_pmops_runtime_resume(struct device *dev) return -EBUSY; } + dev->power.disable_depth++; + pci_set_power_state(pdev, PCI_D0); pci_restore_state(pdev); ret = pci_enable_device(pdev); if (ret) - ret...
2013 Oct 08
1
[PATCH] drm/nouveau: suspend to D3hot, not to D3cold
...nouveau_drm.c @@ -945,7 +945,7 @@ static int nouveau_pmops_runtime_suspend(struct device *dev) ret = nouveau_do_suspend(drm_dev); pci_save_state(pdev); pci_disable_device(pdev); - pci_set_power_state(pdev, PCI_D3cold); + pci_set_power_state(pdev, PCI_D3hot); drm_dev->switch_power_state = DRM_SWITCH_POWER_DYNAMIC_OFF; return ret; }
2019 May 04
0
[PATCH 1/5] drm: don't set the pci power state if the pci subsystem handles the ACPI bits
...uveau_switcheroo_optimus_dsm(); ret = nouveau_do_suspend(drm_dev, true); pci_save_state(pdev); pci_disable_device(pdev); pci_ignore_hotplug(pdev); - pci_set_power_state(pdev, PCI_D3cold); + if (drm->runpm_dsm) + pci_set_power_state(pdev, PCI_D3cold); + drm_dev->switch_power_state = DRM_SWITCH_POWER_DYNAMIC_OFF; return ret; } @@ -925,7 +929,8 @@ nouveau_pmops_runtime_resume(struct device *dev) { struct pci_dev *pdev = to_pci_dev(dev); struct drm_device *drm_dev = pci_get_drvdata(pdev); - struct nvif_device *device = &nouveau_drm(drm_dev)->client.device; + struct nouveau_drm *drm = nouveau_d...
2019 May 07
0
[PATCH v2 1/4] drm: don't set the pci power state if the pci subsystem handles the ACPI bits
...uveau_switcheroo_optimus_dsm(); ret = nouveau_do_suspend(drm_dev, true); pci_save_state(pdev); pci_disable_device(pdev); pci_ignore_hotplug(pdev); - pci_set_power_state(pdev, PCI_D3cold); + if (drm->runpm_dsm) + pci_set_power_state(pdev, PCI_D3cold); + drm_dev->switch_power_state = DRM_SWITCH_POWER_DYNAMIC_OFF; return ret; } @@ -925,7 +930,8 @@ nouveau_pmops_runtime_resume(struct device *dev) { struct pci_dev *pdev = to_pci_dev(dev); struct drm_device *drm_dev = pci_get_drvdata(pdev); - struct nvif_device *device = &nouveau_drm(drm_dev)->client.device; + struct nouveau_drm *drm = nouveau_d...
2019 Jun 14
0
[PATCH] drm: don't set the pci power state if the pci subsystem handles the ACPI bits
...uveau_switcheroo_optimus_dsm(); ret = nouveau_do_suspend(drm_dev, true); pci_save_state(pdev); pci_disable_device(pdev); pci_ignore_hotplug(pdev); - pci_set_power_state(pdev, PCI_D3cold); + if (drm->runpm_dsm) + pci_set_power_state(pdev, PCI_D3cold); + drm_dev->switch_power_state = DRM_SWITCH_POWER_DYNAMIC_OFF; return ret; } @@ -941,7 +946,9 @@ nouveau_pmops_runtime_resume(struct device *dev) return -EBUSY; } - pci_set_power_state(pdev, PCI_D0); + drm_dev->switch_power_state = DRM_SWITCH_POWER_CHANGING; + if (drm->runpm_dsm) + pci_set_power_state(pdev, PCI_D0); pci_restore_state(pdev);...
2018 Nov 17
3
[PATCH 0/2] drm/nouveau: Fix DP AUX RPM issues
Here's some fixes for the less important DP AUX issues I mentioned a while back. Lyude Paul (2): drm/dp: Add ->pre/post_transfer() hooks for drm_dp_aux drm/nouveau: Grab an rpm reference before/after DP AUX transactions drivers/gpu/drm/drm_dp_helper.c | 5 ++ drivers/gpu/drm/nouveau/nouveau_connector.c | 36 ++++++++ drivers/gpu/drm/nouveau/nouveau_drm.c | 12 ++-
2019 Jun 18
0
[PATCH v3] drm: don't set the pci power state if the pci subsystem handles the ACPI bits
...uveau_switcheroo_optimus_dsm(); ret = nouveau_do_suspend(drm_dev, true); pci_save_state(pdev); pci_disable_device(pdev); pci_ignore_hotplug(pdev); - pci_set_power_state(pdev, PCI_D3cold); + if (drm->runpm_dsm) + pci_set_power_state(pdev, PCI_D3cold); + drm_dev->switch_power_state = DRM_SWITCH_POWER_DYNAMIC_OFF; return ret; } @@ -941,7 +946,9 @@ nouveau_pmops_runtime_resume(struct device *dev) return -EBUSY; } - pci_set_power_state(pdev, PCI_D0); + drm_dev->switch_power_state = DRM_SWITCH_POWER_CHANGING; + if (drm->runpm_dsm) + pci_set_power_state(pdev, PCI_D0); pci_restore_state(pdev);...
2019 May 07
0
[PATCH 1/5] drm: don't set the pci power state if the pci subsystem handles the ACPI bits
...t; > pci_disable_device(pdev); > > pci_ignore_hotplug(pdev); > > - pci_set_power_state(pdev, PCI_D3cold); > > + if (drm->runpm_dsm) > > + pci_set_power_state(pdev, PCI_D3cold); > > + > > drm_dev->switch_power_state = DRM_SWITCH_POWER_DYNAMIC_OFF; > > return ret; > > } > > @@ -925,7 +929,8 @@ nouveau_pmops_runtime_resume(struct device *dev) > > { > > struct pci_dev *pdev = to_pci_dev(dev); > > struct drm_device *drm_dev = pci_get_drvdata(pdev); > > - struct nvif_device *devic...
2018 Nov 17
0
[PATCH 2/2] drm/nouveau: Grab an rpm reference before/after DP AUX transactions
...;rpm_task = current; + nouveau_switcheroo_optimus_dsm(); ret = nouveau_do_suspend(drm_dev, true); pci_save_state(pdev); @@ -873,6 +876,8 @@ nouveau_pmops_runtime_suspend(struct device *dev) pci_ignore_hotplug(pdev); pci_set_power_state(pdev, PCI_D3cold); drm_dev->switch_power_state = DRM_SWITCH_POWER_DYNAMIC_OFF; + + drm->rpm_task = NULL; return ret; } @@ -881,6 +886,7 @@ nouveau_pmops_runtime_resume(struct device *dev) { struct pci_dev *pdev = to_pci_dev(dev); struct drm_device *drm_dev = pci_get_drvdata(pdev); + struct nouveau_drm *drm = nouveau_drm(drm_dev); struct nvif_device *device = &...
2017 Nov 21
2
[PATCH v2] drm: don't continue with anything after the GPU couldn't be woken up
...return -EBUSY; + } + pci_restore_state(pdev); + ret = pci_enable_device(pdev); + if (ret) + return ret; + + pci_set_master(pdev); + return 0; +} + int nouveau_pmops_resume(struct device *dev) { @@ -803,12 +824,9 @@ nouveau_pmops_resume(struct device *dev) drm_dev->switch_power_state == DRM_SWITCH_POWER_DYNAMIC_OFF) return 0; - pci_set_power_state(pdev, PCI_D0); - pci_restore_state(pdev); - ret = pci_enable_device(pdev); + ret = nouveau_set_power_state_D0(pdev); if (ret) return ret; - pci_set_master(pdev); ret = nouveau_do_resume(drm_dev, false); @@ -879,12 +897,9 @@ nouveau_pmops_runtime_resu...
2019 Nov 20
4
[PATCH v4] pci: prevent putting nvidia GPUs into lower device states on certain intel bridges
...m(); > > ret = nouveau_do_suspend(drm_dev, true); > > pci_save_state(pdev); > > pci_disable_device(pdev); > > pci_ignore_hotplug(pdev); > > pci_set_power_state(pdev, PCI_D3cold); > > drm_dev->switch_power_state = DRM_SWITCH_POWER_DYNAMIC_OFF; > > return ret; > > } > > > > Normally PCI drivers leave the PCI bus PM things to PCI core but here > > the driver does these. So I wonder if it makes any difference if we let > > the core handle all that: > > > > static int > > nouveau...
2014 Dec 23
18
[PATCH 0/11] Add suspend/resume support for GK20A
Hi, This series includes some pieces of fixes to complete the GK20A power on/off sequences and add the suspend/resume support. The patches 1/11 - 4/11 are based on the linux-next-20141219. The patches 5/11 - 11/11 are based on the branch "linux-3.19" of Ben Skeggs's tree (http://cgit.freedesktop.org/~darktama/nouveau). Thanks, Vince Vince Hsu (4): (linux-next-20141219) ARM: