From mboxrd@z Thu Jan 1 00:00:00 1970 From: Imre Deak Subject: [PATCH v2 16/16] drm/i915: add comments on what stage a given PM handler is called Date: Mon, 15 Sep 2014 18:23:59 +0300 Message-ID: <1410794639-16345-1-git-send-email-imre.deak@intel.com> References: <1410362229-814-17-git-send-email-imre.deak@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by gabe.freedesktop.org (Postfix) with ESMTP id 668EA6E026 for ; Mon, 15 Sep 2014 08:24:01 -0700 (PDT) In-Reply-To: <1410362229-814-17-git-send-email-imre.deak@intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org This will hopefully make it easier to navigate the code without the need to consult the full PM documentation. v2: - add a comment that the freeze handler is also called after rebooting Signed-off-by: Imre Deak --- drivers/gpu/drm/i915/i915_drv.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c index b5508ae..538a658 100644 --- a/drivers/gpu/drm/i915/i915_drv.c +++ b/drivers/gpu/drm/i915/i915_drv.c @@ -1504,10 +1504,24 @@ static int intel_resume_prepare(struct drm_i915_private *dev_priv, } static const struct dev_pm_ops i915_pm_ops = { + /* S0ix, S3 event handlers */ .suspend = i915_pm_suspend, .suspend_late = i915_pm_suspend_late, .resume_early = i915_pm_resume_early, .resume = i915_pm_resume, + + /* + * S4 event handlers + * @freeze, @freeze_late : called (1) before creating hibernation + * image and (2) after rebooting, before + * restoring the image + * @thaw, @thaw_early : called after creating hibernation image, + * before writing it + * @poweroff, @poweroff_late: called after writing hibernation image, + * before rebooting + * @restore, @restore_early : called after rebooting and restoring the + * image + */ .freeze = i915_pm_suspend, .freeze_late = i915_pm_suspend_late, .thaw_early = i915_pm_resume_early, @@ -1516,6 +1530,8 @@ static const struct dev_pm_ops i915_pm_ops = { .poweroff_late = i915_pm_suspend_late, .restore_early = i915_pm_resume_early, .restore = i915_pm_resume, + + /* D0<->D3 (runtime PM) event handlers */ .runtime_suspend = intel_runtime_suspend, .runtime_resume = intel_runtime_resume, }; -- 1.8.4