@@ -910,6 +910,7 @@ nouveau_pmops_runtime_suspend(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);
int ret;
if (!nouveau_pmops_runtime()) {
@@ -919,6 +920,10 @@ nouveau_pmops_runtime_suspend(struct device *dev)
nouveau_switcheroo_optimus_dsm();
ret = nouveau_do_suspend(drm_dev, true);
+ if (ret) {
+ NV_ERROR(drm, "suspend failed with: %d\n", ret);
+ return ret;
+ }
pci_save_state(pdev);
pci_disable_device(pdev);
pci_ignore_hotplug(pdev);
Signed-off-by: Karol Herbst <kherbst@redhat.com> CC: Alex Hung <alex.hung@canonical.com> CC: Rafael J. Wysocki <rafael.j.wysocki@intel.com> CC: Dave Airlie <airlied@redhat.com> CC: Lyude Paul <lyude@redhat.com> CC: Ben Skeggs <bskeggs@redhat.com> --- drivers/gpu/drm/nouveau/nouveau_drm.c | 5 +++++ 1 file changed, 5 insertions(+)