From patchwork Wed Sep 18 20:26:42 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Lipski, Mikita" X-Patchwork-Id: 11151227 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 C116C76 for ; Wed, 18 Sep 2019 20:27:55 +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 A7E6221920 for ; Wed, 18 Sep 2019 20:27:55 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A7E6221920 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 6340372AF7; Wed, 18 Sep 2019 20:27:32 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-eopbgr770042.outbound.protection.outlook.com [40.107.77.42]) by gabe.freedesktop.org (Postfix) with ESMTPS id D732D72AEE; Wed, 18 Sep 2019 20:27:28 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TbfadiBKojBuCF+Gx2rhGaI3N1jaO1N/HAC+SvEPaBz+fCanESnsFdwuc7nAK/cYQKyEoXy7Yc04dOiQt8255QEX7vaLJeeT2DPmAeca8lC6Jn1unEDwx14ETo2HFWodgKaHGXMyIiDN7uUoqg2flUmd2DROC6ZjanD1aK7KEbt11+EhVmsy8GLnVcG1XE/XZnHiEpSlsJQ1/UcKOYL5K3nJ24Te7KV6V9onvywh3K43MQiy0P1mBgs1K/htxwJ2Qs2HfTbpK7PcYS3pn56oMyivl3erMk6Js3+bvv78ORgu373QT9rV6ZbnqxRPdLxPII9pt3WEr3aarlshSkcM2w== 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=Lrh29AEkJ/mggpT9P2l7JbxweS7c+As3RT5m+hQBVo4=; b=l1cZN+PwcJiaK/5tW9wJY1rP6kUHpadi1TpLBK4COqGHQOHXhRvHrP5hO86xNPqznLMZLjzKBPB9fRrkNZU3bJl0lb78XOJlvcKXW1eDU3fTD8oBKgDbAT3NqHfETytzttOd1+J5uraCC1oHTVU2xtNk/ud1oi5YOQg7s473Ql4vWlXg+CTTZJlJAFeMlh8cSupZrwfkGuNggH3GM28RKLWworhAskX+F3tp7YbU924J7//d7AOhTXa7wk91xGMeZN9vdP+bZAwxxKhYKQHvLGhAGzIYicdZjRak2CZEzdvZgCMksdqX4wXObcUoWGIk9hKRsDbw+3uFZVx+MWvg5A== 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 CH2PR12CA0006.namprd12.prod.outlook.com (2603:10b6:610:57::16) by BYAPR12MB2888.namprd12.prod.outlook.com (2603:10b6:a03:12e::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2263.13; Wed, 18 Sep 2019 20:27:25 +0000 Received: from DM3NAM03FT014.eop-NAM03.prod.protection.outlook.com (2a01:111:f400:7e49::204) by CH2PR12CA0006.outlook.office365.com (2603:10b6:610:57::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2284.20 via Frontend Transport; Wed, 18 Sep 2019 20:27:25 +0000 Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) Received: from SATLEXCHOV01.amd.com (165.204.84.17) by DM3NAM03FT014.mail.protection.outlook.com (10.152.82.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.2263.14 via Frontend Transport; Wed, 18 Sep 2019 20:27:25 +0000 Received: from mlipski-pc.amd.com (10.180.168.240) by SATLEXCHOV01.amd.com (10.181.40.71) with Microsoft SMTP Server id 14.3.389.1; Wed, 18 Sep 2019 15:27:23 -0500 From: To: Subject: [PATCH 05/15] drm/dp_mst: Parse FEC capability on MST ports Date: Wed, 18 Sep 2019 16:26:42 -0400 Message-ID: <071f8700dd6cf2ba21c36bcd7a50f407153b6929.1568833906.git.mikita.lipski@amd.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: References: 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)(39860400002)(346002)(376002)(396003)(428003)(199004)(189003)(53416004)(476003)(86362001)(8676002)(50466002)(16586007)(47776003)(76176011)(36756003)(118296001)(51416003)(48376002)(2876002)(7696005)(316002)(305945005)(54906003)(5660300002)(478600001)(2351001)(6666004)(356004)(70586007)(2906002)(6916009)(186003)(126002)(50226002)(11346002)(486006)(81166006)(426003)(81156014)(26005)(336012)(2616005)(8936002)(450100002)(4326008)(70206006)(446003)(16060500001); DIR:OUT; SFP:1101; SCL:1; SRVR:BYAPR12MB2888; H:SATLEXCHOV01.amd.com; FPR:; SPF:None; LANG:en; PTR:InfoDomainNonexistent; A:1; MX:1; X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: ff66a73a-8f12-4095-f6f9-08d73c769e0e X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(5600167)(711020)(4605104)(1401327)(4618075)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328); SRVR:BYAPR12MB2888; X-MS-TrafficTypeDiagnostic: BYAPR12MB2888: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:4714; X-Forefront-PRVS: 01644DCF4A X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Message-Info: TEDzc3FYxc0pgaLxPj7vY85knF+SPhxjsLT+CAPYsLrIHYae4650kw1nGvvjG9OlFxDFYGz8WQnwAR73C59w9oaReacpRVu9ZjU8OVzU72CTFuGdeOhHTtc5e/Aii6IZkvRav7b8PpVhBQYc8aL91RiHba72a1lEjnzhydnZA/KQ7K6gWu88bzjRoH6Uzxi87xTf1p+8fjaDNiDqcBo8FuyjyQyu+2kBBd4aGrUFKXcImEvw6D7eEOeyju1v4YyrLfP5yKCjMZxanhVdGGo80eXZYjOukdZSTYFaNyPVwPb3imyMWmOOeDpxfZkVwzT7Cw/Exn0JYsgpriDKkvmbfHRwxa9LQO2iPOw72HSPRpOvLhRT9f0asgqJSkFOlfo/hhDB8J7vwdGe7wioa1XjRT6oQWBGss6eiOcF//3q4hU= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Sep 2019 20:27:25.0792 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ff66a73a-8f12-4095-f6f9-08d73c769e0e 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=[SATLEXCHOV01.amd.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR12MB2888 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=Lrh29AEkJ/mggpT9P2l7JbxweS7c+As3RT5m+hQBVo4=; b=eo9AjbjRu2LPLed3BxiJJwMtLFIfI0OS1CKl/K+fjTVLM9VkRORH2OP1xUX8bgET3t+qt0JouzpFs+xP2oG7ZMxfZcqbSdXuVP1jo2yyu3+g2xNVnN0NPTPeVKrW5lEz8fpFEDR6YdLXGu8vRnGsW8I6f5SYEye/viuso4IKAAM= 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 Signed-off-by: David Francis Reviewed-by: Lyude Paul Reviewed-by: Harry Wentland --- 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 659099366f8b..c1a7ddfdc4bd 100644 --- a/drivers/gpu/drm/drm_dp_mst_topology.c +++ b/drivers/gpu/drm/drm_dp_mst_topology.c @@ -552,6 +552,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; @@ -2180,6 +2181,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; };