All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matt Roper <matthew.d.roper@intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: [RFC 4/4] drm/i915/gen9: Skip debugfs cursor output for universal plane platforms
Date: Wed, 26 Oct 2016 15:51:31 -0700	[thread overview]
Message-ID: <1477522291-10874-5-git-send-email-matthew.d.roper@intel.com> (raw)
In-Reply-To: <1477522291-10874-1-git-send-email-matthew.d.roper@intel.com>

The universal plane acting as a cursor for userspace purposes still
shows up farther down the output so we still have all the important
information.

Refactor the cursor printing out to a new function while we're at it;
the nesting was getting a bit deep.

Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
---
 drivers/gpu/drm/i915/i915_debugfs.c | 26 ++++++++++++++++++--------
 1 file changed, 18 insertions(+), 8 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
index 0bba472..d105777 100644
--- a/drivers/gpu/drm/i915/i915_debugfs.c
+++ b/drivers/gpu/drm/i915/i915_debugfs.c
@@ -3008,6 +3008,23 @@ static bool cursor_position(struct drm_i915_private *dev_priv,
 	return cursor_active(dev_priv, pipe);
 }
 
+static void intel_cursor_info(struct seq_file *m, struct intel_crtc *crtc)
+{
+	struct drm_i915_private *dev_priv = node_to_i915(m->private);
+	bool active;
+	int x, y;
+
+	if (!INTEL_INFO(dev_priv)->has_real_cursor)
+		return;
+
+	active = cursor_position(dev_priv, crtc->pipe, &x, &y);
+	seq_printf(m, "\tcursor visible? %s, position (%d, %d), size %dx%d, addr 0x%08x, active? %s\n",
+		   yesno(crtc->cursor_base),
+		   x, y, crtc->base.cursor->state->crtc_w,
+		   crtc->base.cursor->state->crtc_h,
+		   crtc->cursor_addr, yesno(active));
+}
+
 static const char *plane_type(enum drm_plane_type type)
 {
 	switch (type) {
@@ -3130,9 +3147,7 @@ static int i915_display_info(struct seq_file *m, void *unused)
 	seq_printf(m, "CRTC info\n");
 	seq_printf(m, "---------\n");
 	for_each_intel_crtc(dev, crtc) {
-		bool active;
 		struct intel_crtc_state *pipe_config;
-		int x, y;
 
 		pipe_config = to_intel_crtc_state(crtc->base.state);
 
@@ -3145,12 +3160,7 @@ static int i915_display_info(struct seq_file *m, void *unused)
 		if (pipe_config->base.active) {
 			intel_crtc_info(m, crtc);
 
-			active = cursor_position(dev_priv, crtc->pipe, &x, &y);
-			seq_printf(m, "\tcursor visible? %s, position (%d, %d), size %dx%d, addr 0x%08x, active? %s\n",
-				   yesno(crtc->cursor_base),
-				   x, y, crtc->base.cursor->state->crtc_w,
-				   crtc->base.cursor->state->crtc_h,
-				   crtc->cursor_addr, yesno(active));
+			intel_cursor_info(m, crtc);
 			intel_scaler_info(m, crtc);
 			intel_plane_info(m, crtc);
 		}
-- 
2.1.4

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

  parent reply	other threads:[~2016-10-26 22:53 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-26 22:51 [RFC 0/4] Wire gen9 cursor interface to universal plane registers Matt Roper
2016-10-26 22:51 ` [RFC 1/4] drm/i915: Rename for_each_plane -> for_each_universal_plane Matt Roper
2016-10-28 18:15   ` Paulo Zanoni
2016-10-26 22:51 ` [RFC 2/4] drm/i915: Use macro in place of open-coded for_each_universal_plane loop Matt Roper
2016-10-28 18:17   ` Paulo Zanoni
2016-10-28 18:30     ` Matt Roper
2016-10-26 22:51 ` [RFC 3/4] drm/i915/gen9: Expose top-most universal plane as cursor Matt Roper
2016-10-27 20:03   ` Paulo Zanoni
2016-10-27 21:11     ` Matt Roper
2016-10-27 22:15   ` Lyude Paul
2016-10-27 22:35     ` Matt Roper
2016-10-27 22:55       ` Lyude Paul
2016-10-26 22:51 ` Matt Roper [this message]
2016-10-26 23:16 ` ✓ Fi.CI.BAT: success for Wire gen9 cursor interface to universal plane registers Patchwork
2016-10-27  0:15 ` [RFC 0/4] " Chris Wilson
2016-10-27  0:30   ` Matt Roper
2016-10-27  7:35     ` Daniel Vetter

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=1477522291-10874-5-git-send-email-matthew.d.roper@intel.com \
    --to=matthew.d.roper@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.