From: Ben Widawsky <benjamin.widawsky@intel.com>
To: Intel GFX <intel-gfx@lists.freedesktop.org>
Cc: Ben Widawsky <ben@bwidawsk.net>,
Ben Widawsky <benjamin.widawsky@intel.com>
Subject: [PATCH 2/2] drm/i915: Add debugfs interface for planes
Date: Wed, 21 Aug 2013 20:15:53 -0700 [thread overview]
Message-ID: <1377141353-11532-2-git-send-email-benjamin.widawsky@intel.com> (raw)
In-Reply-To: <1377141353-11532-1-git-send-email-benjamin.widawsky@intel.com>
This interface can enhanced over time to get more per plane information.
I've just flip counts for now. What I'd like to do with flip counts is
integrate them with existing flip tests. It serves a similar, but more
course purpose to some of the CRC work being done.
Unfortunately, I've been unable to get something going on the test side
thus far because I am inexperienced with the APIs, and don't see a way
to map a crtc to a hardware plane (which is what we have flip counts
for).
Chris, maybe you can do something useful with this?
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
---
drivers/gpu/drm/i915/i915_debugfs.c | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
index 236d97e..1cf0461 100644
--- a/drivers/gpu/drm/i915/i915_debugfs.c
+++ b/drivers/gpu/drm/i915/i915_debugfs.c
@@ -1791,6 +1791,26 @@ static int i915_energy_uJ(struct seq_file *m, void *data)
return 0;
}
+static int i915_plane_info(struct seq_file *m, void *data)
+{
+ struct drm_info_node *node = m->private;
+ struct drm_device *dev = node->minor->dev;
+ struct drm_i915_private *dev_priv = dev->dev_private;
+ uintptr_t plane = (uintptr_t) node->info_ent->data;
+
+ if (INTEL_INFO(dev)->gen < 5 && !INTEL_INFO(dev)->is_g4x)
+ return -ENODEV;
+
+ if (plane >= INTEL_INFO(dev)->num_pipes)
+ return -ENODEV;
+
+ DRM_ERROR("Plane was %p\n", data);
+
+ seq_printf(m, "flip count: %u\n", I915_READ(DSPFLIPCNT(plane)));
+
+ return 0;
+}
+
static int
i915_wedged_get(void *data, u64 *val)
{
@@ -2231,6 +2251,9 @@ static struct drm_info_list i915_debugfs_list[] = {
{"i915_llc", i915_llc, 0},
{"i915_edp_psr_status", i915_edp_psr_status, 0},
{"i915_energy_uJ", i915_energy_uJ, 0},
+ {"i915_plane_a", i915_plane_info, 0, (void *)0},
+ {"i915_plane_b", i915_plane_info, 0, (void *)1},
+ {"i915_plane_c", i915_plane_info, 0, (void *)2},
};
#define I915_DEBUGFS_ENTRIES ARRAY_SIZE(i915_debugfs_list)
--
1.8.3.4
next prev parent reply other threads:[~2013-08-22 2:14 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-22 3:15 [PATCH 1/2] drm/i915: Update plane flip count registers Ben Widawsky
2013-08-22 3:15 ` Ben Widawsky [this message]
2013-08-22 2:16 ` [PATCH 2/2] drm/i915: Add debugfs interface for planes Ben Widawsky
2013-08-22 2:21 ` Chris Wilson
2013-08-22 2:27 ` Ben Widawsky
2013-08-22 2:32 ` Chris Wilson
2013-08-22 3:23 ` [PATCH 2/2] [v2] " Ben Widawsky
2013-08-22 17:18 ` [PATCH 1/2] drm/i915: Update plane flip count registers Ville Syrjälä
2013-08-22 18:12 ` Ben Widawsky
2013-08-22 18:25 ` Ville Syrjälä
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=1377141353-11532-2-git-send-email-benjamin.widawsky@intel.com \
--to=benjamin.widawsky@intel.com \
--cc=ben@bwidawsk.net \
--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