All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Gupta, Anshuman" <anshuman.gupta@intel.com>
To: "S, Saichandana" <saichandana.s@intel.com>,
	"intel-gfx@lists.freedesktop.org"
	<intel-gfx@lists.freedesktop.org>
Cc: "Nikula, Jani" <jani.nikula@intel.com>
Subject: Re: [Intel-gfx] [PATCH v3] drm/i915/debugfs : PM_REQ and PM_RES registers
Date: Tue, 12 Jan 2021 14:37:23 +0000	[thread overview]
Message-ID: <149dc69fa1104c4d8a9111fb65461e89@intel.com> (raw)
In-Reply-To: <20210112133346.12325-1-saichandana.s@intel.com>



> -----Original Message-----
> From: S, Saichandana <saichandana.s@intel.com>
> Sent: Tuesday, January 12, 2021 7:04 PM
> To: intel-gfx@lists.freedesktop.org
> Cc: Nikula, Jani <jani.nikula@intel.com>; Gupta, Anshuman
> <anshuman.gupta@intel.com>; S, Saichandana <saichandana.s@intel.com>
> Subject: [PATCH v3] drm/i915/debugfs : PM_REQ and PM_RES registers
> 
> PM_REQ register provides the value of the last PM request[Gupta, Anshuman] , response from PCU to
*PM_DBG_{REQ,RSP}* 
> Display Engine. PM_RES register provides the value of the last PM response
> from Display Engine to PCU.
> This debugfs will be used by DC9 IGT test to know about "DC9 Ready"
I would rephrase it as "This debugs DC9 Ready but will be used by dc9 igt test .
It will also print the useful debug information from Display Engine to PCU mailbox register"
> status.
> B.Spec : 49501, 49502
> 
> V2:
> Added a functional print to debugfs. [Jani Nikula]
> 
> V3:
> Used separate variables to store the register values and also used
> REG_GENMASK and REG_BIT for mask preparation. [Anshuman Gupta]
> 
> Removed reading of register contents. Replaced local variable with yesno().
> Placed register macros separately, distinguishing from other macros. [Jani
> Nikula]
> 
> Signed-off-by: Saichandana S <saichandana.s@intel.com>
> ---
>  .../drm/i915/display/intel_display_debugfs.c  | 23
> +++++++++++++++++++
>  drivers/gpu/drm/i915/i915_reg.h               | 10 ++++++++
>  2 files changed, 33 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_display_debugfs.c
> b/drivers/gpu/drm/i915/display/intel_display_debugfs.c
> index cd7e5519ee7d..e5997debb8e5 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_debugfs.c
> +++ b/drivers/gpu/drm/i915/display/intel_display_debugfs.c
> @@ -559,6 +559,28 @@ static int i915_dmc_info(struct seq_file *m, void
> *unused)
>  	return 0;
>  }
> 
> +static int i915_pm_req_res_info(struct seq_file *m, void *unused) {
> +	struct drm_i915_private *dev_priv = node_to_i915(m->private);
Please use i915 as variable as Jani has suggested earlier.
Thanks,
Anshuman.
> +	struct intel_csr *csr = &dev_priv->csr;
> +	u32 DC9_status;
> +
> +	if (!HAS_CSR(dev_priv))
> +		return -ENODEV;
> +	if (!csr->dmc_payload)
> +		return 0;
> +	DC9_status = intel_de_read(dev_priv, PM_RSP_DBG_1) &
> +PM_RESP_DC9_READY;
> +
> +	seq_printf(m, "Time to Next Fill : 0x%08x\n",
> +		   intel_de_read(dev_priv, PM_RSP_DBG_0) &
> PM_RESP_TTNF_MASK);
> +	seq_printf(m, "Time to Next VBI : 0x%08x\n",
> +		   (intel_de_read(dev_priv, PM_RSP_DBG_0) &
> PM_RESP_TTNVBI_MASK) >> 16);
> +	seq_printf(m, "Selective Exit Latency : 0x%08x\n",
> +		   intel_de_read(dev_priv, PM_RSP_DBG_1) &
> PM_RESP_SEL_EXIT_LATENCY_MASK);
> +	seq_printf(m, "DC9 Ready : %s\n", yesno(DC9_status));
> +	return 0;
> +}
> +
>  static void intel_seq_print_mode(struct seq_file *m, int tabs,
>  				 const struct drm_display_mode *mode)  {
> @@ -2100,6 +2122,7 @@ static const struct drm_info_list
> intel_display_debugfs_list[] = {
>  	{"i915_edp_psr_status", i915_edp_psr_status, 0},
>  	{"i915_power_domain_info", i915_power_domain_info, 0},
>  	{"i915_dmc_info", i915_dmc_info, 0},
> +	{"i915_pm_req_res_info", i915_pm_req_res_info, 0},
>  	{"i915_display_info", i915_display_info, 0},
>  	{"i915_shared_dplls_info", i915_shared_dplls_info, 0},
>  	{"i915_dp_mst_info", i915_dp_mst_info, 0}, diff --git
> a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
> index 0023c023f472..8c91d598dc29 100644
> --- a/drivers/gpu/drm/i915/i915_reg.h
> +++ b/drivers/gpu/drm/i915/i915_reg.h
> @@ -12423,4 +12423,14 @@ enum skl_power_gate {
>  #define TGL_ROOT_DEVICE_SKU_ULX		0x2
>  #define TGL_ROOT_DEVICE_SKU_ULT		0x4
> 
> +/*These registers are of functional registers for PM debug request and
> response registers*/
> +#define PM_REQ_DBG_0				_MMIO(0x45284)
> +#define PM_REQ_DBG_1				_MMIO(0x45288)
> +#define PM_RSP_DBG_0				_MMIO(0x4528C)
> +#define   PM_RESP_TTNF_MASK			REG_GENMASK(15,
> 0)
> +#define   PM_RESP_TTNVBI_MASK			REG_GENMASK(31,
> 16)
> +#define PM_RSP_DBG_1				_MMIO(0x45290)
> +#define   PM_RESP_SEL_EXIT_LATENCY_MASK
> 	REG_GENMASK(2, 0)
> +#define   PM_RESP_DC9_READY			REG_BIT(15)
> +
>  #endif /* _I915_REG_H_ */
> --
> 2.30.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2021-01-12 14:37 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-04 10:30 [Intel-gfx] [PATCH v2] drm/i915/debugfs : PM_REQ and PM_RES registers Saichandana S
2021-01-04 11:53 ` [Intel-gfx] ✗ Fi.CI.BUILD: failure for " Patchwork
2021-01-05  5:19 ` [Intel-gfx] [PATCH v2] " Gupta, Anshuman
2021-01-07 17:28 ` Jani Nikula
2021-01-12 13:33 ` [Intel-gfx] [PATCH v3] " Saichandana S
2021-01-12 14:37   ` Gupta, Anshuman [this message]
2021-01-12 16:14 ` [Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/debugfs : PM_REQ and PM_RES registers (rev2) Patchwork
2021-01-12 21:40 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
2021-01-15 13:01 ` [Intel-gfx] [PATCH v4] drm/i915/debugfs : PM_REQ and PM_RES registers Saichandana S
2021-01-15 13:20   ` Chris Wilson
2021-02-05 13:05     ` S, Saichandana
2021-02-05 13:09       ` Chris Wilson
2021-02-09 13:31   ` [Intel-gfx] [PATCH v5] drm/i915/debugfs : PCU " Saichandana S
2021-02-09 14:07     ` Gupta, Anshuman
2021-02-12 13:04     ` Jani Nikula
2021-02-15  5:13       ` Gupta, Anshuman
2021-01-15 17:16 ` [Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/debugfs : PM_REQ and PM_RES registers (rev3) Patchwork
2021-01-15 23:47 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
2021-02-09 17:11 ` [Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/debugfs : PM_REQ and PM_RES registers (rev4) Patchwork
2021-02-09 21:23 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork

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=149dc69fa1104c4d8a9111fb65461e89@intel.com \
    --to=anshuman.gupta@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jani.nikula@intel.com \
    --cc=saichandana.s@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 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.