From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: Intel-gfx@lists.freedesktop.org
Subject: [PATCH 4/9] drm/i915: Tidy planes and scaler info in intel_dump_pipe_config
Date: Wed, 27 Apr 2016 11:06:57 +0100 [thread overview]
Message-ID: <1461751622-26927-5-git-send-email-tvrtko.ursulin@linux.intel.com> (raw)
In-Reply-To: <1461751622-26927-1-git-send-email-tvrtko.ursulin@linux.intel.com>
From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
1. Only log scaler data where scalers are supported for
tidier logs.
2. Tidy plane data and fix logging prefix in the middle
of a line.
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
---
drivers/gpu/drm/i915/intel_display.c | 68 +++++++++++++++++++++---------------
1 file changed, 40 insertions(+), 28 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 1362a1270c9f..6d63bc39777c 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -12130,6 +12130,7 @@ static void intel_dump_pipe_config(struct intel_crtc *crtc,
const char *context)
{
struct drm_device *dev = crtc->base.dev;
+ struct drm_i915_private *dev_priv = to_i915(dev);
struct drm_plane *plane;
struct intel_plane *intel_plane;
struct intel_plane_state *state;
@@ -12180,10 +12181,13 @@ static void intel_dump_pipe_config(struct intel_crtc *crtc,
DRM_DEBUG_KMS("port clock: %d\n", pipe_config->port_clock);
DRM_DEBUG_KMS("pipe src size: %dx%d\n",
pipe_config->pipe_src_w, pipe_config->pipe_src_h);
- DRM_DEBUG_KMS("num_scalers: %d, scaler_users: 0x%x, scaler_id: %d\n",
- crtc->num_scalers,
- pipe_config->scaler_state.scaler_users,
- pipe_config->scaler_state.scaler_id);
+
+ if (INTEL_GEN(dev_priv) >= 9)
+ DRM_DEBUG_KMS("num_scalers: %d, scaler_users: 0x%x, scaler_id: %d\n",
+ crtc->num_scalers,
+ pipe_config->scaler_state.scaler_users,
+ pipe_config->scaler_state.scaler_id);
+
DRM_DEBUG_KMS("gmch pfit: control: 0x%08x, ratios: 0x%08x, lvds border: 0x%08x\n",
pipe_config->gmch_pfit.control,
pipe_config->gmch_pfit.pgm_ratios,
@@ -12232,7 +12236,7 @@ static void intel_dump_pipe_config(struct intel_crtc *crtc,
pipe_config->dpll_hw_state.fp1);
}
- DRM_DEBUG_KMS("planes on this crtc\n");
+ DRM_DEBUG_KMS("Planes on this crtc:\n");
list_for_each_entry(plane, &dev->mode_config.plane_list, head) {
intel_plane = to_intel_plane(plane);
if (intel_plane->pipe != crtc->pipe)
@@ -12240,30 +12244,38 @@ static void intel_dump_pipe_config(struct intel_crtc *crtc,
state = to_intel_plane_state(plane->state);
fb = state->base.fb;
- if (!fb) {
- DRM_DEBUG_KMS("%s PLANE:%d plane: %u.%u idx: %d "
- "disabled, scaler_id = %d\n",
- plane->type == DRM_PLANE_TYPE_CURSOR ? "CURSOR" : "STANDARD",
- plane->base.id, intel_plane->pipe,
- (crtc->base.primary == plane) ? 0 : intel_plane->plane + 1,
- drm_plane_index(plane), state->scaler_id);
- continue;
- }
- DRM_DEBUG_KMS("%s PLANE:%d plane: %u.%u idx: %d enabled",
- plane->type == DRM_PLANE_TYPE_CURSOR ? "CURSOR" : "STANDARD",
- plane->base.id, intel_plane->pipe,
- crtc->base.primary == plane ? 0 : intel_plane->plane + 1,
- drm_plane_index(plane));
- DRM_DEBUG_KMS("\tFB:%d, fb = %ux%u format = 0x%x",
- fb->base.id, fb->width, fb->height, fb->pixel_format);
- DRM_DEBUG_KMS("\tscaler:%d src (%u, %u) %ux%u dst (%u, %u) %ux%u\n",
- state->scaler_id,
- state->src.x1 >> 16, state->src.y1 >> 16,
- drm_rect_width(&state->src) >> 16,
- drm_rect_height(&state->src) >> 16,
- state->dst.x1, state->dst.y1,
- drm_rect_width(&state->dst), drm_rect_height(&state->dst));
+ if (fb)
+ DRM_DEBUG_KMS("*");
+ else
+ DRM_DEBUG_KMS(" ");
+
+ if (drm_debug & DRM_UT_KMS)
+ printk("%s plane:%d (%u.%u) idx: %d",
+ plane->type == DRM_PLANE_TYPE_CURSOR ?
+ "cursor" : "standard",
+ plane->base.id, intel_plane->pipe,
+ crtc->base.primary == plane ?
+ 0 : intel_plane->plane + 1,
+ drm_plane_index(plane));
+
+ if (fb && (drm_debug & DRM_UT_KMS))
+ printk(" fb:%d (%ux%u) format=0x%x",
+ fb->base.id, fb->width, fb->height,
+ fb->pixel_format);
+
+ if (INTEL_GEN(dev_priv) >= 9 && (drm_debug & DRM_UT_KMS))
+ printk(" scaler:%d src (%u, %u) %ux%u dst (%u, %u) %ux%u\n",
+ state->scaler_id,
+ state->src.x1 >> 16, state->src.y1 >> 16,
+ drm_rect_width(&state->src) >> 16,
+ drm_rect_height(&state->src) >> 16,
+ state->dst.x1, state->dst.y1,
+ drm_rect_width(&state->dst),
+ drm_rect_height(&state->dst));
+
+ if (fb && (drm_debug & DRM_UT_KMS))
+ printk("\n");
}
}
--
1.9.1
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2016-04-27 10:07 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-27 10:06 [PATCH 0/9] A little bit of KMS debug logging tidy Tvrtko Ursulin
2016-04-27 10:06 ` [PATCH 1/9] drm: Add drm_mode_debug_printmodeline_raw Tvrtko Ursulin
2016-04-27 12:35 ` Jani Nikula
2016-04-27 12:58 ` Tvrtko Ursulin
2016-04-27 10:06 ` [PATCH 2/9] drm: Recognize invalid (all-zero) modes in drm_mode_debug_printmodeline(_raw) Tvrtko Ursulin
2016-04-27 10:06 ` [PATCH 3/9] drm/i915: Compact modes in intel_dump_pipe_config Tvrtko Ursulin
2016-04-27 12:37 ` Jani Nikula
2016-04-27 10:06 ` Tvrtko Ursulin [this message]
2016-04-27 10:06 ` [PATCH 5/9] drm/i915: Compact intel_dump_pipe_config some more Tvrtko Ursulin
2016-04-27 10:06 ` [PATCH 6/9] drm/i915: Log watermark latencies on a single line per plane Tvrtko Ursulin
2016-04-27 10:07 ` [PATCH 7/9] drm/i915: Compact display clock logging Tvrtko Ursulin
2016-04-27 10:07 ` [PATCH 8/9] drm/i915: Print DisplayPort clocks on a single line Tvrtko Ursulin
2016-04-27 10:07 ` [PATCH 9/9] drm: Quiet down drm_mode_getconnector Tvrtko Ursulin
2016-04-28 8:54 ` Daniel Vetter
2016-04-27 10:54 ` [PATCH 0/9] A little bit of KMS debug logging tidy Jani Nikula
2016-04-27 11:26 ` Tvrtko Ursulin
2016-04-27 11:57 ` ✗ Fi.CI.BAT: warning for " Patchwork
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=1461751622-26927-5-git-send-email-tvrtko.ursulin@linux.intel.com \
--to=tvrtko.ursulin@linux.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox