Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp2491875ybe; Tue, 3 Sep 2019 13:48:50 -0700 (PDT) X-Google-Smtp-Source: APXvYqyg4lkPuxd0zxgNN6hLB80JHQj0O3Y+EQYEN2ZXjvLuIAOyLFvpWW7K8Ja9BNzvhu+nZL53 X-Received: by 2002:a63:8ac2:: with SMTP id y185mr18049676pgd.11.1567543730787; Tue, 03 Sep 2019 13:48:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567543730; cv=none; d=google.com; s=arc-20160816; b=u45Z4Q7HmnNK7qOxnTM9eLXD3ZtcuDMFW3i+rehW1H2KTRRfoJgg3mvQVcxEnRq6uj m81ExDYAqZee1JdXvseDI+imOrcBpqj6hrjpk3yK/fMLEBCfniEmz2jjmKzzOdyiSBfi l23MS54QI3REmcn4q5odkZtwwnDx0i6T5sk+SZpDE6F2ZzIXCyvyfsDC9FIlyO3DcPt+ US7v15Kr0WpqRywmqqIO6VjbqXlzBxFwK+z5suHkbZann8KYfsvDFqGpqP3fjOpHaJLk mKgkgn5QTWS23qb7SK7MQJwJipS+AKrwE9c39CyQ7waZJdoUi9qPO9QTZt6DHstJvmIm poWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=ovOkp8tMresSNzOT9lC0KxgkVwBBtN/sv3K7NKzAuTU=; b=YYTawo0VJY9ISGw5ld63KY2G6UpMKEia6lhNBHXeKakLY4q6ckl4jDEzh2FlK4+lz8 B1mH1i9st/VM0SMwxGJkPaFSBOAzfmST/lWv1SXrWOPqBJHepyev8aD01Dp9+cEItGES coLcGebGUopAzUq+QfdU7uUMjqDSX27b2h6CA54GzHWbDPuuyRohlwb6yBFpRd/cQF7x AOtEpwcRqwOHDAKZlkq1YNvVeHDc1OjmpKqsmcJOoqOGtDwn3x/du7vCitOx9o9zmDaW Wd8lp5r/VgZ+8cqgsY19nixGWXs59Yn8uHfJliPyjM3KXPqIMq9Nxci2GDXpZ875Ek0i f0Aw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 72si19630821pfx.268.2019.09.03.13.48.34; Tue, 03 Sep 2019 13:48:50 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726894AbfICUrk (ORCPT + 99 others); Tue, 3 Sep 2019 16:47:40 -0400 Received: from mx1.redhat.com ([209.132.183.28]:38014 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726375AbfICUrk (ORCPT ); Tue, 3 Sep 2019 16:47:40 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D2F2510F09; Tue, 3 Sep 2019 20:47:39 +0000 (UTC) Received: from malachite.bss.redhat.com (dhcp-10-20-1-34.bss.redhat.com [10.20.1.34]) by smtp.corp.redhat.com (Postfix) with ESMTP id A13E81001B02; Tue, 3 Sep 2019 20:47:38 +0000 (UTC) From: Lyude Paul To: dri-devel@lists.freedesktop.org, nouveau@lists.freedesktop.org, amd-gfx@lists.freedesktop.org Cc: Juston Li , Imre Deak , =?UTF-8?q?Ville=20Syrj=C3=A4l=C3=A4?= , Harry Wentland , Daniel Vetter , Maarten Lankhorst , Maxime Ripard , Sean Paul , David Airlie , linux-kernel@vger.kernel.org Subject: [PATCH v2 01/27] drm/dp_mst: Move link address dumping into a function Date: Tue, 3 Sep 2019 16:45:39 -0400 Message-Id: <20190903204645.25487-2-lyude@redhat.com> In-Reply-To: <20190903204645.25487-1-lyude@redhat.com> References: <20190903204645.25487-1-lyude@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Tue, 03 Sep 2019 20:47:40 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Makes things easier to read. Cc: Juston Li Cc: Imre Deak Cc: Ville Syrjälä Cc: Harry Wentland Reviewed-by: Daniel Vetter Signed-off-by: Lyude Paul --- drivers/gpu/drm/drm_dp_mst_topology.c | 35 ++++++++++++++++++--------- 1 file changed, 23 insertions(+), 12 deletions(-) diff --git a/drivers/gpu/drm/drm_dp_mst_topology.c b/drivers/gpu/drm/drm_dp_mst_topology.c index 82add736e17d..36db66a0ddb1 100644 --- a/drivers/gpu/drm/drm_dp_mst_topology.c +++ b/drivers/gpu/drm/drm_dp_mst_topology.c @@ -2103,6 +2103,28 @@ static void drm_dp_queue_down_tx(struct drm_dp_mst_topology_mgr *mgr, mutex_unlock(&mgr->qlock); } +static void +drm_dp_dump_link_address(struct drm_dp_link_address_ack_reply *reply) +{ + struct drm_dp_link_addr_reply_port *port_reply; + int i; + + for (i = 0; i < reply->nports; i++) { + port_reply = &reply->ports[i]; + DRM_DEBUG_KMS("port %d: input %d, pdt: %d, pn: %d, dpcd_rev: %02x, mcs: %d, ddps: %d, ldps %d, sdp %d/%d\n", + i, + port_reply->input_port, + port_reply->peer_device_type, + port_reply->port_number, + port_reply->dpcd_revision, + port_reply->mcs, + port_reply->ddps, + port_reply->legacy_device_plug_status, + port_reply->num_sdp_streams, + port_reply->num_sdp_stream_sinks); + } +} + static void drm_dp_send_link_address(struct drm_dp_mst_topology_mgr *mgr, struct drm_dp_mst_branch *mstb) { @@ -2128,18 +2150,7 @@ static void drm_dp_send_link_address(struct drm_dp_mst_topology_mgr *mgr, DRM_DEBUG_KMS("link address nak received\n"); } else { DRM_DEBUG_KMS("link address reply: %d\n", txmsg->reply.u.link_addr.nports); - for (i = 0; i < txmsg->reply.u.link_addr.nports; i++) { - DRM_DEBUG_KMS("port %d: input %d, pdt: %d, pn: %d, dpcd_rev: %02x, mcs: %d, ddps: %d, ldps %d, sdp %d/%d\n", i, - txmsg->reply.u.link_addr.ports[i].input_port, - txmsg->reply.u.link_addr.ports[i].peer_device_type, - txmsg->reply.u.link_addr.ports[i].port_number, - txmsg->reply.u.link_addr.ports[i].dpcd_revision, - txmsg->reply.u.link_addr.ports[i].mcs, - txmsg->reply.u.link_addr.ports[i].ddps, - txmsg->reply.u.link_addr.ports[i].legacy_device_plug_status, - txmsg->reply.u.link_addr.ports[i].num_sdp_streams, - txmsg->reply.u.link_addr.ports[i].num_sdp_stream_sinks); - } + drm_dp_dump_link_address(&txmsg->reply.u.link_addr); drm_dp_check_mstb_guid(mstb, txmsg->reply.u.link_addr.guid); -- 2.21.0