From patchwork Wed Oct 30 19:24:21 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Lipski, Mikita" X-Patchwork-Id: 11219985 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 9CF3614DB for ; Wed, 30 Oct 2019 19:25:02 +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 840D7204FD for ; Wed, 30 Oct 2019 19:25:02 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 840D7204FD 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 3F2586ED22; Wed, 30 Oct 2019 19:24:47 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from NAM04-CO1-obe.outbound.protection.outlook.com (mail-eopbgr690062.outbound.protection.outlook.com [40.107.69.62]) by gabe.freedesktop.org (Postfix) with ESMTPS id 28AEB6ED0F; Wed, 30 Oct 2019 19:24:42 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lOnqTo67eLz0n1gz2bTHphnvFc1pS41W4BoiGoxGG7wMf3VodLrLwcQm/0B8erPcY9wpKJH7/UK0zszm0R0ZiPEQmEOiaUBv62EnKHmyg3MpmXShezuRj+L+ob/L63unkVh9FN3pkF55kL0B6dDAjZZZGQjOyykb2bBM/JrQXN8kqH498Rz2VZo1eDFz2MUu9rQkJFdTqxXROG8RXJACgu3Ll5dAKdwZW7ObTiN/L0K4u+rrvQ5m+/o3baB30s3k0wLpgCruWrqQdH7Qe0ccACT+3YchZ/tGKwimjjQ+NAEK2K2FvKzhfR0US6uJxsDpeWEOy4NwjOQ/TyXmMOpnKg== 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=EB6SthsCzZ5qzJSM/LIhjT2byKEpFZnGPl7AHQ8/Ghm7juEmggOP79HIJtHrOkx+ccWc/virWBdHRRauWi9rYmT0pq+n4ANB3OiwyN3yQXFaH189wtm4ADRVgrBZ+P/VMkUerSWZBViFHv2g6HEb2GI4p+x88PKYi7UnaxCIYAktIjvpVyMyB0bTH+sCD93xPuYBUejMUS7QxGjtE0+bsKIVkk8mKPqWSmdMkvRIwy+l/KRGyLEnDy/JbL65pJq/tyb15R6SwA4KueM31BlxsmpuF1w2Pb0Ttr6mY59HLmS0aCjgqPswuSZlA4cE5JyxsT0SRwIi2IPb4m/joy5EaQ== 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 MWHPR1201CA0016.namprd12.prod.outlook.com (2603:10b6:301:4a::26) by MW2PR12MB2508.namprd12.prod.outlook.com (2603:10b6:907:9::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2387.23; Wed, 30 Oct 2019 19:24:39 +0000 Received: from CO1NAM03FT019.eop-NAM03.prod.protection.outlook.com (2a01:111:f400:7e48::209) by MWHPR1201CA0016.outlook.office365.com (2603:10b6:301:4a::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.2408.20 via Frontend Transport; Wed, 30 Oct 2019 19:24:38 +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 CO1NAM03FT019.mail.protection.outlook.com (10.152.80.176) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.2387.20 via Frontend Transport; Wed, 30 Oct 2019 19:24:38 +0000 Received: from SATLEXMB06.amd.com (10.181.40.147) 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; Wed, 30 Oct 2019 14:24:37 -0500 Received: from SATLEXMB02.amd.com (10.181.40.143) by SATLEXMB06.amd.com (10.181.40.147) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Wed, 30 Oct 2019 14:24:37 -0500 Received: from mlipski-pc.amd.com (10.180.168.240) by SATLEXMB02.amd.com (10.181.40.143) with Microsoft SMTP Server id 15.1.1713.5 via Frontend Transport; Wed, 30 Oct 2019 14:24:37 -0500 From: To: Subject: [PATCH 03/13] drm/dp_mst: Parse FEC capability on MST ports Date: Wed, 30 Oct 2019 15:24:21 -0400 Message-ID: <20191030192431.5798-4-mikita.lipski@amd.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191030192431.5798-1-mikita.lipski@amd.com> References: <20191030192431.5798-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)(136003)(376002)(346002)(396003)(39860400002)(428003)(189003)(199004)(356004)(2906002)(36756003)(53416004)(2351001)(48376002)(50466002)(47776003)(6666004)(86362001)(305945005)(6916009)(336012)(50226002)(8936002)(4326008)(478600001)(5660300002)(26005)(186003)(76176011)(2876002)(70586007)(70206006)(51416003)(81166006)(7696005)(81156014)(8676002)(446003)(2616005)(1076003)(316002)(426003)(11346002)(54906003)(16586007)(476003)(126002)(486006)(16060500001); DIR:OUT; SFP:1101; SCL:1; SRVR:MW2PR12MB2508; H:SATLEXMB01.amd.com; FPR:; SPF:None; LANG:en; PTR:InfoDomainNonexistent; MX:1; A:1; X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 91367e76-6295-45d2-b0dc-08d75d6ece83 X-MS-TrafficTypeDiagnostic: MW2PR12MB2508: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:4714; X-Forefront-PRVS: 02065A9E77 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: hPgcN5GCoxcJUNshenrii4fkjVzNlCtgYIgWauuxuE8SlXDCJjzhEY/hC3u1mXDnNqC+ReiUC5WaqychrpxibC1QcKL9yN4TEa2t+MfijKapQJqtu9daY4x3zVyh7Jj8zdznYbXGVuBOJw9pEkt+VvCKCBwtZn0oLet4JAqIPfITFDQex/FrYzTaygZAleBgT2Bw8w6yHbid5aB5Cj214uNG41YYvZmhwiBo8GKr3kmf/sCJS/sUvpsy8eqUsoNPCKXUqQv1UfKWFLnk7G7FnQOEYQ7/pm2j0KjGOHvhPhcEZI7azf56yo7+y2/efrgC/bl0Wls59Tia43Na9/y3Jw5k4ZkYBidt7lJvoSk3TGqFgWNJh+ptQpWDtLFw9ynckDW+mu9mQtI+1jkmFwAjQpfn+DofvHi0TScdAq4A07DWAug8r+qiKailxzkxRneW X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Oct 2019 19:24:38.7105 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 91367e76-6295-45d2-b0dc-08d75d6ece83 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: MW2PR12MB2508 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=DaxqxdQT8o9PoY/edi3CPWQzUxVGsq1Xx+FVJLrPlmi/9st5IZxFp6wA2k+jGhzdm1pkhtKE09Y8nvDIjB8GOjRIRfRcsCOQ9Lmfw9kUoEqRYSzmfu/xfmiznYz9c17naEwGqKoSQOPNWWKcqox7Zm97/CDgr+30dN+Ef7UhDT8= 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; };