dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Vinod Koul <vinod.koul@intel.com>
To: linux-kernel@vger.kernel.org
Cc: subhransu.s.prusty@intel.com, vinod.koul@intel.com,
	David Airlie <airlied@linux.ie>, Ben Skeggs <bskeggs@redhat.com>,
	Dave Airlie <airlied@redhat.com>,
	Daniel Vetter <daniel.vetter@ffwll.ch>,
	David Herrmann <dh.herrmann@gmail.com>,
	Ilia Mirkin <imirkin@alum.mit.edu>,
	Jani Nikula <jani.nikula@intel.com>,
	Alexandre Courbot <acourbot@nvidia.com>,
	Rob Clark <robdclark@gmail.com>,
	Thierry Reding <treding@nvidia.com>,
	dri-devel@lists.freedesktop.org
Subject: [PATCH 05/27] drm/nouveau: use pm_runtime_last_busy_and_autosuspend helper
Date: Wed, 24 Sep 2014 21:44:55 +0530	[thread overview]
Message-ID: <1411575342-31048-6-git-send-email-vinod.koul@intel.com> (raw)
In-Reply-To: <1411575342-31048-1-git-send-email-vinod.koul@intel.com>

Use the new pm_runtime_last_busy_and_autosuspend helper instead of open
coding the same code

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
---
 drivers/gpu/drm/nouveau/nouveau_connector.c |    3 +--
 drivers/gpu/drm/nouveau/nouveau_drm.c       |    9 +++------
 2 files changed, 4 insertions(+), 8 deletions(-)

diff --git a/drivers/gpu/drm/nouveau/nouveau_connector.c b/drivers/gpu/drm/nouveau/nouveau_connector.c
index 1ec44c8..0e3108a 100644
--- a/drivers/gpu/drm/nouveau/nouveau_connector.c
+++ b/drivers/gpu/drm/nouveau/nouveau_connector.c
@@ -323,8 +323,7 @@ detect_analog:
 
  out:
 
-	pm_runtime_mark_last_busy(connector->dev->dev);
-	pm_runtime_put_autosuspend(connector->dev->dev);
+	pm_runtime_last_busy_and_autosuspend(connector->dev->dev);
 
 	return conn_status;
 }
diff --git a/drivers/gpu/drm/nouveau/nouveau_drm.c b/drivers/gpu/drm/nouveau/nouveau_drm.c
index 250a5e8..719eabf 100644
--- a/drivers/gpu/drm/nouveau/nouveau_drm.c
+++ b/drivers/gpu/drm/nouveau/nouveau_drm.c
@@ -766,8 +766,7 @@ nouveau_drm_open(struct drm_device *dev, struct drm_file *fpriv)
 	mutex_unlock(&drm->client.mutex);
 
 out_suspend:
-	pm_runtime_mark_last_busy(dev->dev);
-	pm_runtime_put_autosuspend(dev->dev);
+	pm_runtime_last_busy_and_autosuspend(dev->dev);
 
 	return ret;
 }
@@ -794,8 +793,7 @@ nouveau_drm_postclose(struct drm_device *dev, struct drm_file *fpriv)
 {
 	struct nouveau_cli *cli = nouveau_cli(fpriv);
 	nouveau_cli_destroy(cli);
-	pm_runtime_mark_last_busy(dev->dev);
-	pm_runtime_put_autosuspend(dev->dev);
+	pm_runtime_last_busy_and_autosuspend(dev->dev);
 }
 
 static const struct drm_ioctl_desc
@@ -834,8 +832,7 @@ nouveau_drm_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
 		break;
 	}
 
-	pm_runtime_mark_last_busy(dev->dev);
-	pm_runtime_put_autosuspend(dev->dev);
+	pm_runtime_last_busy_and_autosuspend(dev->dev);
 	return ret;
 }
 
-- 
1.7.0.4

  parent reply	other threads:[~2014-09-24 16:14 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-24 16:14 [PATCH 00/27] add pm_runtime_last_busy_and_autosuspend() helper Vinod Koul
2014-09-24 16:14 ` [PATCH 04/27] drm/i915: use pm_runtime_last_busy_and_autosuspend helper Vinod Koul
2014-09-24 18:35   ` Daniel Vetter
2014-09-24 16:14 ` Vinod Koul [this message]
2014-09-24 16:14 ` [PATCH 06/27] drm/radeon: " Vinod Koul
2014-09-24 20:37   ` Alex Deucher
2014-09-24 16:14 ` [PATCH 07/27] vga_switcheroo: " Vinod Koul
2014-09-24 20:37   ` Alex Deucher
2014-09-24 20:28 ` [PATCH 00/27] add pm_runtime_last_busy_and_autosuspend() helper Rafael J. Wysocki
2014-09-24 20:15   ` Felipe Balbi
2014-09-24 20:46     ` Rafael J. Wysocki
2014-09-24 20:32       ` Felipe Balbi
2014-09-25  7:57         ` Vinod Koul
2014-09-25 14:22           ` Felipe Balbi
2014-09-25 14:27             ` Wolfram Sang
2014-09-25 19:54               ` Rafael J. Wysocki
2014-09-28 15:37                 ` Vinod Koul
2014-09-25  7:46   ` Vinod Koul

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=1411575342-31048-6-git-send-email-vinod.koul@intel.com \
    --to=vinod.koul@intel.com \
    --cc=acourbot@nvidia.com \
    --cc=airlied@linux.ie \
    --cc=airlied@redhat.com \
    --cc=bskeggs@redhat.com \
    --cc=daniel.vetter@ffwll.ch \
    --cc=dh.herrmann@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=imirkin@alum.mit.edu \
    --cc=jani.nikula@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robdclark@gmail.com \
    --cc=subhransu.s.prusty@intel.com \
    --cc=treding@nvidia.com \
    /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).