From patchwork Mon Sep 2 11:31:08 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thierry Reding X-Patchwork-Id: 11126441 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2951E14F7 for ; Mon, 2 Sep 2019 11:31:45 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1152A21883 for ; Mon, 2 Sep 2019 11:31:45 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1152A21883 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2BBA189A34; Mon, 2 Sep 2019 11:31:44 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wm1-x343.google.com (mail-wm1-x343.google.com [IPv6:2a00:1450:4864:20::343]) by gabe.freedesktop.org (Postfix) with ESMTPS id A9C0689AF3 for ; Mon, 2 Sep 2019 11:31:42 +0000 (UTC) Received: by mail-wm1-x343.google.com with SMTP id k2so12748962wmj.4 for ; Mon, 02 Sep 2019 04:31:42 -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:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=0WT2p9YE2Ashh7/dR+BPduOjzmcm3MtzE5GRVv48sDY=; b=d2IiBfL9I5gI6SyVPFr5W4TmIBg1Xp6SxWEkX8/tjEXnqBbCnnOQuacC5oQIUKKvPL AdKwJTVAr10S6lMdTOrFTbzp5eLOw6yTqr/LFh8Qo+E7e6WAJygd3BL8Qrgv+fCSPmbn 4sAkMQv+CduwhSojXKgVtMEdZBdDLi3V+sKbcbbmzkh/QK3dY1jv4tRSrJekxo6bYTJj 20plU538a34HSUe0TpAsR2rkJrni5lDoBbQYX0AsEXD71OkO6yGDhEWlORycoGiwAMgG hKdSUoQtygnW0+Z8XdazermgLClunogYLMezN5Tq2FmJMQIhDeNFchy/9Qlg/AExZHOq mqag== X-Gm-Message-State: APjAAAWcGZImj5drw5CSgJI9dx9F+bbsnHmciJUoNbD69JbULYI6QYht +WGcECU5rnMafYYI/ejEpWeZA12K X-Google-Smtp-Source: APXvYqw3P36G8YH4dc4iNAyanEri3nHU9fwqCeVO3+OTFAukQRE+o6f1haizIWp/Gs+6Pb+0BQeUtQ== X-Received: by 2002:a1c:6c09:: with SMTP id h9mr1017258wmc.36.1567423900866; Mon, 02 Sep 2019 04:31:40 -0700 (PDT) Received: from localhost (pD9E51890.dip0.t-ipconnect.de. [217.229.24.144]) by smtp.gmail.com with ESMTPSA id m3sm11808970wmc.44.2019.09.02.04.31.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Sep 2019 04:31:39 -0700 (PDT) From: Thierry Reding To: dri-devel@lists.freedesktop.org Subject: [PATCH v2 08/21] drm/dp: Read TPS3 capability from sink Date: Mon, 2 Sep 2019 13:31:08 +0200 Message-Id: <20190902113121.31323-9-thierry.reding@gmail.com> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190902113121.31323-1-thierry.reding@gmail.com> References: <20190902113121.31323-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:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=0WT2p9YE2Ashh7/dR+BPduOjzmcm3MtzE5GRVv48sDY=; b=l0nxk0Xpc13UhXx85TjdQwWldMLfsxgvtjmDwPU4Ru17HVpwq48kMQIo2sPjwuN8rN V73jB0WwlAPWwOAN1RWP+V4oP+lZjOKmm2xirSVnsR1YbSUZZRjfBPKJT/kpoKifWOva xcgRCuJUIVKhBtVlbV/kdHgYbZw9FRbHfBShFfTMwcoliQmyG5FKDvnvbcPPkxDEV/ID 5gX9JFb+b0TSp8WRdX/a8nLfZq+j4oQTG+WEdyDZCZS1JzmkxF7OEojmKzFrjSd0i8Xt VLnk8wESksdlNJQzBmo4ABhjFPXz28Vn8GWk3e4ZqMwR1qqU1YXNs2qiYQxlgLK7mIF/ 7KVA== 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" 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; };