From patchwork Tue Oct 29 13:52:35 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Lipski, Mikita" X-Patchwork-Id: 11217947 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 23CC514DB for ; Tue, 29 Oct 2019 13:53:15 +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 0A08D20862 for ; Tue, 29 Oct 2019 13:53:15 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0A08D20862 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=amd.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 0FAFE6E3BC; Tue, 29 Oct 2019 13:53:01 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from NAM02-BL2-obe.outbound.protection.outlook.com (mail-eopbgr750052.outbound.protection.outlook.com [40.107.75.52]) by gabe.freedesktop.org (Postfix) with ESMTPS id 1AB8F6E3A8; Tue, 29 Oct 2019 13:52:57 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hqB0WyunBLn3Vfv6mczOhpBfZM3fT3/J0Pu+TXRo6iP4zIbyfcUfvAbHyxW3CSKqtAZT6ISErq49Ps71PRUPVuLOx06VlZnFCQjPNCn2+Kh0jvkB/zNVKKJywZsEScYsRLKR+/Egv/CDRXK0mzlxJOredZY4ylGUu0TIaX5xn0a5sdmy0fJQI2epN2BTQp4f0jWfXEwCNsD5cHLBh8LZUMPelIkLo8BTifv/k8oDLPb3GftVXv/HlIKje3CCDY+c89Oa02VBi1qF9llDpGuIlrpKtMw4j4g5qAvhCRT9/FsvL376B1V9zeqduGHJm/FzykO68oOuBGuyTZUi2RVRXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=XtzNhoT5WrJIF43FzY54g/YC8FN7tJzave3qPSMHVEs=; b=mGlt1JQvZtqLu43nJ3g0Z1QFgBIwMUMBAKDsLPu+NuOqkGrsAI++AQ2FIp/ao9n8fRlKneij2tX0GjQCo3DiPLoPHLlZIxzmPe0N4xqXNT2Ffb3P9tOG/xX7FAn1oZIprqm60zGeszjfCUvnqkvSXHpATuAYm7luSFowWIjxFWxosrHGuXnue5UrY6576Pp3cNQD+PI3jIxjf/XRpTDpUJbkWGOw72i1OOYfiJvNluypP9s1tbyE8TwYW962hQFc56HOtvyrFxOURiQIQSU4hfSi4ZE5nSRVg4vKA5EOpfwf6MiQsYhCdxt+CrUQ8Qqgnkp4WOjJnFKiTFei3uDWDg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none (sender ip is 165.204.84.17) smtp.rcpttodomain=lists.freedesktop.org smtp.mailfrom=amd.com; dmarc=permerror action=none header.from=amd.com; dkim=none (message not signed); arc=none Received: from CH2PR12CA0016.namprd12.prod.outlook.com (2603:10b6:610:57::26) by BN7PR12MB2833.namprd12.prod.outlook.com (2603:10b6:408:27::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2387.23; Tue, 29 Oct 2019 13:52:55 +0000 Received: from CO1NAM03FT011.eop-NAM03.prod.protection.outlook.com (2a01:111:f400:7e48::200) by CH2PR12CA0016.outlook.office365.com (2603:10b6:610:57::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.2387.23 via Frontend Transport; Tue, 29 Oct 2019 13:52:55 +0000 Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) Received: from SATLEXMB01.amd.com (165.204.84.17) by CO1NAM03FT011.mail.protection.outlook.com (10.152.80.87) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.2387.20 via Frontend Transport; Tue, 29 Oct 2019 13:52:53 +0000 Received: from SATLEXMB05.amd.com (10.181.40.146) by SATLEXMB01.amd.com (10.181.40.142) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Tue, 29 Oct 2019 08:52:53 -0500 Received: from SATLEXMB01.amd.com (10.181.40.142) by SATLEXMB05.amd.com (10.181.40.146) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Tue, 29 Oct 2019 08:52:52 -0500 Received: from mlipski-pc.amd.com (10.180.168.240) by SATLEXMB01.amd.com (10.181.40.142) with Microsoft SMTP Server id 15.1.1713.5 via Frontend Transport; Tue, 29 Oct 2019 08:52:52 -0500 From: To: Subject: [PATCH 03/13] drm/dp_mst: Parse FEC capability on MST ports Date: Tue, 29 Oct 2019 09:52:35 -0400 Message-ID: <20191029135245.31152-4-mikita.lipski@amd.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191029135245.31152-1-mikita.lipski@amd.com> References: <20191029135245.31152-1-mikita.lipski@amd.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:165.204.84.17; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(4636009)(136003)(346002)(39860400002)(376002)(396003)(428003)(189003)(199004)(6666004)(86362001)(316002)(356004)(2351001)(126002)(2616005)(446003)(36756003)(48376002)(1076003)(50466002)(11346002)(478600001)(486006)(476003)(70206006)(70586007)(4326008)(50226002)(305945005)(81166006)(51416003)(76176011)(6916009)(7696005)(81156014)(5660300002)(26005)(8676002)(53416004)(186003)(47776003)(426003)(336012)(2876002)(54906003)(16586007)(2906002)(8936002)(16060500001); DIR:OUT; SFP:1101; SCL:1; SRVR:BN7PR12MB2833; H:SATLEXMB01.amd.com; FPR:; SPF:None; LANG:en; PTR:InfoDomainNonexistent; MX:3; A:1; X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: dadb6eb6-0377-4ee0-a229-08d75c774bf5 X-MS-TrafficTypeDiagnostic: BN7PR12MB2833: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:4714; X-Forefront-PRVS: 0205EDCD76 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: KlksXGu8P9GI46y5SxT9Iiz0jmDm1TrthXcZukzSyVJfbm7dhv0mQ43k+rCLWGTR0MSuBd4F65OIecBHOUSmf+h7NQqEhqdRDlMbXlZYW8Mtp6t3ubb94HG6+gedqMc57C4LJ6b42OTpD+IyQPRAZg7PfIQOtkhfTg3XHQVU/mk5DjrJnWJ5ltAGFZQXsKPlNvfAZunQ+1e1vs/0hD3A2NkkA3oxXRrGB2Zbw8UCpBDpXbsjsGB6SYhl1CEjHrXyRZ1iwFbe5aj1kGv6OJKd87oGt1w6WSkqfKhWeTWUqmVYqexU4Ow5Q9kXUN8EPTAIDXD1UIuiQ+xH4KaxWsJ3E0HqB6dTrfBIBHFDE5qWBJDP2tkD40c5ZvRfpz1dR6DNbk4v4vZow6PBSumK2x3o6hS2s+givJukpAa5KFAy39xXhh7ng7VPkrka7o5v6D9H X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Oct 2019 13:52:53.9545 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: dadb6eb6-0377-4ee0-a229-08d75c774bf5 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[SATLEXMB01.amd.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN7PR12MB2833 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amdcloud.onmicrosoft.com; s=selector2-amdcloud-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=XtzNhoT5WrJIF43FzY54g/YC8FN7tJzave3qPSMHVEs=; b=RnRATHl41sB5X9/3icvtIRM2Jf8vVwrEhp9757Z0ZiPnulcwN+YuIvCieN9VJoKKEk57JCxbKpPn2y2I7a51j/rAVcH7NIJC3rzXCQZQ7QK/8OPpndDLo9VmjthzS4BupWvqpT2dd8FpfGhx7C0/+fioDRHQWcW2K5a3HxKNky8= X-Mailman-Original-Authentication-Results: spf=none (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; lists.freedesktop.org; dkim=none (message not signed) header.d=none;lists.freedesktop.org; dmarc=permerror action=none header.from=amd.com; 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: , Cc: David Francis , dri-devel@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From: David Francis As of DP1.4, ENUM_PATH_RESOURCES returns a bit indicating if FEC can be supported up to that point in the MST network. The bit is the first byte of the ENUM_PATH_RESOURCES ack reply, bottom-most bit (refer to section 2.11.9.4 of DP standard, v1.4) That value is needed for FEC and DSC support Store it on drm_dp_mst_port Reviewed-by: Lyude Paul Reviewed-by: Harry Wentland Signed-off-by: David Francis --- drivers/gpu/drm/drm_dp_mst_topology.c | 2 ++ include/drm/drm_dp_mst_helper.h | 3 +++ 2 files changed, 5 insertions(+) diff --git a/drivers/gpu/drm/drm_dp_mst_topology.c b/drivers/gpu/drm/drm_dp_mst_topology.c index 3e7b7553cf4d..9f3604355705 100644 --- a/drivers/gpu/drm/drm_dp_mst_topology.c +++ b/drivers/gpu/drm/drm_dp_mst_topology.c @@ -553,6 +553,7 @@ static bool drm_dp_sideband_parse_enum_path_resources_ack(struct drm_dp_sideband { int idx = 1; repmsg->u.path_resources.port_number = (raw->msg[idx] >> 4) & 0xf; + repmsg->u.path_resources.fec_capable = raw->msg[idx] & 0x1; idx++; if (idx > raw->curlen) goto fail_len; @@ -2183,6 +2184,7 @@ static int drm_dp_send_enum_path_resources(struct drm_dp_mst_topology_mgr *mgr, DRM_DEBUG_KMS("enum path resources %d: %d %d\n", txmsg->reply.u.path_resources.port_number, txmsg->reply.u.path_resources.full_payload_bw_number, txmsg->reply.u.path_resources.avail_payload_bw_number); port->available_pbn = txmsg->reply.u.path_resources.avail_payload_bw_number; + port->fec_capable = txmsg->reply.u.path_resources.fec_capable; } } diff --git a/include/drm/drm_dp_mst_helper.h b/include/drm/drm_dp_mst_helper.h index 9116b2c95239..f113ae04fa88 100644 --- a/include/drm/drm_dp_mst_helper.h +++ b/include/drm/drm_dp_mst_helper.h @@ -108,6 +108,8 @@ struct drm_dp_mst_port { * audio-capable. */ bool has_audio; + + bool fec_capable; }; /** @@ -312,6 +314,7 @@ struct drm_dp_port_number_req { struct drm_dp_enum_path_resources_ack_reply { u8 port_number; + bool fec_capable; u16 full_payload_bw_number; u16 avail_payload_bw_number; };