[Intel-gfx] [PATCH 23/24] drm/i915: Add debugfs dumping for bigjoiner, v2.
Maarten Lankhorst
maarten.lankhorst at linux.intel.com
Fri Oct 4 11:35:13 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.
Changes since v1:
- Report planar slaves as such, now that we have the plane_state switch.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst at linux.intel.com>
---
drivers/gpu/drm/i915/i915_debugfs.c | 49 +++++++++++++++--------------
1 file changed, 26 insertions(+), 23 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
index 7ce3ae1ec586..2a7fefdda96f 100644
--- a/drivers/gpu/drm/i915/i915_debugfs.c
+++ b/drivers/gpu/drm/i915/i915_debugfs.c
@@ -2657,6 +2657,17 @@ static void plane_rotation(char *buf, size_t bufsize, unsigned int rotation)
rotation);
}
+static const char *plane_visibility(struct intel_plane_state *plane_state)
+{
+ if (plane_state->uapi.visible)
+ return "visible";
+
+ if (plane_state->planar_slave)
+ return "planar-slave";
+
+ return "hidden";
+}
+
static void intel_plane_info(struct seq_file *m, struct intel_crtc *intel_crtc)
{
struct drm_i915_private *dev_priv = node_to_i915(m->private);
@@ -2664,42 +2675,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);
+ plane_visibility(state),
+ DRM_RECT_ARG(&state->uapi.dst),
+ DRM_RECT_FP_ARG(&state->uapi.src),
+ format_name.str, rot_str);
}
}
@@ -2755,6 +2753,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.23.0
More information about the Intel-gfx
mailing list