linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lyude Paul <lyude@redhat.com>
To: nouveau@lists.freedesktop.org
Cc: stable@vger.kernel.org, Lukas Wunner <lukas@wunner.de>,
	Karol Herbst <karolherbst@gmail.com>,
	Ben Skeggs <bskeggs@redhat.com>, David Airlie <airlied@linux.ie>,
	dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: [PATCH v5 07/13] drm/nouveau: Add missing unroll functions in nouveau_do_suspend()
Date: Tue,  7 Aug 2018 16:39:04 -0400	[thread overview]
Message-ID: <20180807203914.2192-8-lyude@redhat.com> (raw)
In-Reply-To: <20180807203914.2192-1-lyude@redhat.com>

Currently, it appears that nouveau_do_suspend() forgets to roll back
suspending fbcon and suspending the device LEDs. We also currently skip
the entire rollback process if nouveau_display_suspend() fails. So, fix
that.

Signed-off-by: Lyude Paul <lyude@redhat.com>
Cc: stable@vger.kernel.org
Cc: Lukas Wunner <lukas@wunner.de>
Cc: Karol Herbst <karolherbst@gmail.com>
---
 drivers/gpu/drm/nouveau/nouveau_drm.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/nouveau/nouveau_drm.c b/drivers/gpu/drm/nouveau/nouveau_drm.c
index 5ea8fe992484..db56e9b6b6af 100644
--- a/drivers/gpu/drm/nouveau/nouveau_drm.c
+++ b/drivers/gpu/drm/nouveau/nouveau_drm.c
@@ -674,10 +674,11 @@ nouveau_do_suspend(struct drm_device *dev, bool runtime)
 	if (dev->mode_config.num_crtc) {
 		NV_DEBUG(drm, "suspending console...\n");
 		nouveau_fbcon_set_suspend(dev, 1);
+
 		NV_DEBUG(drm, "suspending display...\n");
 		ret = nouveau_display_suspend(dev, runtime);
 		if (ret)
-			return ret;
+			goto fail_fbcon;
 	}
 
 	NV_DEBUG(drm, "evicting buffers...\n");
@@ -719,7 +720,14 @@ nouveau_do_suspend(struct drm_device *dev, bool runtime)
 	if (dev->mode_config.num_crtc) {
 		NV_DEBUG(drm, "resuming display...\n");
 		nouveau_display_resume(dev, runtime);
+
+fail_fbcon:
+		NV_DEBUG(drm, "resuming console...\n");
+		nouveau_fbcon_set_suspend(dev, 0);
 	}
+
+	nouveau_led_resume(dev);
+
 	return ret;
 }
 
-- 
2.17.1


  parent reply	other threads:[~2018-08-07 20:40 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-07 20:38 [PATCH v5 00/13] Fix connector probing deadlocks from RPM bugs Lyude Paul
2018-08-07 20:38 ` [PATCH v5 01/13] drm/nouveau: Fix bogus drm_kms_helper_poll_enable() placement Lyude Paul
2018-08-07 20:38 ` [PATCH v5 02/13] drm/nouveau: Remove duplicate poll_enable() in pmops_runtime_suspend() Lyude Paul
2018-08-07 20:39 ` [PATCH v5 03/13] drm/nouveau: Remove useless poll_enable() call in switcheroo_set_state() Lyude Paul
2018-08-07 20:39 ` [PATCH v5 04/13] drm/nouveau: Remove useless poll_disable() " Lyude Paul
2018-08-07 20:39 ` [PATCH v5 05/13] drm/nouveau: Remove useless poll_enable() call in drm_load() Lyude Paul
2018-08-11  9:45   ` [Nouveau] " Karol Herbst
2018-08-07 20:39 ` [PATCH v5 06/13] drm/nouveau: Call optimus_dsm functions after nouveau_do_suspend() Lyude Paul
2018-08-10 21:35   ` [Nouveau] " Karol Herbst
2018-08-07 20:39 ` Lyude Paul [this message]
2018-08-10 21:36   ` [Nouveau] [PATCH v5 07/13] drm/nouveau: Add missing unroll functions in nouveau_do_suspend() Karol Herbst
2018-08-07 20:39 ` [PATCH v5 08/13] drm/nouveau: Don't ignore nouveau_do_suspend() ret value Lyude Paul
2018-08-10 21:37   ` [Nouveau] " Karol Herbst
2018-08-07 20:39 ` [PATCH v5 09/13] drm/nouveau: Fix deadlock with fb_helper by inhibiting it's HPD Lyude Paul
2018-08-07 20:39 ` [PATCH v5 10/13] drm/nouveau: Use pm_runtime_get_noresume() in connector_detect() Lyude Paul
2018-08-10 21:39   ` [Nouveau] " Karol Herbst
2018-08-07 20:39 ` [PATCH v5 11/13] drm/nouveau: Respond to HPDs by probing one conn at a time Lyude Paul
2018-08-07 20:39 ` [PATCH v5 12/13] drm/nouveau: Fix deadlocks in nouveau_connector_detect() Lyude Paul
2018-08-07 20:39 ` [PATCH v5 13/13] drm/nouveau: Call pm_runtime_get_noresume() from hpd handlers Lyude Paul
2018-08-11  9:35   ` [Nouveau] " Karol Herbst

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180807203914.2192-8-lyude@redhat.com \
    --to=lyude@redhat.com \
    --cc=airlied@linux.ie \
    --cc=bskeggs@redhat.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=karolherbst@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lukas@wunner.de \
    --cc=nouveau@lists.freedesktop.org \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).