intel-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Anshuman Gupta <anshuman.gupta@intel.com>
To: Lucas De Marchi <lucas.demarchi@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 21/22] drm/i915/tgl: Add and use new DC5 and DC6 residency counter registers
Date: Thu, 18 Jul 2019 11:17:03 +0530	[thread overview]
Message-ID: <20190718054703.GA6676@intel.com> (raw)
In-Reply-To: <20190713010940.17711-22-lucas.demarchi@intel.com>

On 2019-07-12 at 18:09:39 -0700, Lucas De Marchi wrote:
> From: José Roberto de Souza <jose.souza@intel.com>
> 
> Tiger Lask has a new register offset for DC5 and DC6 residency counters.
> 
> Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
> Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
> ---
>  drivers/gpu/drm/i915/i915_debugfs.c | 21 +++++++++++++--------
>  drivers/gpu/drm/i915/i915_reg.h     |  2 ++
>  2 files changed, 15 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
> index a1843e3de6d7..4b12b5588dd6 100644
> --- a/drivers/gpu/drm/i915/i915_debugfs.c
> +++ b/drivers/gpu/drm/i915/i915_debugfs.c
> @@ -2465,6 +2465,7 @@ static int i915_dmc_info(struct seq_file *m, void *unused)
>  	struct drm_i915_private *dev_priv = node_to_i915(m->private);
>  	intel_wakeref_t wakeref;
>  	struct intel_csr *csr;
> +	i915_reg_t dc5_reg, dc6_reg = {};
>  
>  	if (!HAS_CSR(dev_priv))
>  		return -ENODEV;
> @@ -2482,15 +2483,19 @@ static int i915_dmc_info(struct seq_file *m, void *unused)
>  	seq_printf(m, "version: %d.%d\n", CSR_VERSION_MAJOR(csr->version),
>  		   CSR_VERSION_MINOR(csr->version));
>  
> -	if (WARN_ON(INTEL_GEN(dev_priv) > 11))
> -		goto out;
> +	if (INTEL_GEN(dev_priv) >= 12) {
> +		dc5_reg = TGL_CSR_DC5_RES_COUNT;
> +		dc6_reg = TGL_CSR_DC6_RES_COUNT;
> +	} else {
> +		dc5_reg = IS_BROXTON(dev_priv) ? BXT_CSR_DC3_DC5_COUNT :
> +						 SKL_CSR_DC3_DC5_COUNT;
> +		if (!IS_GEN9_LP(dev_priv))
> +			dc6_reg = SKL_CSR_DC5_DC6_COUNT;
> +	}
>  
> -	seq_printf(m, "DC3 -> DC5 count: %d\n",
> -		   I915_READ(IS_BROXTON(dev_priv) ? BXT_CSR_DC3_DC5_COUNT :
> -						    SKL_CSR_DC3_DC5_COUNT));
> -	if (!IS_GEN9_LP(dev_priv))
> -		seq_printf(m, "DC5 -> DC6 count: %d\n",
> -			   I915_READ(SKL_CSR_DC5_DC6_COUNT));
> +	seq_printf(m, "DC3 -> DC5 count: %d\n", I915_READ(dc5_reg));
> +	if (dc6_reg.reg)
> +		seq_printf(m, "DC5 -> DC6 count: %d\n", I915_READ(dc6_reg));
>  
>  out:
>  	seq_printf(m, "program base: 0x%08x\n", I915_READ(CSR_PROGRAM(0)));
> diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
> index 6cfcdf6bb1bb..5e3434cdd1e8 100644
> --- a/drivers/gpu/drm/i915/i915_reg.h
> +++ b/drivers/gpu/drm/i915/i915_reg.h
> @@ -7269,6 +7269,8 @@ enum {
>  #define SKL_CSR_DC3_DC5_COUNT	_MMIO(0x80030)
>  #define SKL_CSR_DC5_DC6_COUNT	_MMIO(0x8002C)
>  #define BXT_CSR_DC3_DC5_COUNT	_MMIO(0x80038)
> +#define TGL_CSR_DC5_RES_COUNT	_MMIO(0x101084)
> +#define TGL_CSR_DC6_RES_COUNT	_MMIO(0x101088)
CSR memory ranges from 0x80000 till 0x8ffff
These DMC_DEBUG regisers are not are not CSR register.
It would make sense to rename the macro.
>  
>  /* interrupts */
>  #define DE_MASTER_IRQ_CONTROL   (1 << 31)
> -- 
> 2.21.0
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2019-07-18  5:51 UTC|newest]

