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@xxxxxxxxx> --- 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@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx