All of lore.kernel.org
 help / color / mirror / Atom feed
From: "José Roberto de Souza" <jose.souza@intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Subject: [PATCH v4 5/7] drm/i915/psr: Remove main link standby mode from debugfs
Date: Wed,  3 Oct 2018 13:50:29 -0700	[thread overview]
Message-ID: <20181003205031.32474-5-jose.souza@intel.com> (raw)
In-Reply-To: <20181003205031.32474-1-jose.souza@intel.com>

Main link stand by is only valid for PSR1 as it is not possible to
enable PSR2 and keep main link on but even for PSR1 it is not useful
information and it can be removed without any drawbacks.
But if someone still wants to check that this patch is providing the
full PSR_CTL register value so user can check if bit 27 is set, this
will also expose more information about how PSR1 and PSR2 was
configured in source.

Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Suggested-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
---
 drivers/gpu/drm/i915/i915_debugfs.c | 25 ++++++++++++-------------
 1 file changed, 12 insertions(+), 13 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
index f42e93b71e67..48e65becd035 100644
--- a/drivers/gpu/drm/i915/i915_debugfs.c
+++ b/drivers/gpu/drm/i915/i915_debugfs.c
@@ -2712,8 +2712,8 @@ psr_source_status(struct drm_i915_private *dev_priv, struct seq_file *m)
 static int i915_edp_psr_status(struct seq_file *m, void *data)
 {
 	struct drm_i915_private *dev_priv = node_to_i915(m->private);
-	u32 psrperf = 0;
-	bool enabled = false;
+	u32 val;
+	bool enabled;
 	bool sink_support;
 
 	if (!HAS_PSR(dev_priv))
@@ -2733,24 +2733,23 @@ static int i915_edp_psr_status(struct seq_file *m, void *data)
 	seq_printf(m, "Busy frontbuffer bits: 0x%03x\n",
 		   dev_priv->psr.busy_frontbuffer_bits);
 
-	if (dev_priv->psr.psr2_enabled)
-		enabled = I915_READ(EDP_PSR2_CTL) & EDP_PSR2_ENABLE;
-	else
-		enabled = I915_READ(EDP_PSR_CTL) & EDP_PSR_ENABLE;
-
-	seq_printf(m, "Main link in standby mode: %s\n",
-		   yesno(dev_priv->psr.link_standby));
+	if (dev_priv->psr.psr2_enabled) {
+		val = I915_READ(EDP_PSR2_CTL);
+		enabled = val & EDP_PSR2_ENABLE;
+	} else {
+		val = I915_READ(EDP_PSR_CTL);
+		enabled = val & EDP_PSR_ENABLE;
+	}
 
-	seq_printf(m, "HW Enabled & Active bit: %s\n", yesno(enabled));
+	seq_printf(m, "HW enabled: %s [0x%x]\n", yesno(enabled), val);
 
 	/*
 	 * SKL+ Perf counter is reset to 0 everytime DC state is entered
 	 */
 	if (IS_HASWELL(dev_priv) || IS_BROADWELL(dev_priv)) {
-		psrperf = I915_READ(EDP_PSR_PERF_CNT) &
-			EDP_PSR_PERF_CNT_MASK;
+		val = I915_READ(EDP_PSR_PERF_CNT) & EDP_PSR_PERF_CNT_MASK;
 
-		seq_printf(m, "Performance_Counter: %u\n", psrperf);
+		seq_printf(m, "Performance_Counter: %u\n", val);
 	}
 
 	psr_source_status(dev_priv, m);
-- 
2.19.0

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

  parent reply	other threads:[~2018-10-03 20:50 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-03 20:50 [PATCH v4 1/7] drm/i915/psr: Share PSR and PSR2 exit mask José Roberto de Souza
2018-10-03 20:50 ` [PATCH v4 2/7] drm/i915/psr: Make MASK_DISP_REG_WRITE reserved in PSR_MASK for ICL José Roberto de Souza
2018-10-03 20:50 ` [PATCH v4 3/7] drm/i915/psr: Remove PSR2 TODO error handling José Roberto de Souza
2018-10-03 20:50 ` [PATCH v4 4/7] drm/i915/psr: Use WA to force HW tracking to exit PSR2 José Roberto de Souza
2018-10-03 20:50 ` José Roberto de Souza [this message]
2018-10-03 21:33   ` [PATCH v4 5/7] drm/i915/psr: Remove main link standby mode from debugfs Dhinakaran Pandiyan
2018-10-03 20:50 ` [PATCH v4 6/7] drm/i915/psr: Don't tell sink that main link will be active while is active PSR2 José Roberto de Souza
2018-10-03 21:34   ` Dhinakaran Pandiyan
2018-10-03 20:50 ` [PATCH v4 7/7] drm/i915/psr: Remove alpm from i915_psr José Roberto de Souza
2018-10-03 21:21 ` ✗ Fi.CI.SPARSE: warning for series starting with [v4,1/7] drm/i915/psr: Share PSR and PSR2 exit mask Patchwork
2018-10-03 21:46 ` ✓ Fi.CI.BAT: success " Patchwork
2018-10-04  9:59 ` ✓ 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=20181003205031.32474-5-jose.souza@intel.com \
    --to=jose.souza@intel.com \
    --cc=dhinakaran.pandiyan@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    /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.