search for: nouveau_pmops_runtime_resume

Displaying 20 results from an estimated 67 matches for "nouveau_pmops_runtime_resume".

2018 Nov 24
1
[PATCH 2/2] drm/nouveau: Grab an rpm reference before/after DP AUX transactions
...pend(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 = &nouveau_drm(drm_dev)->client.device; >...
2016 Nov 16
0
[PATCH] drm/nouveau: Don't enabling polling twice on runtime resume
As it turns out, on cards that actually have CRTCs on them we're already calling drm_kms_helper_poll_enable(drm_dev) from nouveau_display_resume() before we call it in nouveau_pmops_runtime_resume(). This leads us to accidentally trying to enable polling twice, which results in a potential deadlock between the RPM locks and drm_dev->mode_config.mutex if we end up trying to enable polling the second time while output_poll_execute is running and holding the mode_config lock. As such, make s...
2018 Jul 16
0
[PATCH 1/5] drm/nouveau: Prevent RPM callback recursion in suspend/resume paths
...the GPU (and vice-versa) and cause the kernel to deadlock. With this, it should be safe to call the pm runtime functions in any context in nouveau with one condition: any point in the driver that calls pm_runtime_get*() cannot hold any locks owned by nouveau that would be acquired anywhere inside nouveau_pmops_runtime_resume(). This includes modesetting locks, i2c bus locks, etc. Signed-off-by: Lyude Paul <lyude at redhat.com> Cc: Karol Herbst <karolherbst at gmail.com> Cc: stable at vger.kernel.org --- drivers/gpu/drm/nouveau/nouveau_drm.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-)...
2013 Sep 08
3
3.12rc1-pre Nouveau? oops
...> runtime pm in it, which is something new Dave added for 3.12, adding > him in explicitly. The simplest explanation is that disp->init is > NULL. And it seems like there are no outputs from the earlier nouveau > init prints. I guess that the call to nouveau_display_resume from > nouveau_pmops_runtime_resume should be guarded by a if > (dev->mode_config.num_crtc) like it is everywhere else. > > -ilia Your guess was right, this (hopefully attached patch) fixes it for me! Thanks, Tobias
2019 May 07
2
[PATCH 1/5] drm: don't set the pci power state if the pci subsystem handles the ACPI bits
..._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_drm(drm_dev); > + struct nvif_device *de...
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 ++-
2013 Sep 08
3
3.12rc1-pre Nouveau? oops
...something new Dave added for 3.12, adding >>> him in explicitly. The simplest explanation is that disp->init is >>> NULL. And it seems like there are no outputs from the earlier nouveau >>> init prints. I guess that the call to nouveau_display_resume from >>> nouveau_pmops_runtime_resume should be guarded by a if >>> (dev->mode_config.num_crtc) like it is everywhere else. >>> >>> -ilia >> Your guess was right, this (hopefully attached patch) fixes it for me! > Does it look like this one? > > Dave. No, mine was quick and dirty, reverte...
2018 Nov 17
0
[PATCH 2/2] drm/nouveau: Grab an rpm reference before/after DP AUX transactions
...e); 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 = &nouveau_drm(drm_dev)->client.device; int ret; @@ -889,11 +895,13 @@ nouveau_pmops_runti...
2019 Apr 04
4
[PATCH] pci/quirks: Add quirk to reset nvgpu at boot for the Lenovo ThinkPad P50
...__update_runtime_status(dev, RPM_RESUMING) callback = RPM_GET_CALLBACK(dev, runtime_resume) rpm_callback(callback, dev) __rpm_callback pci_pm_runtime_resume drv->pm->runtime_resume nouveau_pmops_runtime_resume nouveau_do_resume schedule_work(hpd_work) # <--- ... nouveau_display_hpd_work pm_runtime_get_sync drm_helper_hpd_irq_event...
2017 Jan 24
1
[PATCH 2/2] drm/nouveau: Queue hpd_work on (runtime) resume
...vidia, i use echo ON > ...vgaswitcheroo/switch) to power up the nvidia again, but now with nothing connected to its outputs. I can prevent the hang if i either boot with nouveau.runpm=0, or connect displays to the nvidia in case a), or if i remove the new schedule_work() for hpd_work in the nouveau_pmops_runtime_resume() function. Otherwise i get a hanging gpu-manager process on Ubuntu and this repeating in my kernel log: [ 246.899424] INFO: task kworker/7:1:127 blocked for more than 120 seconds. [ 246.899476] Tainted: G I 4.9.0-rc8 #60 [ 246.899511] "echo 0 > /proc/sys/kernel/hun...
2017 Nov 16
0
[RFC] drm: don't continue with anything after the GPU couldn't be woken up
...erbst at redhat.com> --- drm/nouveau/nouveau_drm.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drm/nouveau/nouveau_drm.c b/drm/nouveau/nouveau_drm.c index 8d4a5be3..02892714 100644 --- a/drm/nouveau/nouveau_drm.c +++ b/drm/nouveau/nouveau_drm.c @@ -871,7 +871,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_drm(drm_dev); + struct nvif_device *device = &drm->client.dev...
2019 Mar 28
0
[PATCH] nouveau: forward error generated while resuming objects tree
...ase); + ret = nvif_client_resume(&drm->master.base); + if (ret) { + NV_ERROR(drm, "Client resume failed with error: %d\n", ret); + return ret; + } NV_DEBUG(drm, "resuming fence...\n"); if (drm->fence && nouveau_fence(drm)->resume) @@ -925,6 +930,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 = &nouveau_drm(drm_dev)->client.device; int ret; @@ -941,6 +947,10 @@ nouveau_pmops_runtim...
2013 Sep 08
0
3.12rc1-pre Nouveau? oops
...a), and the backtrace has runtime pm in it, which is something new Dave added for 3.12, adding him in explicitly. The simplest explanation is that disp->init is NULL. And it seems like there are no outputs from the earlier nouveau init prints. I guess that the call to nouveau_display_resume from nouveau_pmops_runtime_resume should be guarded by a if (dev->mode_config.num_crtc) like it is everywhere else. -ilia > > BUG: unable to handle kernel NULL pointer dereference at (null) > IP: [< (null)>] (null) > PGD 24eaa0067 PUD 24e7ac067 PMD 0 > Oops: 0010 [#1] PREEMPT SMP >...
2017 Mar 02
2
[Bug 100035] New: nouveau runtime pm causes soft lockups and hangs during boot
...190 [nouveau] [ 56.593320] nvkm_object_init+0x80/0x190 [nouveau] [ 56.593328] nvkm_client_init+0xe/0x10 [nouveau] [ 56.593343] nvkm_client_resume+0xe/0x10 [nouveau] [ 56.593350] nvif_client_resume+0x14/0x20 [nouveau] [ 56.593365] nouveau_do_resume+0x4d/0x130 [nouveau] [ 56.593379] nouveau_pmops_runtime_resume+0x72/0x150 [nouveau] [ 56.593381] pci_pm_runtime_resume+0x7b/0xa0 [ 56.593382] __rpm_callback+0xc6/0x210 [ 56.593383] ? pci_restore_standard_config+0x40/0x40 [ 56.593384] rpm_callback+0x24/0x80 [ 56.593385] ? pci_restore_standard_config+0x40/0x40 [ 56.593385] rpm_resume+0x47d/0x68...
2017 Jan 12
2
[PATCH v2 1/2] drm/nouveau: Don't enabling polling twice on runtime resume
As it turns out, on cards that actually have CRTCs on them we're already calling drm_kms_helper_poll_enable(drm_dev) from nouveau_display_resume() before we call it in nouveau_pmops_runtime_resume(). This leads us to accidentally trying to enable polling twice, which results in a potential deadlock between the RPM locks and drm_dev->mode_config.mutex if we end up trying to enable polling the second time while output_poll_execute is running and holding the mode_config lock. As such, make s...
2019 May 04
0
[PATCH 1/5] drm: don't set the pci power state if the pci subsystem handles the ACPI bits
...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_drm(drm_dev); + struct nvif_device *device = &drm->client.dev...
2019 May 07
0
[PATCH v2 1/4] drm: don't set the pci power state if the pci subsystem handles the ACPI bits
...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_drm(drm_dev); + struct nvif_device *device = &drm->client.dev...
2016 Nov 21
2
[PATCH 1/2] drm/nouveau: Rename acpi_work to hpd_work
We need to call drm_helper_hpd_irq_event() on resume to properly detect monitor connection / disconnection on some laptops. For runtime-resume (which gets called on resume from normal suspend too) we must call drm_helper_hpd_irq_event() from a workqueue to avoid a deadlock. Rename acpi_work to hpd_work, and move it out of the #ifdef CONFIG_ACPI blocks to make it suitable for generic work.
2019 May 07
0
[PATCH 1/5] drm: don't set the pci power state if the pci subsystem handles the ACPI bits
..._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_dr...
2019 Nov 20
2
[PATCH v4] pci: prevent putting nvidia GPUs into lower device states on certain intel bridges
...ntime_forbid(dev); return -EBUSY; } nouveau_switcheroo_optimus_dsm(); ret = nouveau_do_suspend(drm_dev, true); pci_ignore_hotplug(pdev); drm_dev->switch_power_state = DRM_SWITCH_POWER_DYNAMIC_OFF; return ret; } and similar for the nouveau_pmops_runtime_resume().