From patchwork Mon Aug 5 12:23:37 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thierry Reding X-Patchwork-Id: 11076703 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 86E1C14DB for ; Mon, 5 Aug 2019 12:24:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 71FB928498 for ; Mon, 5 Aug 2019 12:24:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 60434285AD; Mon, 5 Aug 2019 12:24:11 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED 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 17A872835B for ; Mon, 5 Aug 2019 12:24:11 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 7B7086E426; Mon, 5 Aug 2019 12:24:05 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-ed1-x535.google.com (mail-ed1-x535.google.com [IPv6:2a00:1450:4864:20::535]) by gabe.freedesktop.org (Postfix) with ESMTPS id 2E5B66E421 for ; Mon, 5 Aug 2019 12:24:04 +0000 (UTC) Received: by mail-ed1-x535.google.com with SMTP id p15so78419983eds.8 for ; Mon, 05 Aug 2019 05:24:04 -0700 (PDT) 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=0WT2p9YE2Ashh7/dR+BPduOjzmcm3MtzE5GRVv48sDY=; b=q2nQI71lWROpwepa6ypkSA0Td+DZdN2/Q1/wfyigKVtxceLCO9rU5+ISPqgc966vYF KH2NKyYa5sTQ3yWGqnN2bVNPKbliDkRD2gK9/pvXcLx9I92idza+27eb09IpZWPv1J6g HiJ2uZMR9d/eyBjCnozngMCQGkE01wsEkzFN2GV+zZTq7gPggSUMMszrgOkcRgUjnp8J 6TREA+zmcghGR5+GPmbmVa8X2B6PsnSkiLJyxg2lD6scotgAnRhYo3Bg/vGad2pWC+wY DwWBLJdFiIOuHcysQkvDfma2VcUl+AZMglz3AFAEn2SlsRLnRBKbnLqVVtOrus+5QK7f z44w== X-Gm-Message-State: APjAAAW2gH3n5hAZzRvIxPAtm+bmZb1J93amTiWCZUVh63XOUNvNwuDY 5kYpvIc6mXVRhtHCiQGkQxAELsh8 X-Google-Smtp-Source: APXvYqxcBJjplYItbzC+KpBBaa8LRUMLvMcdBh3cvYSpiqLgCHQ8zOM2WSZ72/VWb0p+ZNWnBUMSzw== X-Received: by 2002:a17:907:20b7:: with SMTP id pw23mr118783650ejb.127.1565007842265; Mon, 05 Aug 2019 05:24:02 -0700 (PDT) Received: from localhost (pD9E51890.dip0.t-ipconnect.de. [217.229.24.144]) by smtp.gmail.com with ESMTPSA id f36sm19886992ede.47.2019.08.05.05.24.01 for (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Mon, 05 Aug 2019 05:24:01 -0700 (PDT) From: Thierry Reding To: dri-devel@lists.freedesktop.org Subject: [PATCH 08/21] drm/dp: Read TPS3 capability from sink Date: Mon, 5 Aug 2019 14:23:37 +0200 Message-Id: <20190805122350.8838-8-thierry.reding@gmail.com> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190805122350.8838-1-thierry.reding@gmail.com> References: <20190805122350.8838-1-thierry.reding@gmail.com> MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=0WT2p9YE2Ashh7/dR+BPduOjzmcm3MtzE5GRVv48sDY=; b=AcoDfwiQXbI38sFW8qyx9PgEvwqCq51IVIwD+w0rWJv93BUAKVryFWVXrfPtULIkHQ P/2rcTBWdBlXNJeBvrkIqrNtQiWDU1W8+zvQYneUroBGtN5Jfqg+pXPB+9O/fkH8BQP7 qMVQNARUBfXTIMTiFixzLwTrXR0G1nPnSldS1LFfysxzskmrsUd635FK9z9m58f8iY9I yllUWOa8KixgU7wE1U/EABpyNl+nKIz4CXw9vhM4oNT2enk5cnm4nQmoIY+qZRk+w4BH F345qwyWdPkOcgV4GQcqiqnMQ6VY4w/iNBgVHyhvcRBlD3187kGXWANTw2Zuo7T8KfMM YU2w== X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Thierry Reding The TPS3 capability can be exposed by DP 1.2 and later sinks if they support the alternative training pattern for channel equalization. Signed-off-by: Thierry Reding --- drivers/gpu/drm/drm_dp_helper.c | 3 +++ include/drm/drm_dp_helper.h | 2 ++ 2 files changed, 5 insertions(+) diff --git a/drivers/gpu/drm/drm_dp_helper.c b/drivers/gpu/drm/drm_dp_helper.c index 74e4fceace7e..c47d78973c1e 100644 --- a/drivers/gpu/drm/drm_dp_helper.c +++ b/drivers/gpu/drm/drm_dp_helper.c @@ -355,6 +355,7 @@ EXPORT_SYMBOL(drm_dp_dpcd_read_link_status); static void drm_dp_link_caps_reset(struct drm_dp_link_caps *caps) { caps->enhanced_framing = false; + caps->tps3_supported = false; caps->fast_training = false; } @@ -362,6 +363,7 @@ void drm_dp_link_caps_copy(struct drm_dp_link_caps *dest, const struct drm_dp_link_caps *src) { dest->enhanced_framing = src->enhanced_framing; + dest->tps3_supported = src->tps3_supported; dest->fast_training = src->fast_training; } EXPORT_SYMBOL(drm_dp_link_caps_copy); @@ -408,6 +410,7 @@ int drm_dp_link_probe(struct drm_dp_aux *aux, struct drm_dp_link *link) link->max_lanes = drm_dp_max_lane_count(values); link->caps.enhanced_framing = drm_dp_enhanced_frame_cap(values); + link->caps.tps3_supported = drm_dp_tps3_supported(values); link->caps.fast_training = drm_dp_fast_training_cap(values); link->rate = link->max_rate; diff --git a/include/drm/drm_dp_helper.h b/include/drm/drm_dp_helper.h index c148f5685195..ab98ebb302a9 100644 --- a/include/drm/drm_dp_helper.h +++ b/include/drm/drm_dp_helper.h @@ -1369,10 +1369,12 @@ int drm_dp_dpcd_read_link_status(struct drm_dp_aux *aux, /** * struct drm_dp_link_caps - DP link capabilities * @enhanced_framing: enhanced framing capability (mandatory as of DP 1.2) + * @tps3_supported: training pattern sequence 3 supported for equalization * @fast_training: AUX CH handshake not required for link training */ struct drm_dp_link_caps { bool enhanced_framing; + bool tps3_supported; bool fast_training; };