Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp48165pxb; Tue, 12 Jan 2021 19:39:36 -0800 (PST) X-Google-Smtp-Source: ABdhPJz7eNedDuTajC6N0aaze0wmB2IiopJB5GnMW34hfn3NVlOw++rXh2I6WWr0GPnkq2Iawitn X-Received: by 2002:a17:906:5f97:: with SMTP id a23mr114837eju.128.1610509176408; Tue, 12 Jan 2021 19:39:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610509176; cv=none; d=google.com; s=arc-20160816; b=kvaEpmjg86QWH8fGf/tGo58dm2r/2ISQjcCIo6VKz5FD6s8VlXWeuA4jat5hod5cQE V53QmxlDlrQsh9GbSFitGDnCr00ZOrrhdcifMo4uMacWHT2ukmjqRzqQ9JRVqIaETkG/ AlgH6wQ94bJHeVyrPZKNNEp6RDTDV/CSjE83cNdRgEmUUZ6qcdq9+f4pz/jls65jhevE bIlClA4VSS67ArHDs0xkWHG29Yl1eXsWcZ8f4UOMcadmVsxuLnKkn9YB37NPaKx/NXJa +l2g8NV2Vtw0Vyq6oL/eEjw5vGQxBK2KaU0PBTJONU8N3uE2VIVuy/Ty7eVrNPYAqxTS eytg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:to:from; bh=VzdOF8J+GZRgyyD73mbL6B1kdprEKDDRyev/uww/1pM=; b=WKJOASgDIk/lJtF0lVgpHMHolePLzAqo/FbQqYsV5ts8wFOiL8JSakqgNymz9p6lld ZdJ/e+iZbWxblvV2EEgyppGDnsd7ORPAXb4AO+HqANwDcC6ELxwstTYcsSZcdrRWfMX0 B5FQf8xCjLBv5evZBtucXETkJRVr6lDxjtyLG7oWNdrYLRGQZ0Q2PGytgfwPFRLkcJ6d 31u91ei+atw0i/V1vpIdPoGyby4OZ2v0r3caShDyD5Z/+2lMP5DjCij4kLvxXk1Sp7U6 rOc8qkv5+vOe3rvwD+8VB5vgFOhFn65swH+TXfUuJaGrSkv2FOvSnGjnwu38oS0O/ypu lwuw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x91si366290ede.370.2021.01.12.19.39.13; Tue, 12 Jan 2021 19:39:36 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726377AbhAMBlx (ORCPT + 99 others); Tue, 12 Jan 2021 20:41:53 -0500 Received: from youngberry.canonical.com ([91.189.89.112]:50800 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725888AbhAMBlw (ORCPT ); Tue, 12 Jan 2021 20:41:52 -0500 Received: from mail-pl1-f200.google.com ([209.85.214.200]) by youngberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1kzV9q-0002fM-Ft for linux-kernel@vger.kernel.org; Wed, 13 Jan 2021 01:41:10 +0000 Received: by mail-pl1-f200.google.com with SMTP id w19so228133pll.6 for ; Tue, 12 Jan 2021 17:41:10 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=VzdOF8J+GZRgyyD73mbL6B1kdprEKDDRyev/uww/1pM=; b=ug2SoC3cYvhQeMDeUBEE8XsmvWpmp5c65H0zK42kc7ozkGib4FHZRiASHOAvz9CQoC peYUY/gDbRC37dMyPzpj7OmR7MKMiKbbcvoyC+O3+keoHU/WfnQ06OcbnEUMWYMfW6gz 5B2/kiRK6AHDoEWc6t2KgNQdKHuPpnqZVzEYZlhEPPTEy+olFkLOlHX5jCvprkI/BLeP nceBfnWkswQOFfPhm3t2lvZe62LuQlxBXiDE4KQzSn9OQXpUpuLCOQkDPA45AOXpI1a4 RJCaeWIbiiuZSxlytWU1JKtQnuLwhcViDB0ypS+LBqlXvxdu5XSjgBiIewJxMKllyX8P smmQ== X-Gm-Message-State: AOAM531/quUXDzs9q1DuFFp+FOx672ICBIJ0lNMPj1K9C7wPz+cKtts7 3+2GFtg/n92g9Oe06ayZteyfNq2vuZjYS+tV1+8S+vGnfl41pfkeFJGbxUiko1vihCFlYQpwIUS tQAcIRxxetdm6CoMmCXk1FtVIPOrb7v/pcXmPUzbiJQ== X-Received: by 2002:aa7:9782:0:b029:19e:b084:f0a9 with SMTP id o2-20020aa797820000b029019eb084f0a9mr18582pfp.28.1610502068905; Tue, 12 Jan 2021 17:41:08 -0800 (PST) X-Received: by 2002:aa7:9782:0:b029:19e:b084:f0a9 with SMTP id o2-20020aa797820000b029019eb084f0a9mr18549pfp.28.1610502068269; Tue, 12 Jan 2021 17:41:08 -0800 (PST) Received: from canonical.com (36-229-237-19.dynamic-ip.hinet.net. [36.229.237.19]) by smtp.gmail.com with ESMTPSA id l7sm323837pjy.29.2021.01.12.17.41.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Jan 2021 17:41:07 -0800 (PST) From: Koba Ko To: Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , Lyude Paul , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/2] drm/dp_mst: Retrieve extended DPCD caps for topology manager Date: Wed, 13 Jan 2021 09:41:04 +0800 Message-Id: <20210113014105.28110-1-koba.ko@canonical.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org As per DP-1.3, First check DP_EXTENDED_RECEIVER_CAP_FIELD_PRESENT. If DP_EXTENDED_RECEIVER_CAP_FIELD_PRESENT is 1,read the DP_DP13_DPCD_REV to get the faster capability. If DP_EXTENDED_RECEIVER_CAP_FIELD_PRESENT is 0,read DP_DPCD_REV. Signed-off-by: Koba Ko Reviewed-by: Lyude Paul [added aux name to drm_dbg_kms() call] Signed-off-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/20200922065313.4794-1-koba.ko@canonical.com --- drivers/gpu/drm/drm_dp_mst_topology.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/drm_dp_mst_topology.c b/drivers/gpu/drm/drm_dp_mst_topology.c index 0401b2f47500..6982ecbf30b5 100644 --- a/drivers/gpu/drm/drm_dp_mst_topology.c +++ b/drivers/gpu/drm/drm_dp_mst_topology.c @@ -3686,9 +3686,10 @@ int drm_dp_mst_topology_mgr_set_mst(struct drm_dp_mst_topology_mgr *mgr, bool ms WARN_ON(mgr->mst_primary); /* get dpcd info */ - ret = drm_dp_dpcd_read(mgr->aux, DP_DPCD_REV, mgr->dpcd, DP_RECEIVER_CAP_SIZE); - if (ret != DP_RECEIVER_CAP_SIZE) { - DRM_DEBUG_KMS("failed to read DPCD\n"); + ret = drm_dp_read_dpcd_caps(mgr->aux, mgr->dpcd); + if (ret < 0) { + drm_dbg_kms(mgr->dev, "%s: failed to read DPCD, ret %d\n", + mgr->aux->name, ret); goto out_unlock; } -- 2.25.1