[[Only compile tested] 20/21] drm/i915: Add debugfs dumping for bigjoiner.

Maarten Lankhorst maarten.lankhorst at linux.intel.com
Tue Oct 1 08:03:17 UTC 2019


It's useful to know what the actual clipped state is, rather than
the unclipped crtc properties.

This is useful when a plane is spread across 2 crtc's, where the
slave crtc has no own plane properties but derives its clipped
values from the master crtc.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst at linux.intel.com>
---
 drivers/gpu/drm/i915/i915_debugfs.c | 38 ++++++++++++-----------------
 1 file changed, 15 insertions(+), 23 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
index 7ce3ae1ec586..1f054ff49571 100644
--- a/drivers/gpu/drm/i915/i915_debugfs.c
+++ b/drivers/gpu/drm/i915/i915_debugfs.c
@@ -2664,42 +2664,29 @@ static void intel_plane_info(struct seq_file *m, struct intel_crtc *intel_crtc)
 	struct intel_plane *intel_plane;
 
 	for_each_intel_plane_on_crtc(dev, intel_crtc, intel_plane) {
-		struct drm_plane_state *state;
+		struct intel_plane_state *state;
 		struct drm_plane *plane = &intel_plane->base;
 		struct drm_format_name_buf format_name;
 		char rot_str[48];
 
-		if (!plane->state) {
-			seq_puts(m, "plane->state is NULL!\n");
-			continue;
-		}
-
-		state = plane->state;
+		state = to_intel_plane_state(plane->state);
 
-		if (state->fb) {
-			drm_get_format_name(state->fb->format->format,
+		if (state->hw.fb) {
+			drm_get_format_name(state->hw.fb->format->format,
 					    &format_name);
 		} else {
 			sprintf(format_name.str, "N/A");
 		}
 
-		plane_rotation(rot_str, sizeof(rot_str), state->rotation);
+		plane_rotation(rot_str, sizeof(rot_str), state->hw.rotation);
 
-		seq_printf(m, "\t--Plane id %d: type=%s, crtc_pos=%4dx%4d, crtc_size=%4dx%4d, src_pos=%d.%04ux%d.%04u, src_size=%d.%04ux%d.%04u, format=%s, rotation=%s\n",
+		seq_printf(m, "\t--Plane id %d: type=%s, %s, clipped crtc="DRM_RECT_FMT", clipped src="DRM_RECT_FP_FMT", format=%s, rotation=%s\n",
 			   plane->base.id,
 			   plane_type(intel_plane->base.type),
-			   state->crtc_x, state->crtc_y,
-			   state->crtc_w, state->crtc_h,
-			   (state->src_x >> 16),
-			   ((state->src_x & 0xffff) * 15625) >> 10,
-			   (state->src_y >> 16),
-			   ((state->src_y & 0xffff) * 15625) >> 10,
-			   (state->src_w >> 16),
-			   ((state->src_w & 0xffff) * 15625) >> 10,
-			   (state->src_h >> 16),
-			   ((state->src_h & 0xffff) * 15625) >> 10,
-			   format_name.str,
-			   rot_str);
+			   state->uapi.visible ? "visible" : "hidden",
+			   DRM_RECT_ARG(&state->uapi.dst),
+			   DRM_RECT_FP_ARG(&state->uapi.src),
+			   format_name.str, rot_str);
 	}
 }
 
@@ -2755,6 +2742,11 @@ static int i915_display_info(struct seq_file *m, void *unused)
 			   yesno(pipe_config->hw.active),
 			   pipe_config->pipe_src_w, pipe_config->pipe_src_h,
 			   yesno(pipe_config->dither), pipe_config->pipe_bpp);
+		if (pipe_config->bigjoiner)
+			seq_printf(m, "\tLinked to [CRTC:%d:%s] as a %s\n",
+				   pipe_config->bigjoiner_linked_crtc->base.base.id,
+				   pipe_config->bigjoiner_linked_crtc->base.name,
+				   pipe_config->bigjoiner_slave ? "slave" : "master");
 
 		if (pipe_config->hw.active) {
 			struct intel_plane *cursor =
-- 
2.20.1



More information about the Intel-gfx-trybot mailing list