From: Imre Deak <imre.deak@intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: Ben Widawsky <benjamin.widawsky@intel.com>
Subject: [PATCH 3/7] drm/i915: sseu: simplify debugfs status/info printing
Date: Wed, 21 Oct 2015 18:40:33 +0300 [thread overview]
Message-ID: <1445442037-1186-4-git-send-email-imre.deak@intel.com> (raw)
In-Reply-To: <1445442037-1186-1-git-send-email-imre.deak@intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
---
drivers/gpu/drm/i915/i915_debugfs.c | 55 +++++++++++++++++++------------------
1 file changed, 29 insertions(+), 26 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
index de188d0..183c1f2 100644
--- a/drivers/gpu/drm/i915/i915_debugfs.c
+++ b/drivers/gpu/drm/i915/i915_debugfs.c
@@ -5071,6 +5071,33 @@ static void broadwell_sseu_device_status(struct drm_device *dev,
}
}
+static void i915_print_sseu_info(struct seq_file *m, bool is_available_info,
+ const struct sseu_dev_info *sseu)
+{
+ const char *type = is_available_info ? "Available" : "Enabled";
+
+ seq_printf(m, " %s Slice Total: %u\n", type,
+ sseu->slice_total);
+ seq_printf(m, " %s Subslice Total: %u\n", type,
+ sseu->subslice_total);
+ seq_printf(m, " %s Subslice Per Slice: %u\n", type,
+ sseu->subslice_per_slice);
+ seq_printf(m, " %s EU Total: %u\n", type,
+ sseu->eu_total);
+ seq_printf(m, " %s EU Per Subslice: %u\n", type,
+ sseu->eu_per_subslice);
+
+ if (!is_available_info)
+ return;
+
+ seq_printf(m, " Has Slice Power Gating: %s\n",
+ yesno(sseu->has_slice_pg));
+ seq_printf(m, " Has Subslice Power Gating: %s\n",
+ yesno(sseu->has_subslice_pg));
+ seq_printf(m, " Has EU Power Gating: %s\n",
+ yesno(sseu->has_eu_pg));
+}
+
static int i915_sseu_status(struct seq_file *m, void *unused)
{
struct drm_info_node *node = (struct drm_info_node *) m->private;
@@ -5081,22 +5108,7 @@ static int i915_sseu_status(struct seq_file *m, void *unused)
return -ENODEV;
seq_puts(m, "SSEU Device Info\n");
- seq_printf(m, " Available Slice Total: %u\n",
- INTEL_INFO(dev)->sseu.slice_total);
- seq_printf(m, " Available Subslice Total: %u\n",
- INTEL_INFO(dev)->sseu.subslice_total);
- seq_printf(m, " Available Subslice Per Slice: %u\n",
- INTEL_INFO(dev)->sseu.subslice_per_slice);
- seq_printf(m, " Available EU Total: %u\n",
- INTEL_INFO(dev)->sseu.eu_total);
- seq_printf(m, " Available EU Per Subslice: %u\n",
- INTEL_INFO(dev)->sseu.eu_per_subslice);
- seq_printf(m, " Has Slice Power Gating: %s\n",
- yesno(INTEL_INFO(dev)->sseu.has_slice_pg));
- seq_printf(m, " Has Subslice Power Gating: %s\n",
- yesno(INTEL_INFO(dev)->sseu.has_subslice_pg));
- seq_printf(m, " Has EU Power Gating: %s\n",
- yesno(INTEL_INFO(dev)->sseu.has_eu_pg));
+ i915_print_sseu_info(m, true, &INTEL_INFO(dev)->sseu);
seq_puts(m, "SSEU Device Status\n");
memset(&stat, 0, sizeof(stat));
@@ -5107,16 +5119,7 @@ static int i915_sseu_status(struct seq_file *m, void *unused)
} else if (INTEL_INFO(dev)->gen >= 9) {
gen9_sseu_device_status(dev, &stat);
}
- seq_printf(m, " Enabled Slice Total: %u\n",
- stat.slice_total);
- seq_printf(m, " Enabled Subslice Total: %u\n",
- stat.subslice_total);
- seq_printf(m, " Enabled Subslice Per Slice: %u\n",
- stat.subslice_per_slice);
- seq_printf(m, " Enabled EU Total: %u\n",
- stat.eu_total);
- seq_printf(m, " Enabled EU Per Subslice: %u\n",
- stat.eu_per_subslice);
+ i915_print_sseu_info(m, false, &stat);
return 0;
}
--
2.1.4
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2015-10-21 15:41 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-21 15:40 [PATCH 0/7] drm/i915: read out slice/subslice masks Imre Deak
2015-10-21 15:40 ` [PATCH 1/7] drm/i915: sseu: move sseu_dev_status to i915_drv.h Imre Deak
2015-11-19 23:10 ` Ben Widawsky
2015-11-20 0:29 ` Jeff McGee
2015-10-21 15:40 ` [PATCH 2/7] drm/i915: sseu: use sseu_dev_info in device info Imre Deak
2015-11-19 23:18 ` Ben Widawsky
2015-10-21 15:40 ` Imre Deak [this message]
2015-11-19 23:24 ` [PATCH 3/7] drm/i915: sseu: simplify debugfs status/info printing Ben Widawsky
2015-10-21 15:40 ` [PATCH 4/7] drm/i915: sseu: convert slice count field to mask Imre Deak
2015-11-19 23:40 ` Ben Widawsky
2015-11-20 13:00 ` Ville Syrjälä
2015-10-21 15:40 ` [PATCH 5/7] drm/i915: sseu: convert subslice count fields to subslice mask Imre Deak
2015-11-20 0:07 ` Ben Widawsky
2015-10-21 15:40 ` [PATCH 6/7] drm/i915: sseu: add debug printf for slice/subslice masks Imre Deak
2015-10-21 15:40 ` [PATCH 7/7] drm/i915/bdw: sseu: fix sseu status parsing Imre Deak
2015-11-20 0:08 ` Ben Widawsky
2015-10-27 11:45 ` [PATCH 0/7] drm/i915: read out slice/subslice masks Robert Bragg
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=1445442037-1186-4-git-send-email-imre.deak@intel.com \
--to=imre.deak@intel.com \
--cc=benjamin.widawsky@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox