All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lyude Paul <lyude@redhat.com>
To: nouveau@lists.freedesktop.org
Cc: Karol Herbst <kherbst@redhat.com>,
	stable@vger.kernel.org, Ben Skeggs <bskeggs@redhat.com>,
	David Airlie <airlied@linux.ie>,
	dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: [PATCH v2 3/3] drm/nouveau: Remove bogus crtc check in pmops_runtime_idle
Date: Thu, 12 Jul 2018 13:02:54 -0400	[thread overview]
Message-ID: <20180712170256.13018-4-lyude@redhat.com> (raw)
In-Reply-To: <20180712170256.13018-1-lyude@redhat.com>

This both uses the legacy modesetting structures in a racy manner, and
additionally also doesn't even check the right variable (enabled != the
CRTC is actually turned on for atomic).

This fixes issues on my P50 regarding the dedicated GPU not entering
runtime suspend.

Signed-off-by: Lyude Paul <lyude@redhat.com>
Cc: stable@vger.kernel.org
---
 drivers/gpu/drm/nouveau/nouveau_drm.c | 11 -----------
 1 file changed, 11 deletions(-)

diff --git a/drivers/gpu/drm/nouveau/nouveau_drm.c b/drivers/gpu/drm/nouveau/nouveau_drm.c
index 0f668e275ee1..c7ec86d6c3c9 100644
--- a/drivers/gpu/drm/nouveau/nouveau_drm.c
+++ b/drivers/gpu/drm/nouveau/nouveau_drm.c
@@ -881,22 +881,11 @@ nouveau_pmops_runtime_resume(struct device *dev)
 static int
 nouveau_pmops_runtime_idle(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 drm_crtc *crtc;
-
 	if (!nouveau_pmops_runtime()) {
 		pm_runtime_forbid(dev);
 		return -EBUSY;
 	}
 
-	list_for_each_entry(crtc, &drm->dev->mode_config.crtc_list, head) {
-		if (crtc->enabled) {
-			DRM_DEBUG_DRIVER("failing to power off - crtc active\n");
-			return -EBUSY;
-		}
-	}
 	pm_runtime_mark_last_busy(dev);
 	pm_runtime_autosuspend(dev);
 	/* we don't want the main rpm_idle to call suspend - we want to autosuspend */
-- 
2.17.1

  parent reply	other threads:[~2018-07-12 17:02 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-12 17:02 [PATCH v2 0/3] drm/nouveau: Fix runtime PM leaks Lyude Paul
     [not found] ` <20180712170256.13018-1-lyude-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2018-07-12 17:02   ` [PATCH v2 1/3] drm/nouveau: Fix runtime PM leak in drm_open() Lyude Paul
2018-07-12 17:02     ` Lyude Paul
2018-07-12 17:02 ` [PATCH v2 2/3] drm/nouveau: Fix runtime PM leak in nv50_disp_atomic_commit() Lyude Paul
2018-07-12 17:02   ` Lyude Paul
2018-07-17  7:33   ` [Nouveau] " Lukas Wunner
2018-07-17  7:33     ` Lukas Wunner
     [not found]     ` <20180717073352.GA17459-JFq808J9C/izQB+pC5nmwQ@public.gmane.org>
2018-07-17 10:31       ` Ville Syrjälä
2018-07-17 10:31         ` [Nouveau] " Ville Syrjälä
2018-07-12 17:02 ` Lyude Paul [this message]
     [not found]   ` <20180712170256.13018-4-lyude-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2018-07-12 17:17     ` [PATCH v2 3/3] drm/nouveau: Remove bogus crtc check in pmops_runtime_idle Daniel Vetter
2018-07-12 17:17       ` Daniel Vetter

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=20180712170256.13018-4-lyude@redhat.com \
    --to=lyude@redhat.com \
    --cc=airlied@linux.ie \
    --cc=bskeggs@redhat.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=kherbst@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.