From patchwork Tue Dec 3 14:35:15 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Lipski, Mikita" X-Patchwork-Id: 11271407 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 CCAE6138D for ; Tue, 3 Dec 2019 14:35:47 +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 B51B320659 for ; Tue, 3 Dec 2019 14:35:47 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B51B320659 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 359216E793; Tue, 3 Dec 2019 14:35:45 +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-eopbgr770049.outbound.protection.outlook.com [40.107.77.49]) by gabe.freedesktop.org (Postfix) with ESMTPS id 228D46E78A; Tue, 3 Dec 2019 14:35:44 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UlYRjzFxFKxfv6CLtChbTfFrw7FPMiXI4lMgu8hbjrAXde0NKl7YHSrOJ90DoHvScm325T3RxGgoEkS+0YgTYnSigzsyCu9ABax5gliSAhRdPcISBfJfSpVnhO9AWKBNIgdRbsKT+2MJZEKTCXbkd7XfHHMldy5m7YN+ZnelRldy5ZNtDs20spaUOTA/9IhCvjjIYJzJ4ZW7XP6dWe6DndmTs63DYcd3UN646vpGu9RrT4o5KIjdYTJ6Uab1PnFjs6i/9ShoaWiGJId/k2OoNPt/7d+YVZ9FNNL4xSA2QDf9jobDcV/czgKSR5a9n/jkk2H+5bcvUhbdqa2AarHiLg== 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=QUrAf/Cth9DMADJ+K/FnYrRHZ2g3ZpcYnYIgZXGUrZM=; b=LpKgmycFG2j5J6GVz9+LHi23hxc88TFvuA3hJJH7WaY6SP6lYQUCa303TEkJFA2vZxFwOL6i/X/oKdgy9MhQy2d2rJlF1FgVi37P5mW4d6JxcT77+Kk3+1Fqvwm7uzB3XOV2vPO0nGZBkExleh8PPaR88fuKq69xtRZXBCK0pcGM/7lz7aTPmo30xrNMwUzEItfOAO8lhYF4Ob4PR1+oA0lYd9lEQ1f9cjZ+dfCiUKOBfAaUJvNtSdfOUDKc+mNRYKiyKXRcYUMt5OwvqEkRj9za74JJq5N6K2hwV9F67GXawubKAGTAgior/0i/8+XqlVbvb0jcUSo+/EH877l53A== 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 DM6PR12CA0027.namprd12.prod.outlook.com (2603:10b6:5:1c0::40) by DM6PR12MB3593.namprd12.prod.outlook.com (2603:10b6:5:11c::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2495.18; Tue, 3 Dec 2019 14:35:42 +0000 Received: from DM6NAM11FT054.eop-nam11.prod.protection.outlook.com (2a01:111:f400:7eaa::202) by DM6PR12CA0027.outlook.office365.com (2603:10b6:5:1c0::40) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.2495.18 via Frontend Transport; Tue, 3 Dec 2019 14:35:42 +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 DM6NAM11FT054.mail.protection.outlook.com (10.13.173.95) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.2451.23 via Frontend Transport; Tue, 3 Dec 2019 14:35:42 +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; Tue, 3 Dec 2019 08:35:41 -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; Tue, 3 Dec 2019 08:35:41 -0600 From: To: Subject: [PATCH v8 02/17] drm/dp_mst: Parse FEC capability on MST ports Date: Tue, 3 Dec 2019 09:35:15 -0500 Message-ID: <20191203143530.27262-3-mikita.lipski@amd.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191203143530.27262-1-mikita.lipski@amd.com> References: <20191203143530.27262-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)(346002)(376002)(136003)(39860400002)(396003)(428003)(189003)(199004)(6916009)(53416004)(446003)(8936002)(2876002)(1076003)(70586007)(70206006)(450100002)(2906002)(36756003)(5660300002)(478600001)(6666004)(11346002)(426003)(305945005)(50466002)(48376002)(2616005)(81156014)(356004)(186003)(26005)(81166006)(4326008)(336012)(2351001)(76176011)(51416003)(7696005)(8676002)(54906003)(50226002)(16586007)(316002)(86362001)(16060500001); DIR:OUT; SFP:1101; SCL:1; SRVR:DM6PR12MB3593; H:SATLEXMB02.amd.com; FPR:; SPF:None; LANG:en; PTR:InfoDomainNonexistent; MX:1; A:1; X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: b659b06e-1f72-4279-db45-08d777fe1373 X-MS-TrafficTypeDiagnostic: DM6PR12MB3593: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:4714; X-Forefront-PRVS: 02408926C4 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: DfP9QrhwEYpXBN5wyOcHPLJ7+symQKI284c5VMo3fuqQdSyH+Yo8SpR8sm/u2B/1xC9BmpH5Ah9ourLOOsNzPf7L6n/tcVWkvG+wPdVYUbUQIifRiJn70iW37MX7hI4bqBuyiaSMIaGvInx6HeN/MMhVOZZ8/DKKdPn3yj3ZDqNTcDMmYoGhguu9r/waLsWOhTtKBDaCdxJLNKATzOr8snsmWL4oqbQ5cZVsRhnBVrhz2SJ4Cb0Nv1r5Tz3ge9RB0IsdugO6SHBqfqCs6VnoauoW2gpp8EIrWwq4XRxUhfZjL0s2P/ydltK/Audm552RYjIN43cWusKJ0U6lMCaLYJaTod4GCkW0uvYfWja3zU8K/l0vBWSFnWw6t3G9ICKOoRBsL8wjZcO/6tC2cubBvBYJW35BTvyUIxfdeBpOcCODkhACAlytFpYvAFZRr6JF X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Dec 2019 14:35:42.7148 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b659b06e-1f72-4279-db45-08d777fe1373 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: DM6PR12MB3593 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=QUrAf/Cth9DMADJ+K/FnYrRHZ2g3ZpcYnYIgZXGUrZM=; b=ionndk0acie49HRvYfMfsojeB36vMPSf6XxIxBEKZTQiQKawW/RaBpeWROAAMucZAoNSewLZKUBRTiULUIp3vrVdIQ9+EmkFEMeXH7w/KqyKRjj45OtPhSQnzrwdqNGEne1Ddmr7lqNV1rc4DfDvkEmGYES/0hrY8b7ySSspAak= 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 Reported-by: kbuild test robot --- 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 261e2c1828c6..06aae9b52e8a 100644 --- a/drivers/gpu/drm/drm_dp_mst_topology.c +++ b/drivers/gpu/drm/drm_dp_mst_topology.c @@ -846,6 +846,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; @@ -2894,6 +2895,7 @@ drm_dp_send_enum_path_resources(struct drm_dp_mst_topology_mgr *mgr, path_res->avail_payload_bw_number); port->available_pbn = path_res->avail_payload_bw_number; + port->fec_capable = path_res->fec_capable; } } diff --git a/include/drm/drm_dp_mst_helper.h b/include/drm/drm_dp_mst_helper.h index 68656913cfe5..0cada01e8139 100644 --- a/include/drm/drm_dp_mst_helper.h +++ b/include/drm/drm_dp_mst_helper.h @@ -156,6 +156,8 @@ struct drm_dp_mst_port { * audio-capable. */ bool has_audio; + + bool fec_capable; }; /** @@ -383,6 +385,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; };