search for: pci_save_state

Displaying 20 results from an estimated 98 matches for "pci_save_state".

2018 Feb 21
2
[PATCH 1/7] PCI: Restore BARs on runtime resume despite being unbound
...ARs will be > >> uninitialized when a driver later probes it. > >> > >> Fix by restoring the BARs on runtime resume if the device is not bound. > >> This is sufficient to fix the above-mentioned use cases. Other use > >> cases might require a full-blown pci_save_state() / pci_restore_state() > >> or execution of fixups. We can add that once use cases materialize, > >> let's not inflate the code unnecessarily. > > > > Why would we not do a full-blown restore? With this patch, I think > > some configuration done during enu...
2018 Sep 13
4
[PATCH v3] PCI: Reprogram bridge prefetch registers on resume
...t;drake at endlessm.com> --- drivers/pci/pci.c | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index 29ff9619b5fa..5d58220b6997 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c @@ -1289,12 +1289,12 @@ int pci_save_state(struct pci_dev *dev) EXPORT_SYMBOL(pci_save_state); static void pci_restore_config_dword(struct pci_dev *pdev, int offset, - u32 saved_val, int retry) + u32 saved_val, int retry, bool force) { u32 val; pci_read_config_dword(pdev, offset, &val); - if (val == saved_val)...
2018 Feb 20
2
[PATCH 1/7] PCI: Restore BARs on runtime resume despite being unbound
...uspend to D3cold, the HDA controller's BARs will be > uninitialized when a driver later probes it. > > Fix by restoring the BARs on runtime resume if the device is not bound. > This is sufficient to fix the above-mentioned use cases. Other use > cases might require a full-blown pci_save_state() / pci_restore_state() > or execution of fixups. We can add that once use cases materialize, > let's not inflate the code unnecessarily. Why would we not do a full-blown restore? With this patch, I think some configuration done during enumeration, e.g., ASPM and MPS, will be lost. &q...
2018 Sep 12
3
[PATCH v2] PCI: Reprogram bridge prefetch registers on resume
...re_config_space() code. drivers/pci/pci.c | 31 +++++++++++++++++++++---------- 1 file changed, 21 insertions(+), 10 deletions(-) diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index 29ff9619b5fa..e1704100e72d 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c @@ -1289,13 +1289,15 @@ int pci_save_state(struct pci_dev *dev) EXPORT_SYMBOL(pci_save_state); static void pci_restore_config_dword(struct pci_dev *pdev, int offset, - u32 saved_val, int retry) + u32 saved_val, int retry, bool force) { u32 val; - pci_read_config_dword(pdev, offset, &val); - if (val == saved_val)...
2018 Feb 21
0
[PATCH 1/7] PCI: Restore BARs on runtime resume despite being unbound
...he HDA controller's BARs will be >> uninitialized when a driver later probes it. >> >> Fix by restoring the BARs on runtime resume if the device is not bound. >> This is sufficient to fix the above-mentioned use cases. Other use >> cases might require a full-blown pci_save_state() / pci_restore_state() >> or execution of fixups. We can add that once use cases materialize, >> let's not inflate the code unnecessarily. > > Why would we not do a full-blown restore? With this patch, I think > some configuration done during enumeration, e.g., ASPM and...
2018 Feb 25
0
[PATCH 1/7] PCI: Restore BARs on runtime resume despite being unbound
On Wed, Feb 21, 2018 at 01:39:34PM +0100, Rafael J. Wysocki wrote: > On Wednesday, February 21, 2018 10:57:14 AM CET Rafael J. Wysocki wrote: > > So if pci_pm_runtime_suspend() is modified to call pci_save_state() > > before returning 0 in the !dev->driver case, we can just move the > > pci_restore_standard_config() invocation in pci_pm_runtime_resume() up > > to the very top and check dev->driver later. > > I mean something like the patch below, overall (untested). > &gt...
2018 Sep 27
2
[PATCH v3] PCI: Reprogram bridge prefetch registers on resume
...+++-------- > > 1 file changed, 17 insertions(+), 8 deletions(-) > > > > diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c > > index 29ff9619b5fa..5d58220b6997 100644 > > --- a/drivers/pci/pci.c > > +++ b/drivers/pci/pci.c > > @@ -1289,12 +1289,12 @@ int pci_save_state(struct pci_dev *dev) > > EXPORT_SYMBOL(pci_save_state); > > > > static void pci_restore_config_dword(struct pci_dev *pdev, int offset, > > - u32 saved_val, int retry) > > + u32 saved_val, int retry, bool force) > > { > > u32 val; >...
2018 Mar 03
0
[PATCH v2 1/7] PCI: Restore config space on runtime resume despite being unbound
...is not bound. Cc: Bjorn Helgaas <bhelgaas at google.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki at intel.com> [lukas: add commit message, bikeshed code comments for clarity] Signed-off-by: Lukas Wunner <lukas at wunner.de> --- Changes since v1: - Replace patch to use pci_save_state() / pci_restore_state() for consistency between runtime PM code path of bound and unbound devices. (Rafael, Bjorn) drivers/pci/pci-driver.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/drivers/pci/pci-driver.c b/drivers/pci/pci-driver.c index 3bed6bed...
2018 Sep 13
0
[PATCH v3] PCI: Reprogram bridge prefetch registers on resume
...rivers/pci/pci.c | 25 +++++++++++++++++-------- > 1 file changed, 17 insertions(+), 8 deletions(-) > > diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c > index 29ff9619b5fa..5d58220b6997 100644 > --- a/drivers/pci/pci.c > +++ b/drivers/pci/pci.c > @@ -1289,12 +1289,12 @@ int pci_save_state(struct pci_dev *dev) > EXPORT_SYMBOL(pci_save_state); > > static void pci_restore_config_dword(struct pci_dev *pdev, int offset, > - u32 saved_val, int retry) > + u32 saved_val, int retry, bool force) > { &gt...
2018 Sep 18
0
[PATCH v3] PCI: Reprogram bridge prefetch registers on resume
...ivers/pci/pci.c | 25 +++++++++++++++++-------- > 1 file changed, 17 insertions(+), 8 deletions(-) > > diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c > index 29ff9619b5fa..5d58220b6997 100644 > --- a/drivers/pci/pci.c > +++ b/drivers/pci/pci.c > @@ -1289,12 +1289,12 @@ int pci_save_state(struct pci_dev *dev) > EXPORT_SYMBOL(pci_save_state); > > static void pci_restore_config_dword(struct pci_dev *pdev, int offset, > - u32 saved_val, int retry) > + u32 saved_val, int retry, bool force) > { > u32 val; > > pci_read_config_dword(pde...
2019 Nov 20
2
[PATCH v4] pci: prevent putting nvidia GPUs into lower device states on certain intel bridges
...struct drm_device *drm_dev = pci_get_drvdata(pdev); int ret; if (!nouveau_pmops_runtime()) { pm_runtime_forbid(dev); return -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 do...
2018 Sep 12
0
[PATCH v2] PCI: Reprogram bridge prefetch registers on resume
...pci/pci.c | 31 +++++++++++++++++++++---------- > 1 file changed, 21 insertions(+), 10 deletions(-) > > diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c > index 29ff9619b5fa..e1704100e72d 100644 > --- a/drivers/pci/pci.c > +++ b/drivers/pci/pci.c > @@ -1289,13 +1289,15 @@ int pci_save_state(struct pci_dev *dev) > EXPORT_SYMBOL(pci_save_state); > > static void pci_restore_config_dword(struct pci_dev *pdev, int offset, > - u32 saved_val, int retry) > + u32 saved_val, int retry, bool force) > { &gt...
2019 May 07
2
[PATCH 1/5] drm: don't set the pci power state if the pci subsystem handles the ACPI bits
...dsm_priv.optimus_detected/optimus_skip_dsm. Why not just make add a function to check these that we call when setting up the DRM device, then store the result of that into drm->runpm_dsm instead of changing it every time we runtime suspend? > 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; > }...
2018 Sep 29
0
[PATCH v3] PCI: Reprogram bridge prefetch registers on resume
...gt; 1 file changed, 17 insertions(+), 8 deletions(-) >>> >>> diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c >>> index 29ff9619b5fa..5d58220b6997 100644 >>> --- a/drivers/pci/pci.c >>> +++ b/drivers/pci/pci.c >>> @@ -1289,12 +1289,12 @@ int pci_save_state(struct pci_dev *dev) >>> EXPORT_SYMBOL(pci_save_state); >>> >>> static void pci_restore_config_dword(struct pci_dev *pdev, int offset, >>> - u32 saved_val, int retry) >>> + u32 saved_val, int retry, bool force) >>> { &gt...
2018 Mar 03
12
[PATCH v2 0/7] Modernize vga_switcheroo by using device link for HDA
Modernize vga_switcheroo by using a device link to enforce a runtime PM dependency from an HDA controller to the GPU it's integrated into, v2. Changes since v1: - Replace patch [1/7] to use pci_save_state() / pci_restore_state() for consistency between runtime PM code path of bound and unbound devices. (Rafael, Bjorn) - Patch [5/7]: Drop an unnecessary initialization. (Bjorn) Rephrase error message on failed link addition for clarity. Link to v1: https://www.spinics.net/lists/dri-devel/msg16...
2018 Nov 24
1
[PATCH 2/2] drm/nouveau: Grab an rpm reference before/after DP AUX transactions
...e()) { > @@ -866,6 +867,8 @@ nouveau_pmops_runtime_suspend(struct device *dev) > return -EBUSY; > } > > + drm->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; >...
2018 Feb 18
0
[PATCH 5/7] vga_switcheroo: Use device link for HDA controller
...20,7 +720,6 @@ static int amdgpu_pmops_runtime_suspend(struct device *dev) drm_dev->switch_power_state = DRM_SWITCH_POWER_CHANGING; drm_kms_helper_poll_disable(drm_dev); - vga_switcheroo_set_dynamic_switch(pdev, VGA_SWITCHEROO_OFF); ret = amdgpu_device_suspend(drm_dev, false, false); pci_save_state(pdev); @@ -757,7 +756,6 @@ static int amdgpu_pmops_runtime_resume(struct device *dev) ret = amdgpu_device_resume(drm_dev, false, false); drm_kms_helper_poll_enable(drm_dev); - vga_switcheroo_set_dynamic_switch(pdev, VGA_SWITCHEROO_ON); drm_dev->switch_power_state = DRM_SWITCH_POWER_ON;...
2018 Aug 07
0
[PATCH v5 06/13] drm/nouveau: Call optimus_dsm functions after nouveau_do_suspend()
...--- a/drivers/gpu/drm/nouveau/nouveau_drm.c +++ b/drivers/gpu/drm/nouveau/nouveau_drm.c @@ -833,8 +833,8 @@ nouveau_pmops_runtime_suspend(struct device *dev) return -EBUSY; } - nouveau_switcheroo_optimus_dsm(); ret = nouveau_do_suspend(drm_dev, true); + nouveau_switcheroo_optimus_dsm(); pci_save_state(pdev); pci_disable_device(pdev); pci_ignore_hotplug(pdev); -- 2.17.1
2018 Aug 07
0
[PATCH v5 08/13] drm/nouveau: Don't ignore nouveau_do_suspend() ret value
...6b6af..f79b435368ec 100644 --- a/drivers/gpu/drm/nouveau/nouveau_drm.c +++ b/drivers/gpu/drm/nouveau/nouveau_drm.c @@ -842,6 +842,9 @@ nouveau_pmops_runtime_suspend(struct device *dev) } ret = nouveau_do_suspend(drm_dev, true); + if (ret) + return ret; + nouveau_switcheroo_optimus_dsm(); pci_save_state(pdev); pci_disable_device(pdev); -- 2.17.1
2013 Oct 08
1
[PATCH] drm/nouveau: suspend to D3hot, not to D3cold
...nouveau/nouveau_drm.c b/drivers/gpu/drm/nouveau/nouveau_drm.c index 89efeff..566e544 100644 --- a/drivers/gpu/drm/nouveau/nouveau_drm.c +++ b/drivers/gpu/drm/nouveau/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; }