From patchwork Thu Nov 7 15:32:01 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Lipski, Mikita" X-Patchwork-Id: 11233201 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 C4EFE16B1 for ; Thu, 7 Nov 2019 15:32:32 +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 ACA78214D8 for ; Thu, 7 Nov 2019 15:32:32 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org ACA78214D8 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 568376E0FD; Thu, 7 Nov 2019 15:32:30 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from NAM03-CO1-obe.outbound.protection.outlook.com (mail-eopbgr790082.outbound.protection.outlook.com [40.107.79.82]) by gabe.freedesktop.org (Postfix) with ESMTPS id DC0F36F700; Thu, 7 Nov 2019 15:32:28 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Xuz3Uq2WHWAoP42W8k7UdGzoX/UxLpCCybjvwokuJcgk3eZpeQljdEOwlDS3B10BEbPq6YZ6Dxh1cTF79bIEz7XRCRO3GhccJW9BQ6ZSUgur3eUIynISlWD2mTLcCOFKzkmWRn1wFllNDex16h8QFbWrAUnLc5kSenNJ7PLe/FfuHKYyZGjJqaxEtXXI1GCaN2hrMMcM9GYjr4HotwhakrUcZ/vqfeUL5s2BoAG0Ime4gMR7FQ23F/pVZI3XcEalgAwkvdywNcSZc00cbtl3BPNpzYzcp37B7hsIXhKqgVOp3vXv8u0dhFoGULJfhjcqm6dVVuU8YZLQ1LLui9biYA== 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=AZAwIXkgbGc0Ng4LmDPo02z7aUrmBNhcXKVW3+qyd2CYJuT9tHxsqUT8WSBrbhRyOtxhElur8cs9Jfr+bZ60LAER7zqhxYnOzOJHIG2EkDoFus5tYPnjzMHP23VN8roG/tm/q8etHFEahEN5b0mmYm+yCXIzf7qTpx2G93y3ZHpiFkHaxi3sQlTPRJUmboUoQW1S6HdcH63UrQv6b0EOu+MOIp8RDNYvXW3ywuvpEr6gSivLYnZAlSFUKiHE8yECZM3Iyp2MH2YUC2nLSm5D2Wc4Gx2YnOfMeEXjPpjqcNn8ZvmVkmN8k6Z5641vLdpD5vwUCF3eTljxa79Vm+O+yQ== 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 MWHPR12CA0038.namprd12.prod.outlook.com (2603:10b6:301:2::24) by CH2PR12MB4103.namprd12.prod.outlook.com (2603:10b6:610:7e::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2430.20; Thu, 7 Nov 2019 15:32:27 +0000 Received: from DM3NAM03FT041.eop-NAM03.prod.protection.outlook.com (2a01:111:f400:7e49::202) by MWHPR12CA0038.outlook.office365.com (2603:10b6:301:2::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2430.20 via Frontend Transport; Thu, 7 Nov 2019 15:32:27 +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 DM3NAM03FT041.mail.protection.outlook.com (10.152.83.207) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.2430.20 via Frontend Transport; Thu, 7 Nov 2019 15:32:26 +0000 Received: from SATLEXMB01.amd.com (10.181.40.142) 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; Thu, 7 Nov 2019 09:32:20 -0600 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; Thu, 7 Nov 2019 09:32:19 -0600 From: To: Subject: [PATCH v6 02/13] drm/dp_mst: Parse FEC capability on MST ports Date: Thu, 7 Nov 2019 10:32:01 -0500 Message-ID: <20191107153212.1145-3-mikita.lipski@amd.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191107153212.1145-1-mikita.lipski@amd.com> References: <20191107153212.1145-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)(979002)(4636009)(396003)(136003)(346002)(376002)(39860400002)(428003)(199004)(189003)(70206006)(54906003)(50466002)(6666004)(86362001)(316002)(51416003)(70586007)(11346002)(8936002)(7696005)(76176011)(47776003)(2876002)(2616005)(50226002)(16586007)(48376002)(486006)(305945005)(5660300002)(4326008)(476003)(126002)(6916009)(1076003)(8676002)(426003)(81166006)(186003)(81156014)(2906002)(53416004)(2351001)(26005)(36756003)(336012)(446003)(450100002)(478600001)(356004)(16060500001)(969003)(989001)(999001)(1009001)(1019001); DIR:OUT; SFP:1101; SCL:1; SRVR:CH2PR12MB4103; H:SATLEXMB01.amd.com; FPR:; SPF:None; LANG:en; PTR:InfoDomainNonexistent; A:1; MX:1; X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 719ae963-7522-4ba1-b1fa-08d76397b1af X-MS-TrafficTypeDiagnostic: CH2PR12MB4103: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:4714; X-Forefront-PRVS: 0214EB3F68 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: BIrgLKiO9PDgadwq247Dn3RGPnjkjtC7be9DkgINzLRSf5M7ie5Yothux9KQXx51EhUzwGOuAjeyj0x7x3+FjwjjqjgChCNWczWAzrBo8FWtZxGfrerPYp/9zgrlRc9DfTYc18+utu0hYhfbl6d1vvrEYOKc4zanSPB8n8NN4PZIuaqYPdKqrTfYeITgG11zGE/EedCNFXlnvr0d5h7wnt5Ca0r6Eqz6EzibCELuBNp9MWyfqWKmDWxGEh4HLMtTMeMY+oz+lglGtAz2jnRgheMJE5YH3g/tLQ73q8A46ohRElLLyhp/R7Y74kuIPedL4mrmmWWAGT9gUEkAp66I+WSLLQO2vs2RzOAphkg/8fFqVEC1fuKsRrXMQ5PhWMHlVVahQo0P5m0wwvX84lu68MePRMMmuVASSlW9OqiSSRBuDYMr1k1c5Y3cwj3gCU2Y X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Nov 2019 15:32:26.7646 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 719ae963-7522-4ba1-b1fa-08d76397b1af 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: CH2PR12MB4103 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=SowS2RKy2FVKp3qA3DB0el1QXYkTVNVtSCLVduPv08ZeiLoyjZZFHKiMgA1giGcvT8bHZvN2TAJ+V0uuBfj0ZfqMkvWfisyuBODYoy4dysBhfuvDHzasK4uBmsTD+wDv1FyaHTl/q9GCfzauxqyyQLkcuQqpDjfB9uXtxkOIIP8= 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; };