Thread overview: 64+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-13  1:09 [PATCH 00/22] Tiger Lake part 2 Lucas De Marchi
2019-07-13  1:09 ` [PATCH 01/22] drm/i915/tgl: skip setting PORT_CL_DW12_* on initialization Lucas De Marchi
2019-07-18 20:35   ` Atwood, Matthew S
2019-07-13  1:09 ` [PATCH 02/22] drm/i915/tgl: select correct bit for port select Lucas De Marchi
2019-07-16 21:37   ` Srivatsa, Anusha
2019-07-18 20:20   ` Atwood, Matthew S
2019-07-13  1:09 ` [PATCH 03/22] drm/i915/tgl: update ddi/tc clock_off bits Lucas De Marchi
2019-07-16 22:41   ` Srivatsa, Anusha
2019-07-18 21:09   ` Atwood, Matthew S
2019-07-13  1:09 ` [PATCH 04/22] drm/i915/tgl: Add hpd interrupt handling Lucas De Marchi
2019-07-19 13:47   ` Ville Syrjälä
2019-07-19 16:45     ` Lucas De Marchi
2019-07-19 17:08       ` Ville Syrjälä
2019-07-19 17:14         ` Ville Syrjälä
2019-07-19 17:28           ` Lucas De Marchi
2019-07-13  1:09 ` [PATCH 05/22] drm/i915/tgl: Update north display hotplug detection to TGL connections Lucas De Marchi
2019-07-16 23:09   ` Srivatsa, Anusha
2019-07-13  1:09 ` [PATCH 06/22] drm/i915/tgl: handle DP aux interrupts Lucas De Marchi
2019-07-17  0:14   ` Srivatsa, Anusha
2019-07-13  1:09 ` [PATCH 07/22] drm/i915/dmc: Load DMC on TGL Lucas De Marchi
2019-07-19 10:44   ` Anshuman Gupta
2019-07-19 15:34     ` Lucas De Marchi
2019-07-19 16:05   ` Atwood, Matthew S
2019-07-13  1:09 ` [PATCH 08/22] drm/i915/tgl: Add DKL phy pll registers Lucas De Marchi
2019-07-19 21:22   ` Atwood, Matthew S
2019-07-13  1:09 ` [PATCH 09/22] drm/i915/tgl: re-indent code to prepare for DKL changes Lucas De Marchi
2019-07-22 22:31   ` Atwood, Matthew S
2019-07-13  1:09 ` [PATCH 10/22] drm/i915/tgl: Add DKL phy pll state calculations Lucas De Marchi
2019-07-13  1:09 ` [PATCH 11/22] drm/i915/tgl: start adding the DKL PLLs to use on TC ports Lucas De Marchi
2019-07-13  1:09 ` [PATCH 12/22] drm/i915/tgl: Add support for dkl pll write Lucas De Marchi
2019-07-13  1:09 ` [PATCH 13/22] drm/i915/gen12: add support for reading the timestamp frequency Lucas De Marchi
2019-07-13  1:09 ` [PATCH 14/22] drm/i915/tgl: allow the reg_read ioctl to read the RCS TIMESTAMP register Lucas De Marchi
2019-07-13  1:09 ` [PATCH 15/22] drm/i915/tgl: Introduce initial Tigerlake Workarounds Lucas De Marchi
2019-07-13  1:09 ` [PATCH 16/22] drm/i915/tgl: Implement Wa_1604555607 Lucas De Marchi
2019-07-18  6:03   ` Tvrtko Ursulin
2019-07-19 17:41     ` Lucas De Marchi
2019-07-13  1:09 ` [PATCH 17/22] drm/i915/tgl: Implement Wa_1406941453 Lucas De Marchi
2019-07-23 16:35   ` Summers, Stuart
2019-07-13  1:09 ` [PATCH 18/22] drm/i915/tgl: Define MOCS entries for Tigerlake Lucas De Marchi
2019-07-18 13:08   ` Ville Syrjälä
2019-07-18 17:09     ` Daniele Ceraolo Spurio
2019-07-18 17:44       ` Ville Syrjälä
2019-07-24 22:32       ` Lucas De Marchi
2019-07-25 18:26         ` Lis, Tomasz
2019-07-13  1:09 ` [PATCH 19/22] drm/i915/tgl: Tigerlake only has global MOCS registers Lucas De Marchi
2019-07-18 17:40   ` Daniele Ceraolo Spurio
2019-07-19 19:42     ` Lucas De Marchi
2019-07-13  1:09 ` [PATCH 20/22] drm/i915: Move MOCS setup to intel_mocs.c Lucas De Marchi
2019-07-23 16:30   ` Summers, Stuart
2019-07-13  1:09 ` [PATCH 21/22] drm/i915/tgl: Add and use new DC5 and DC6 residency counter registers Lucas De Marchi
2019-07-18  5:47   ` Anshuman Gupta [this message]
2019-07-19 15:58     ` Atwood, Matthew S
2019-07-19 18:39     ` Lucas De Marchi
2019-07-22  7:41       ` Anshuman Gupta
2019-07-22 17:40         ` Lucas De Marchi
2019-07-13  1:09 ` [PATCH 22/22] drm/i915/mst: Do not hardcoded the crtcs that encoder can connect Lucas De Marchi
2019-07-18 13:10   ` Ville Syrjälä
2019-08-15 17:41     ` James Ausmus
2019-07-13  1:19 ` ✗ Fi.CI.CHECKPATCH: warning for Tiger Lake part 2 Patchwork
2019-07-13  1:38 ` ✓ Fi.CI.BAT: success " Patchwork
2019-07-14 20:26 ` ✗ Fi.CI.IGT: failure " Patchwork
2019-07-15 22:32 ` ✗ Fi.CI.CHECKPATCH: warning for Tiger Lake part 2 (rev2) Patchwork
2019-07-15 22:55 ` ✓ Fi.CI.BAT: success " Patchwork
2019-07-16  0:02 ` ✗ Fi.CI.IGT: failure " 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=20190718054703.GA6676@intel.com \
    --to=anshuman.gupta@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=lucas.demarchi@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;
as well as URLs for NNTP newsgroup(s).