From patchwork Tue Oct 1 16:17:10 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Lipski, Mikita" X-Patchwork-Id: 11169211 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 9BFA617EE for ; Tue, 1 Oct 2019 16:17:42 +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 842E420679 for ; Tue, 1 Oct 2019 16:17:42 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 842E420679 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 3AD996E84C; Tue, 1 Oct 2019 16:17:35 +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-eopbgr790053.outbound.protection.outlook.com [40.107.79.53]) by gabe.freedesktop.org (Postfix) with ESMTPS id 6B2036E846; Tue, 1 Oct 2019 16:17:32 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=h30lW0gBW3ylhKPXBqUI9pOAwVR6ns2YdbyvMKG3BTXNZPXIia1m5Fh1rXq9OJgQkA5TGbR8hAuwXFQgTI7dKF2sDIA7KVts3o4mfNtoJ4XssYU3ooxkeAT0vmW+2Mk+CC41WKYLL+hZI5/Um10ON28Dmu24XubokS5U0wvjqOiscM8nUshsg0cab3YyWxGzCmkY0LvKqBOIsK4ic9t8r6AdvLiff2wGa3ssIYVE8CqS9u6d4dhUUpItnWE/IfsAmRDcyynPnLdYolXjkgRHkhOzSB9/1gRcsei2ouc1+i4Q295gNykCsUNQK8AFv0P6ajjRwc8GE/WFi6MrcS2GAA== 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=fKqAIsxQN+yC1kTp9AJCCEdH3S9Uop0ZsEfCQCORbec71ALQn3JHZwjUol0XrReSiMzaLvfvyfEDhy/rraktDs6uAfwpxklmyyk2Fwe7rVRbfPLxbyxSORpQuSHVDxS9tPckUnvLEvDmlM48GuQe7OeJpt3ww0h6JxmtP8yu1sD6xeRWx3GAZnKBQ5txqI4160WnM1JXbqan3jiny/zp4IdFEfrMNCKvXT8hAelcP/8nml2EPfokzyjA3c2qT7hF/744qybN2DTS8w2tCC/96UAApuACZ1kSe924LNHxSvx0XoUYbLGSaoolWVQ+YD23ml1qlofbqbVkEIuUxeMfnA== 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 MN2PR12CA0021.namprd12.prod.outlook.com (2603:10b6:208:a8::34) by MWHPR12MB1758.namprd12.prod.outlook.com (2603:10b6:300:10f::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2305.20; Tue, 1 Oct 2019 16:17:30 +0000 Received: from CO1NAM03FT013.eop-NAM03.prod.protection.outlook.com (2a01:111:f400:7e48::209) by MN2PR12CA0021.outlook.office365.com (2603:10b6:208:a8::34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2284.23 via Frontend Transport; Tue, 1 Oct 2019 16:17:30 +0000 Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) Received: from SATLEXCHOV02.amd.com (165.204.84.17) by CO1NAM03FT013.mail.protection.outlook.com (10.152.80.120) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.2305.15 via Frontend Transport; Tue, 1 Oct 2019 16:17:29 +0000 Received: from mlipski-pc.amd.com (10.180.168.240) by SATLEXCHOV02.amd.com (10.181.40.72) with Microsoft SMTP Server id 14.3.389.1; Tue, 1 Oct 2019 11:17:28 -0500 From: To: Subject: [PATCH 03/14] drm/dp_mst: Parse FEC capability on MST ports Date: Tue, 1 Oct 2019 12:17:10 -0400 Message-ID: <20191001161721.13793-4-mikita.lipski@amd.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191001161721.13793-3-mikita.lipski@amd.com> References: <20191001161721.13793-1-mikita.lipski@amd.com> <20191001161721.13793-2-mikita.lipski@amd.com> <20191001161721.13793-3-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)(346002)(376002)(39860400002)(136003)(396003)(428003)(189003)(199004)(50466002)(7696005)(47776003)(2351001)(16586007)(316002)(446003)(76176011)(53416004)(51416003)(336012)(1076003)(4326008)(54906003)(486006)(48376002)(5660300002)(6666004)(426003)(2906002)(356004)(11346002)(186003)(126002)(6916009)(36756003)(50226002)(478600001)(26005)(450100002)(86362001)(305945005)(2616005)(81166006)(70206006)(70586007)(2876002)(8936002)(81156014)(8676002)(476003)(16060500001); DIR:OUT; SFP:1101; SCL:1; SRVR:MWHPR12MB1758; H:SATLEXCHOV02.amd.com; FPR:; SPF:None; LANG:en; PTR:InfoDomainNonexistent; MX:1; A:1; X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: c357375d-a50f-4f9f-73e6-08d7468adb9d X-MS-TrafficTypeDiagnostic: MWHPR12MB1758: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:4714; X-Forefront-PRVS: 0177904E6B X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: TINeW7ifyfCXjOThULXex51R6cM8j34J0WbkHfEe2XKBTaKmfxGOJnHmA0Il5MHAbaJxmzw+2LyQ69ZkuWfHVpqw7/ss21iCPJRML/0xxneWY6meMNK3RMxzkgIkW0ckl6B9kYZFaZNIbCFJLO66ek2ds2tXudC774X/F1dHxjdQ08PJdyEwwFCYy4vkMr2fWOmgMIkf0S0XVRbxLFzrLaZZBwHP1mcRA80VpKMV+JaRxlGQHnl2OMlfBu4w/AxlT1Be6wAMEDGJ6YMSAexT1v1wdcuOjyMETnWen49MqFCKt8gN/bz/UdIkQ/RvZRsCeLka30DAOJYbzi/VaTiudDQ27PMSyFEJMvmac4lFf1CXKgg0AVs+XBzGdyip/k5RtgUhuL9PnPUIzFFmPeqqsUER48/XfubIDDurjq6iSek= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Oct 2019 16:17:29.8243 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c357375d-a50f-4f9f-73e6-08d7468adb9d 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=[SATLEXCHOV02.amd.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR12MB1758 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=OzNU1d5k2lUuKeMBF9W7ee5s6VtyzKCzoixrzjMXpvDOfdj6a/mvyE9UcQfMmU5yY/hl6P+u/Db6TbCubZooIY4RUYkK6RW0y9NlPLeu7OJE7YMU1x5ce7qb7Q8pblh5lvAjfLQMh5NjQ9DlbQ58OfjLi3ekbXnZJHIUhv60/74= 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; };