From: Daniel Vetter <daniel@ffwll.ch>
To: Sagar Arun Kamble <sagar.a.kamble@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 1/1] drm/i915: Tracepoints for profiling DC9 entry and exit programming
Date: Wed, 17 Jun 2015 13:30:09 +0200 [thread overview]
Message-ID: <20150617113009.GG23637@phenom.ffwll.local> (raw)
In-Reply-To: <1434538270-22258-1-git-send-email-sagar.a.kamble@intel.com>
On Wed, Jun 17, 2015 at 04:21:10PM +0530, Sagar Arun Kamble wrote:
> 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 <sagar.a.kamble@intel.com>
Tracepoints are for system profiling when benchmarking and all that. What
exactly is this here for?
Also note that tracepoints are pretty much ABI, so high standards apply
here.
-Daniel
> ---
> 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 <linux/module.h>
> #include <linux/pm_runtime.h>
> #include <drm/drm_crtc_helper.h>
> +#include <trace/events/power.h>
>
> 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)
> --
> 1.9.1
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2015-06-17 11:27 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-17 10:51 [PATCH 1/1] drm/i915: Tracepoints for profiling DC9 entry and exit programming Sagar Arun Kamble
2015-06-17 11:30 ` Daniel Vetter [this message]
2015-06-21 4:50 ` Sagar Arun Kamble
2015-06-22 12:56 ` Daniel Vetter
2015-06-29 5:25 ` shuang.he
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=20150617113009.GG23637@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=intel-gfx@lists.freedesktop.org \
--cc=sagar.a.kamble@intel.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