From patchwork Thu Nov 17 12:30:08 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tvrtko Ursulin X-Patchwork-Id: 9434211 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 6316C6047D for ; Thu, 17 Nov 2016 12:30:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 54C5129407 for ; Thu, 17 Nov 2016 12:30:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 49B892947A; Thu, 17 Nov 2016 12:30:44 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id F41D229407 for ; Thu, 17 Nov 2016 12:30:43 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 7CAF86E7E3; Thu, 17 Nov 2016 12:30:43 +0000 (UTC) X-Original-To: Intel-gfx@lists.freedesktop.org Delivered-To: Intel-gfx@lists.freedesktop.org Received: from mail-wm0-x243.google.com (mail-wm0-x243.google.com [IPv6:2a00:1450:400c:c09::243]) by gabe.freedesktop.org (Postfix) with ESMTPS id 2FF7089AEB for ; Thu, 17 Nov 2016 12:30:28 +0000 (UTC) Received: by mail-wm0-x243.google.com with SMTP id u144so20778528wmu.0 for ; Thu, 17 Nov 2016 04:30:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ursulin-net.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=JMEwLp28gG5M3C97YErpsMlOECbzVXknIjS0ugJEiLw=; b=rhqkBvR7zqnVl5CqwnvRxTi5BPcpXpewGrWTjnOSegOLIL6srMc6y1CQrczQrd4WcI O9n1vHvBsPVQebPlqr47ShMJHWjzTOxUtg0mc0sdNqaQmEB+B7jYfVv7pauAfFz1CxpU gDv0vhPa0+Euq6SjEeQkIkiTH0jBaDMMB8gHhcG1fgmXj6RXTvIrOM3p1Kpx22jYt5Ql lXSRTtBJA7XxEAPBouffoUDFelGahmy1RSa81NtRylWvIgcwNn+EJlttTwnq56t14e3V PiG6yTXN3SrGKuH11BUAaUhP5jZiEO4/lPrzm3z7CTcC8KTuPkGJMqGnMpGkbryeDDck GGaA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=JMEwLp28gG5M3C97YErpsMlOECbzVXknIjS0ugJEiLw=; b=g3vXklzc/rAUfbCDeeWCRwBS6tRcZbcfIrdhDBq+VG4S89UfzPXWWn6BJP328JGx0l GWakIR2k4GjAGYLERBBLbQTdNxBbQt/L62sA+ExPzuI08v0kOeqzSWVjuMVuUzalRcYk 3nCk47mezk4G1lwfBWNQQ1ThtHOZGrJP9Rtup1xq1SkAunpZjxfoACjP1JZqwU6PjY6f lmG0BYYZE6GvT9Xkc7GrOMuiCLmhJSn8xhZf7BSPLEiMWdHUJ05a4H5ZNbsrQEfbAtfX e5B4mVGkHSkuvMO8AJ+i7L6bzi0TvorPdb0Fcl0YDcHZYHn4DLbQJDx4Bg/08R7EthwS Istg== X-Gm-Message-State: AKaTC02yzuFCWnKtPihB4oTjzZt1K+hK4sePKvq3iy3Mt3k5hgVI9rQTUPjIT+jm4ZgygQ== X-Received: by 10.194.43.73 with SMTP id u9mr1894112wjl.109.1479385826664; Thu, 17 Nov 2016 04:30:26 -0800 (PST) Received: from t460p.Home ([2a02:c7d:9bd6:b000:f37e:1e07:a7d8:46cd]) by smtp.gmail.com with ESMTPSA id vr9sm3014995wjc.35.2016.11.17.04.30.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 17 Nov 2016 04:30:26 -0800 (PST) From: Tvrtko Ursulin X-Google-Original-From: Tvrtko Ursulin To: Intel-gfx@lists.freedesktop.org Date: Thu, 17 Nov 2016 12:30:08 +0000 Message-Id: <1479385814-2358-2-git-send-email-tvrtko.ursulin@linux.intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1479385814-2358-1-git-send-email-tvrtko.ursulin@linux.intel.com> References: <1479385814-2358-1-git-send-email-tvrtko.ursulin@linux.intel.com> Subject: [Intel-gfx] [PATCH 1/7] drm/i915: Extract intel_link_m_n config printing into a helper X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP From: Tvrtko Ursulin And also only dump DP config for crtcs with DP encoders. Signed-off-by: Tvrtko Ursulin --- drivers/gpu/drm/i915/intel_display.c | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index cd5256c0b2d6..2fbc18081f81 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -12733,6 +12733,16 @@ static void intel_dump_crtc_timings(const struct drm_display_mode *mode) mode->crtc_vsync_end, mode->crtc_vtotal, mode->type, mode->flags); } +static inline void +intel_dump_m_n_config(struct intel_crtc_state *pipe_config, char *id, + struct intel_link_m_n *m_n) +{ + DRM_DEBUG_KMS("dp: lanes: %i; %s: gmch_m: %u, gmch_n: %u, link_m: %u, link_n: %u, tu: %u\n", + pipe_config->lane_count, id, + m_n->gmch_m, m_n->gmch_n, + m_n->link_m, m_n->link_n, m_n->tu); +} + static void intel_dump_pipe_config(struct intel_crtc *crtc, struct intel_crtc_state *pipe_config, const char *context) @@ -12757,21 +12767,13 @@ static void intel_dump_pipe_config(struct intel_crtc *crtc, pipe_config->fdi_m_n.gmch_m, pipe_config->fdi_m_n.gmch_n, pipe_config->fdi_m_n.link_m, pipe_config->fdi_m_n.link_n, pipe_config->fdi_m_n.tu); - DRM_DEBUG_KMS("dp: %i, lanes: %i, gmch_m: %u, gmch_n: %u, link_m: %u, link_n: %u, tu: %u\n", - intel_crtc_has_dp_encoder(pipe_config), - pipe_config->lane_count, - pipe_config->dp_m_n.gmch_m, pipe_config->dp_m_n.gmch_n, - pipe_config->dp_m_n.link_m, pipe_config->dp_m_n.link_n, - pipe_config->dp_m_n.tu); - - DRM_DEBUG_KMS("dp: %i, lanes: %i, gmch_m2: %u, gmch_n2: %u, link_m2: %u, link_n2: %u, tu2: %u\n", - intel_crtc_has_dp_encoder(pipe_config), - pipe_config->lane_count, - pipe_config->dp_m2_n2.gmch_m, - pipe_config->dp_m2_n2.gmch_n, - pipe_config->dp_m2_n2.link_m, - pipe_config->dp_m2_n2.link_n, - pipe_config->dp_m2_n2.tu); + + if (intel_crtc_has_dp_encoder(pipe_config)) { + intel_dump_m_n_config(pipe_config, "m_n", + &pipe_config->dp_m_n); + intel_dump_m_n_config(pipe_config, "m2_n2", + &pipe_config->dp_m2_n2); + } DRM_DEBUG_KMS("audio: %i, infoframes: %i\n", pipe_config->has_audio,