From patchwork Wed Aug 21 20:01:13 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Francis, David" X-Patchwork-Id: 11108081 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 BB91313A4 for ; Wed, 21 Aug 2019 20:01:41 +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 A3A552332A for ; Wed, 21 Aug 2019 20:01:41 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A3A552332A 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 74A2E6E393; Wed, 21 Aug 2019 20:01:39 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from NAM04-SN1-obe.outbound.protection.outlook.com (mail-eopbgr700062.outbound.protection.outlook.com [40.107.70.62]) by gabe.freedesktop.org (Postfix) with ESMTPS id 9E649890A8; Wed, 21 Aug 2019 20:01:37 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WcD0ABDX5ZCgniJ53GEunLefnl8DDn0L9Y82ZTtEc9Ke88t+WqIWZdjiiQkwIzlrhj37nyjsy6OVXA6bs9xuEzFYt6a0iJWff8KqARrUH1Px00u6Ky9gthMgnn46nJGpurgeF3/NrJlvyQfyS250m+V+ltwZfuVjqS2UzAZkSl+H6/bH40XvhNd7NFS8G9bX0MvCaWJCAmfx0JkUX1sS3p4jhl5NTToKqOGG/s+jL3fUoLvihWLqw/ydNG9kMNm3ORvNxKM2FRl3IkYazyVNZmwcHBNM5Wr2tmjYYNruHZHjRTbZjfp+lT0RL3PK/54318A6TazUS81KWvs/G7E4Aw== 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=/IqAR56hSR6PAk4Yjsktj+cEHxiXJ05/aGT+J5N9QfY=; b=W5gXSetvZrcl8tRnhOh5aCoGJSLPl2jjbZlxyNmH9LTzt8VKb9QPTpg6hE7F3QiYnBD7J7LsrvPjsEo4Gzy8+e3NzGLyj4+YZisnmYGi+oQejjTzdT3mdbURoqCw2miDCDMKrz/2zfz23Kg2DfxcB0tghsJYSt9PTHsyhYWXnaBE+gCgtUMGy+NPwwUBkF530r0tZjedfQ+rbHwwekBW4PRzuQOIYMWX4+mbJhl+luJO88Sni3SkiqW1PIDduPJhqYlTp5+kXEaDFlG9IkFqzG9WtV6JzLLd0z7IT25vVJb9SP7cGZ5wz34+cCxl/x1lVyCnpW1Rlh6QZ6l4fghy/A== 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 BN4PR12CA0005.namprd12.prod.outlook.com (2603:10b6:403:2::15) by DM6PR12MB2714.namprd12.prod.outlook.com (2603:10b6:5:49::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2178.18; Wed, 21 Aug 2019 20:01:36 +0000 Received: from CO1NAM03FT063.eop-NAM03.prod.protection.outlook.com (2a01:111:f400:7e48::201) by BN4PR12CA0005.outlook.office365.com (2603:10b6:403:2::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.2178.16 via Frontend Transport; Wed, 21 Aug 2019 20:01:36 +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 CO1NAM03FT063.mail.protection.outlook.com (10.152.81.61) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.2178.16 via Frontend Transport; Wed, 21 Aug 2019 20:01:35 +0000 Received: from localhost.localdomain (10.180.168.240) by SATLEXCHOV02.amd.com (10.181.40.72) with Microsoft SMTP Server id 14.3.389.1; Wed, 21 Aug 2019 15:01:32 -0500 From: David Francis To: , Subject: [PATCH v3 00/16] Display Stream Compression (DSC) for AMD Navi Date: Wed, 21 Aug 2019 16:01:13 -0400 Message-ID: <20190821200129.11575-1-David.Francis@amd.com> X-Mailer: git-send-email 2.17.1 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)(136003)(396003)(39850400004)(376002)(2980300002)(428003)(189003)(199004)(450100002)(8676002)(8936002)(81166006)(49486002)(6666004)(70206006)(16586007)(4326008)(70586007)(86362001)(50466002)(47776003)(316002)(5660300002)(110136005)(48376002)(50226002)(53936002)(356004)(1076003)(26005)(14444005)(36756003)(486006)(336012)(476003)(81156014)(426003)(186003)(478600001)(51416003)(305945005)(2906002)(126002)(2616005); DIR:OUT; SFP:1101; SCL:1; SRVR:DM6PR12MB2714; 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: 67b10fb4-8cea-4a2c-46bb-08d726725eec X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(711020)(4605104)(1401327)(2017052603328); SRVR:DM6PR12MB2714; X-MS-TrafficTypeDiagnostic: DM6PR12MB2714: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:8882; X-Forefront-PRVS: 0136C1DDA4 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Message-Info: wM281KXWEhzXsewG1GKT1wQtbz14uULQH7TozYBui9NSgi/xEzSzxenILOHCuV6B/VLjPhbR/EU+RecSd+x2TbTsNOG77yZvv2oindL0T5sS5A7TaSMdlJyeHfDJR9f8TXavn3L1pgpvhMJtVmHr4z8DlLCoiJqbYTYD/CpcdChgphwQkd9g1VE6AhgWhX09zLohZfW11oNjRkr0S56MVGFUMPory42qQqKJH5jxtkYTWX8z4OAa8bfKoUA0vr0xfYyiEJTicn70NsWRZDCCHeLlgUno3beFwEHPbsoEh5m1Y1mETnfuL+N6kBADHLiOJ4u/7QhXvk/Dug2sZC+EB5u3HigZnRkt5c+7z6qF0smB+Wkt+F1dzc1e5ymJeaJffd/jYLjD+FReJmUJkmwHWl04cfm5kMNP7AFBiJHAln8= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Aug 2019 20:01:35.4232 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 67b10fb4-8cea-4a2c-46bb-08d726725eec 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: DM6PR12MB2714 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=/IqAR56hSR6PAk4Yjsktj+cEHxiXJ05/aGT+J5N9QfY=; b=vltEOnm4eNn5frRiVI5naREiPgCGCl9Lrpa5Bpv27rPAg120XD6uBH4wPkPCKu9xZbyVE3MApACqftEUFTOSS3W3USUxDeINpqdmT1DdhvCHi14WDtsJxoz5uNi+pFV2XuSjbqjuCdcrnm9Bv2veJtAZNeTZWRTQimWtgyWuilU= 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 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" This patchset enables Display Stream Compression (DSC) on DP connectors on Navi ASICs, both SST and DSC. 8k60 and 4k144 support requires ODM combine, an AMD internal feature that may be a bit buggy right now. Patches 1 through 5 enable DSC for SST. Most of the work was already done in the Navi promotion patches; this just hooks it up to the atomic interface. The first two reverts are of temporary changes to block off DSC. The third is of a commit that was accidentally promoted twice. The fourth and last revert fixes a potential issue with ODM combine. Patches 6, 7 and 8 are fixes for bugs that would be exposed by MST DSC. Patches 6 and 7 add and use a new DRM helper for MST calculations. Patch 8 fixes a silly use-uninitialized Patches 9, 10, and 11 are small DRM changes required for DSC MST: FEC, a new bit in the standard; MST DPCD from drivers; and a previously uninitialized variable. Patches 12 through 16 are the DSC MST policy itself. Patch 12 adds DSC aux access helpers to DRM, and patches 13 and 14 make use of those helpers. Patch 15 deals with dividing bandwidth fairly between multiple streams, and patch 16 ensures that MST CRTC that may change DSC config are reprogrammed v2: Updating patches 6 and 14 in respoinse to Nick's feedback v3: Add return value to patch 6 and split it (now patches 6 & 7) New patch 10 adding MST DPCD read/write support Minor fix (num_ports--) to patch 11 Add DRM helpers (patch 12) David Francis (16): Revert "drm/amd/display: skip dsc config for navi10 bring up" Revert "drm/amd/display: navi10 bring up skip dsc encoder config" Revert "drm/amd/display: add global master update lock for DCN2" Revert "drm/amd/display: Fix underscan not using proper scaling" drm/amd/display: Enable SST DSC in DM drm/dp-mst: Add PBN calculation for DSC modes drm/amd/display: Use correct helpers to compute timeslots drm/amd/display: Initialize DSC PPS variables to 0 drm/dp-mst: Parse FEC capability on MST ports drm/dp-mst: Add MST support to DP DPCD R/W functions drm/dp-mst: Fill branch->num_ports drm/dp-mst: Add helpers for querying and enabling MST DSC drm/amd/display: Validate DSC caps on MST endpoints drm/amd/display: Write DSC enable to MST DPCD drm/amd/display: MST DSC compute fair share drm/amd/display: Trigger modesets on MST DSC connectors .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 113 ++++- .../amd/display/amdgpu_dm/amdgpu_dm_helpers.c | 33 +- .../display/amdgpu_dm/amdgpu_dm_mst_types.c | 402 +++++++++++++++++- .../display/amdgpu_dm/amdgpu_dm_mst_types.h | 4 + drivers/gpu/drm/amd/display/dc/core/dc.c | 12 +- .../drm/amd/display/dc/core/dc_link_hwss.c | 3 + .../gpu/drm/amd/display/dc/dcn20/dcn20_dsc.c | 3 + .../drm/amd/display/dc/dcn20/dcn20_hwseq.c | 4 - .../gpu/drm/amd/display/dc/dcn20/dcn20_optc.c | 72 +--- .../gpu/drm/amd/display/dc/dcn20/dcn20_optc.h | 3 - .../drm/amd/display/dc/dcn20/dcn20_resource.c | 7 +- .../drm/amd/display/dc/dcn20/dcn20_resource.h | 1 + .../display/dc/dcn20/dcn20_stream_encoder.c | 8 - .../amd/display/dc/inc/hw/timing_generator.h | 2 - drivers/gpu/drm/drm_dp_aux_dev.c | 12 +- drivers/gpu/drm/drm_dp_helper.c | 10 +- drivers/gpu/drm/drm_dp_mst_topology.c | 240 +++++++++++ include/drm/drm_dp_mst_helper.h | 8 +- 18 files changed, 806 insertions(+), 131 deletions(-)