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.lankho...@linux.intel.com>
---
 drivers/gpu/drm/i915/i915_debugfs.c | 40 ++++++++++++-----------------
 1 file changed, 17 insertions(+), 23 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_debugfs.c 
b/drivers/gpu/drm/i915/i915_debugfs.c
index 1c4c3972fd23..c3d12ab37cad 100644
--- a/drivers/gpu/drm/i915/i915_debugfs.c
+++ b/drivers/gpu/drm/i915/i915_debugfs.c
@@ -2661,42 +2661,31 @@ 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->base.fb) {
+                       drm_get_format_name(state->base.fb->format->format,
                                            &format_name);
+               } else if (state->bigjoiner_slave) {
+                       sprintf(format_name.str, "(slave)");
                } else {
                        sprintf(format_name.str, "N/A");
                }
 
-               plane_rotation(rot_str, sizeof(rot_str), state->rotation);
+               plane_rotation(rot_str, sizeof(rot_str), state->base.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, %sclipped 
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->base.visible ? "visible, " : "",
+                          DRM_RECT_ARG(&state->base.dst),
+                          DRM_RECT_FP_ARG(&state->base.src),
+                          format_name.str, rot_str);
        }
 }
 
@@ -2752,6 +2741,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

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

Reply via email to