From patchwork Sat Nov 16 22:01:13 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Lipski, Mikita" X-Patchwork-Id: 11247743 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 92008913 for ; Sat, 16 Nov 2019 22:01:52 +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 7934D2071E for ; Sat, 16 Nov 2019 22:01:52 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7934D2071E 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 85FEE6E1B9; Sat, 16 Nov 2019 22:01:40 +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-eopbgr770084.outbound.protection.outlook.com [40.107.77.84]) by gabe.freedesktop.org (Postfix) with ESMTPS id 1ED166E054; Sat, 16 Nov 2019 22:01:37 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XFURTdqsfYNbRZAzf1eQ0/fE9U6As15+TD0DQbSgudUM+EKHlJAtHAwU+wjM50GSTrIjqHCYmeIlg5IC9A6ucx7Wps0eIZ3sHRVMm2f3JFKfgzZDIyFMILhnFtWC2xtFbBkTs4w01Rfn+lR3W5OlA6VBB9ykUaXNtC0h/0lzlT3tJ8sutFDp2PWISPYinpYAuPYGD7da4UmxFwVDpW2ANPQHkftqwDp4M0c8NZ+G3QZjdJ9OJPFDGjZrwPg6hEmSxbGan01QggbbPg28EDfgDBxPp7Xoftn3EOvlVS0bQAwx3nisrnugrF0POXC4mmBxWS4wiL6ARUQvWW7rsVF69w== 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=dNdUTtKZ1sW/55VPQ2xKYe/Mh8euES9APb8qlqbgb50=; b=Uu1/DylnCkhEUxZenzdIm3Yjc/FEhhby7O4qSxtOqzaYBb9dL0zcxzboTrXrRYrCZi1aOukr/MzylY4/phBwZz0uwBVG8HswjKOq6Yht+R84SbzkD6+3DNX+JjxxM6K0AXqcBFw7USrJjMPTAdL6N/TtnCuPAz38z5Rm3a0WpPWX1gD6nBKdB/PlVhOW4AOfV1j3RqflkrO7qAfW9nrgWtULg0KAYnnQNCaKQUlc26egQbCe0o1ogfWvms4DJ9QHYcnJpDoMZCwmCz2K/g4RoRkMNpdVsQhBgsggoU7oJHMZbviPRRVpFwfPoj1Ox8K6IQQES/SD4BpG0reCVi9FdQ== 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 CY4PR1201CA0007.namprd12.prod.outlook.com (2603:10b6:910:16::17) by BY5PR12MB4066.namprd12.prod.outlook.com (2603:10b6:a03:207::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2451.23; Sat, 16 Nov 2019 22:01:34 +0000 Received: from CO1NAM11FT025.eop-nam11.prod.protection.outlook.com (2a01:111:f400:7eab::204) by CY4PR1201CA0007.outlook.office365.com (2603:10b6:910:16::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2451.23 via Frontend Transport; Sat, 16 Nov 2019 22:01:34 +0000 Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) Received: from SATLEXMB02.amd.com (165.204.84.17) by CO1NAM11FT025.mail.protection.outlook.com (10.13.175.232) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.2451.23 via Frontend Transport; Sat, 16 Nov 2019 22:01:33 +0000 Received: from SATLEXMB01.amd.com (10.181.40.142) by SATLEXMB02.amd.com (10.181.40.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Sat, 16 Nov 2019 16:01:32 -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; Sat, 16 Nov 2019 16:01:32 -0600 From: To: Subject: [PATCH v7 02/17] drm/dp_mst: Parse FEC capability on MST ports Date: Sat, 16 Nov 2019 17:01:13 -0500 Message-ID: <20191116220128.16598-3-mikita.lipski@amd.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191116220128.16598-1-mikita.lipski@amd.com> References: <20191116220128.16598-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)(376002)(39860400002)(346002)(396003)(136003)(428003)(199004)(189003)(51416003)(54906003)(5660300002)(7696005)(26005)(2876002)(486006)(2616005)(126002)(11346002)(476003)(76176011)(6666004)(356004)(2351001)(50226002)(36756003)(1076003)(2906002)(8936002)(8676002)(81166006)(81156014)(316002)(305945005)(16586007)(336012)(4326008)(47776003)(50466002)(48376002)(6916009)(53416004)(70586007)(70206006)(478600001)(86362001)(426003)(186003)(446003)(16060500001); DIR:OUT; SFP:1101; SCL:1; SRVR:BY5PR12MB4066; H:SATLEXMB02.amd.com; FPR:; SPF:None; LANG:en; PTR:InfoDomainNonexistent; A:1; MX:1; X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 330ff384-0a9c-4483-16cc-08d76ae08b53 X-MS-TrafficTypeDiagnostic: BY5PR12MB4066: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:4714; X-Forefront-PRVS: 02234DBFF6 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 0F4gcQNhNqk7ZOBJevCuGyzR0mK64g8k68YUKp3mJGqZd1MRaEsB1FTL1w5LnT08/6z5ebaEOT2ssbWv2PdA2UU/mDLuNqtGME+En7Vag2vn9p6pECLGYdsE9SX2AonRdVE6qE3E0NY8hJZRmdJsPpIUdHBMGHWty3i7QQVTPm6Ag3ASILPKwJGk5CbDPb4HPCMJTtUXfWAMeVH/Emh8ToRmOnfh+wLzo/Kd0i6bm6iXwNhmEGJIX1btj6sjMG0kWmr8M9zMkJPK9aajBoDYBt6UQgTgFV9PbZAPJ7iewNW1aUjyTREPehM9wbsmd3MphnXeiUNIoh37b0TQG6Iws275WW/Kg2JFCXQxUsUhO9wLYJfaF2XZmqv+i2Fh9BLpiJxtitxE72rqoMkQvlBqTEZvFUdxL2HZ2LhQvUSD8HRoyMQ9YqyTai3skMIoghDF X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Nov 2019 22:01:33.7320 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 330ff384-0a9c-4483-16cc-08d76ae08b53 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=[SATLEXMB02.amd.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR12MB4066 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=dNdUTtKZ1sW/55VPQ2xKYe/Mh8euES9APb8qlqbgb50=; b=BeLqNleHGoX9b+gr/lOtcQlB5Ae+XQmLPf4Z63ijKK7g1LF4VBDfCkGUl2KJuuNNmYCwNX/aJQl2A3DVoKh3Etun6en6QGPkqRFhAepgd6sMzWQ0MtdgdxDIPY4RxlNt1oHK9mBxjDeR6rc6VD/IJXXpiaXSkbCJn6qpJLgoPCY= 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 , Mikita Lipski , 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 Signed-off-by: Mikita Lipski --- 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; };