From: Daniel Vetter Subject: [PATCH] drm/i915: dump adjusted crtc timings Date: Mon, 19 Aug 2013 10:57:21 +0200 Message-ID: <1376902641-24526-1-git-send-email-daniel.vetter@ffwll.ch> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-ea0-f176.google.com (mail-ea0-f176.google.com [209.85.215.176]) by gabe.freedesktop.org (Postfix) with ESMTP id E3E06E5F25 for ; Mon, 19 Aug 2013 01:57:14 -0700 (PDT) Received: by mail-ea0-f176.google.com with SMTP id q16so2100648ead.7 for ; Mon, 19 Aug 2013 01:57:14 -0700 (PDT) List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org To: Intel Graphics Development Cc: Daniel Vetter List-Id: intel-gfx@lists.freedesktop.org I always wondered how the pipe config compare could work with an all-zero mode. Now I've finally realized that we read out the crtc timings, but drm_mode_debug_printmodeline prints out the original mode, which we don't reconstruct. And which is also rather irrelevant when computing the pipe config. So switch over to dumping just the raw hw timings when printing the adjusted mode. Signed-off-by: Daniel Vetter --- drivers/gpu/drm/i915/intel_display.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index be79f47..a4f44f3 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -7738,6 +7738,8 @@ static void intel_dump_pipe_config(struct intel_crtc *crtc, struct intel_crtc_config *pipe_config, const char *context) { + struct drm_display_mode *mode; + DRM_DEBUG_KMS("[CRTC:%d]%s config for pipe %c\n", crtc->base.base.id, context, pipe_name(crtc->pipe)); @@ -7752,8 +7754,15 @@ static void intel_dump_pipe_config(struct intel_crtc *crtc, pipe_config->fdi_m_n.tu); DRM_DEBUG_KMS("requested mode:\n"); drm_mode_debug_printmodeline(&pipe_config->requested_mode); - DRM_DEBUG_KMS("adjusted mode:\n"); - drm_mode_debug_printmodeline(&pipe_config->adjusted_mode); + mode = &pipe_config->adjusted_mode; + DRM_DEBUG_KMS("adjusted mode timings:\n"); + DRM_DEBUG_KMS("adjusted mode timings: %d %d %d %d %d %d %d %d %d " + "0x%x 0x%x\n", + mode->clock, + mode->crtc_hdisplay, mode->crtc_hsync_start, + mode->crtc_hsync_end, mode->crtc_htotal, + mode->crtc_vdisplay, mode->crtc_vsync_start, + mode->crtc_vsync_end, mode->crtc_vtotal, mode->type, mode->flags); 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, -- 1.7.10.4