From patchwork Wed Jun 17 10:51:10 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: sagar.a.kamble@intel.com X-Patchwork-Id: 6623951 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id C65579F326 for ; Wed, 17 Jun 2015 10:49:45 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id BDC98208C4 for ; Wed, 17 Jun 2015 10:49:44 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id B888E208C0 for ; Wed, 17 Jun 2015 10:49:43 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1F9906EA81; Wed, 17 Jun 2015 03:49:43 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by gabe.freedesktop.org (Postfix) with ESMTP id 0EB126EA81 for ; Wed, 17 Jun 2015 03:49:41 -0700 (PDT) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga101.jf.intel.com with ESMTP; 17 Jun 2015 03:49:42 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.13,632,1427785200"; d="scan'208";a="748264471" Received: from sakamble-desktop.iind.intel.com ([10.223.82.56]) by orsmga002.jf.intel.com with ESMTP; 17 Jun 2015 03:49:40 -0700 From: Sagar Arun Kamble To: intel-gfx@lists.freedesktop.org Date: Wed, 17 Jun 2015 16:21:10 +0530 Message-Id: <1434538270-22258-1-git-send-email-sagar.a.kamble@intel.com> X-Mailer: git-send-email 1.9.1 Subject: [Intel-gfx] [PATCH 1/1] drm/i915: Tracepoints for profiling DC9 entry and exit programming X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Spam-Status: No, score=-4.8 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP DC9 entry and exit programming is critical part of suspend/resume sequences. This patch adds tracepoints that can help analyze time taken using analyze_suspend.py/FTrace. Change-Id: I22fca5313c4349f8937eeb5a1c441c8ef76e5f4e Signed-off-by: Sagar Arun Kamble Tested-By: Intel Graphics QA PRTS (Patch Regression Test System Contact: shuang.he@intel.com) --- drivers/gpu/drm/i915/i915_drv.c | 9 +++++++++ drivers/gpu/drm/i915/i915_reg.h | 1 + 2 files changed, 10 insertions(+) diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c index 78ef0bb..6797650 100644 --- a/drivers/gpu/drm/i915/i915_drv.c +++ b/drivers/gpu/drm/i915/i915_drv.c @@ -39,6 +39,7 @@ #include #include #include +#include static struct drm_driver driver; @@ -1061,12 +1062,16 @@ static int bxt_suspend_complete(struct drm_i915_private *dev_priv) { struct drm_device *dev = dev_priv->dev; + trace_suspend_resume(TPS("dc_state_entry"), DC9_STATE, true); + /* TODO: when DC5 support is added disable DC5 here. */ broxton_ddi_phy_uninit(dev); broxton_uninit_cdclk(dev); bxt_enable_dc9(dev_priv); + trace_suspend_resume(TPS("dc_state_entry"), DC9_STATE, false); + return 0; } @@ -1076,6 +1081,8 @@ static int bxt_resume_prepare(struct drm_i915_private *dev_priv) /* TODO: when CSR FW support is added make sure the FW is loaded */ + trace_suspend_resume(TPS("dc_state_exit"), DC9_STATE, true); + bxt_disable_dc9(dev_priv); /* @@ -1086,6 +1093,8 @@ static int bxt_resume_prepare(struct drm_i915_private *dev_priv) broxton_ddi_phy_init(dev); intel_prepare_ddi(dev); + trace_suspend_resume(TPS("dc_state_exit"), DC9_STATE, false); + return 0; } diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h index 0b979ad..cf83ec8 100644 --- a/drivers/gpu/drm/i915/i915_reg.h +++ b/drivers/gpu/drm/i915/i915_reg.h @@ -7290,6 +7290,7 @@ enum skl_disp_power_wells { #define DC_STATE_EN_DC9 (1<<3) #define DC_STATE_EN_UPTO_DC6 (2<<0) #define DC_STATE_EN_UPTO_DC5_DC6_MASK 0x3 +#define DC9_STATE 9 #define DC_STATE_DEBUG 0x45520 #define DC_STATE_DEBUG_MASK_MEMORY_UP (1<<1)