From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id A31AFC25B0C for ; Thu, 11 Aug 2022 15:48:59 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B8E33B4837; Thu, 11 Aug 2022 15:48:57 +0000 (UTC) Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2047.outbound.protection.outlook.com [40.107.223.47]) by gabe.freedesktop.org (Postfix) with ESMTPS id 77EAB9C969 for ; Thu, 11 Aug 2022 15:48:46 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MjF4yDqUvflw47/wAqnOLgnRf5ecWOhJovsNykH7GVKkNDN3CCyC8nXTsj4fw7ANLLmHg+i0rYUydSv9XdpQ56E36VxP4Fbd37kZD/iVXYSrVO8YOVC6GNZxlIxdbMiQ86VBLx+TdgrTRlqFdSTsO4IPBHhHc5qF/bK3VAW5fwHujif8q4p8RALB44s71SgJRLMl+envhd+aR17He7Q2Ds2mo0tf6eXmQhlZ0MjHeXrcXh+MzcPKbLeQ31xerv5NRip0mo3L0OxmXm6+JT2X1g5OKw3EnIUD64JCxyx0dZtQt0WvQEpPTYqpQLLQ+HcT9so+PHQwTAGF2rU3LYYRwg== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=gWfTK3YwGjPYv6X32mIy9Ozgbe5h96PWKEjjKqtCAdo=; b=E8Ir9MweMPe2YqMhxEsFxdjob1lYzBxIaEH6GkgO71Iwwy92zgCOD0ZNEWYpPrM741cqKplElqihdDLJUtAZn+tQJxVk5SDuucGUWFnGuOz1ttT092rM/ldDVs8U20j0G/mJC9S4S0I67c20DU1oGZK0wH7otlo1kz0iPkaHrKLgsGP1dpjsksA/UUkUqPoLTv/Z17bip+RSD8f5Zx5x0s0tCRPpKt3XoUbW3GrdAO0ubDZR3/+A4Y9aQ0j8CxupWZ84k68o1zIHLhP5Ud3Ve8rQ3QR9v7m9iOBLkQBWsaXLG9ccMz54zccte4kca+6OLOtgkMsSoUMkkIHzpirrvw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=lists.freedesktop.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=gWfTK3YwGjPYv6X32mIy9Ozgbe5h96PWKEjjKqtCAdo=; b=Rdj6RxDrXcNYci7qD4k/btCWRHvDr8LDQTeDmN1Lw1or1byBtcBVZyJaxZwVTg2f0pp9AtZrPejpiaFJvpXP0AK1b8z4hWdCV/hx+54i0hK4SWYeui7CyZK7IN5oMltifEJ1oWwxpNTMEgYLew7gOjoabg+wAtJ6IN87r7YOvYY= Received: from BN9PR03CA0389.namprd03.prod.outlook.com (2603:10b6:408:f7::34) by DM5PR12MB1338.namprd12.prod.outlook.com (2603:10b6:3:71::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5504.15; Thu, 11 Aug 2022 15:48:42 +0000 Received: from BN8NAM11FT054.eop-nam11.prod.protection.outlook.com (2603:10b6:408:f7:cafe::bf) by BN9PR03CA0389.outlook.office365.com (2603:10b6:408:f7::34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5504.16 via Frontend Transport; Thu, 11 Aug 2022 15:48:41 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by BN8NAM11FT054.mail.protection.outlook.com (10.13.177.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5525.11 via Frontend Transport; Thu, 11 Aug 2022 15:48:41 +0000 Received: from atma3.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.28; Thu, 11 Aug 2022 10:48:36 -0500 From: Rodrigo Siqueira To: Subject: [PATCH v2 2/3] Documentation/gpu: Add an explanation about the DCN pipeline Date: Thu, 11 Aug 2022 11:48:18 -0400 Message-ID: <20220811154819.3566210-3-Rodrigo.Siqueira@amd.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220811154819.3566210-1-Rodrigo.Siqueira@amd.com> References: <20220811154819.3566210-1-Rodrigo.Siqueira@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 590d5260-a1f5-48a7-2255-08da7bb0f74a X-MS-TrafficTypeDiagnostic: DM5PR12MB1338:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 39jkXHEwD3Y4jGB8qhVkJUKEqOwNiecILEqpu4EcdNmdYXi1VdfOn5tTZr4B6ZfoipuwohJIvN3JFsP8Xdrd29qpzW/qFkYFm7XnUi9QsggWzrBvjZ/VFv2l5areL28qOjdx9YGbGGPyQByW1jWPhrSvBanTvIYVA6oJXJc1JgQwSZaXV4yN1FGT7xrkBPf/wus0vxh1WDU8UYx7WXEMBkk62L740I+Qe50iaRidSj0ZtR19ezPIzi08Wav+ObaPhDUxzOPrU79Y5j4KJMZtcodDar+arbyBGmf/QVBqgsAPuYjMfE0+ymIQgI65ChzPRNw0p4AnegFPCPNYQH20NTfosvLRUorP+utNaTYcI6s1m58PYsmEyKZFj5H2R6yQw1AbFroNj8RjrDaFlnM4B2ker8xWNp1+PZAOx7POTKelmBlSzKSjyGWDepLll7HQ7tYY8qdrl6syUPpAbdebFnKU7YqJwxPv77uVMuH5SQ6UDVcHvy3hVAvm5G6PV/MIj/zFiwj7flTpaReDgDIvVFG4yLKE+dLLYaI4heyHSyHsLjVzesXgZ9qCM8Lyj4fczORgUfKKNbEyNHX3sZJxkc/sp/7n50T3IaycAX5x+i3O+k6stCTl+76NAyIAJcFpGfAEz2dNHhtU2OhA/cdR47d00rXJFwQd/IaimP0SEHMKDkrh0O3dknoeoRlkMJoPRpRxNsbccL5TVT2JxAhmYu1jmPNcBYnFgnV/x5HfWyouWhhb+98H5+XSP3KKdhIFumRbe6ykzsfydmlafyBMqlvS0f8FX2aWoEi/umhpVdhIh9D6bhg7Fk4UH+WHc3978uXxWoNv/ZvPdbQ06Y+BQD0j8cyY7GrIpTSXzt90H9OppLtKSBHtowY8PBJgOwurtVloXWQAEyldy41Njwg3YA/MfmiuCbkddUCPkOrTZ7I= X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB04.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230016)(4636009)(346002)(136003)(39860400002)(376002)(396003)(36840700001)(46966006)(40470700004)(316002)(5660300002)(8936002)(478600001)(54906003)(6916009)(7696005)(30864003)(41300700001)(186003)(336012)(16526019)(36756003)(2906002)(6666004)(426003)(1076003)(2616005)(47076005)(66574015)(26005)(81166007)(19273905006)(356005)(86362001)(40460700003)(83380400001)(36860700001)(40480700001)(8676002)(4326008)(70586007)(70206006)(82740400003)(82310400005)(36900700001)(579004)(559001)(563064011); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Aug 2022 15:48:41.9012 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 590d5260-a1f5-48a7-2255-08da7bb0f74a 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=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT054.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR12MB1338 X-BeenThere: amd-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion list for AMD gfx List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Pierre-Eric Pelloux-Prayer , Mark Yacoub , Pekka Paalanen , =?UTF-8?q?Michel=20D=C3=A4nzer?= , Alex Hung , Harry Wentland , Leo Li , Hersen Wu , Simon Ser , Sean Paul , Bhawanpreet Lakha , Nicholas Kazlauskas , Pierre-Loup Errors-To: amd-gfx-bounces@lists.freedesktop.org Sender: "amd-gfx" In the DCN code, we constantly talk about hardware pipeline, pipeline, or even just pipes, which is a concept that is not obvious to everyone. For this reason, this commit expands the DCN overview explanation by adding a new section that describes what a pipeline is from the DCN perspective. Changes since V1: - Rewrite the first paragraph that describes AMD hardware pipeline. Cc: Harry Wentland Cc: Nicholas Kazlauskas Cc: Bhawanpreet Lakha Cc: Hersen Wu Cc: Alex Hung Cc: Pierre-Eric Pelloux-Prayer Cc: Leo Li Cc: Simon Ser Cc: Pekka Paalanen Cc: Sean Paul Cc: Mark Yacoub Cc: Pierre-Loup Cc: Michel Dänzer Signed-off-by: Rodrigo Siqueira --- .../gpu/amdgpu/display/dcn-overview.rst | 59 + .../amdgpu/display/pipeline_4k_no_split.svg | 958 +++++++++++++++ .../gpu/amdgpu/display/pipeline_4k_split.svg | 1062 +++++++++++++++++ 3 files changed, 2079 insertions(+) create mode 100644 Documentation/gpu/amdgpu/display/pipeline_4k_no_split.svg create mode 100644 Documentation/gpu/amdgpu/display/pipeline_4k_split.svg diff --git a/Documentation/gpu/amdgpu/display/dcn-overview.rst b/Documentation/gpu/amdgpu/display/dcn-overview.rst index f98624d7828e..9fea6500448b 100644 --- a/Documentation/gpu/amdgpu/display/dcn-overview.rst +++ b/Documentation/gpu/amdgpu/display/dcn-overview.rst @@ -124,6 +124,65 @@ depth format), bit-depth reduction/dithering would kick in. In OPP, we would also apply a regamma function to introduce the gamma removed earlier back. Eventually, we output data in integer format at DIO. +AMD Hardware Pipeline +--------------------- + +When discussing graphics on Linux, the **pipeline** term can sometimes be +overloaded with multiple meanings, so it is important to define what we mean +when we say **pipeline**. In the DCN driver, we use the term **hardware +pipeline** or **pipeline** or just **pipe** as an abstraction to indicate a +sequence of DCN blocks instantiated to address some specific configuration. DC +core treats DCN blocks as individual resources, meaning we can build a pipeline +by taking resources for all individual hardware blocks to compose one pipeline. +In actuality, we can't connect an arbitrary block from one pipe to a block from +another pipe; they are routed linearly, except for DSC, which can be +arbitrarily assigned as needed. We have this pipeline concept for trying to +optimize bandwidth utilization. + +.. kernel-figure:: pipeline_4k_no_split.svg + +Additionally, let's take a look at parts of the DTN log (see +'Documentation/gpu/amdgpu/display/dc-debug.rst' for more information) since +this log can help us to see part of this pipeline behavior in real-time:: + + HUBP: format addr_hi width height ... + [ 0]: 8h 81h 3840 2160 + [ 1]: 0h 0h 0 0 + [ 2]: 0h 0h 0 0 + [ 3]: 0h 0h 0 0 + [ 4]: 0h 0h 0 0 + ... + MPCC: OPP DPP ... + [ 0]: 0h 0h ... + +The first thing to notice from the diagram and DTN log it is the fact that we +have different clock domains for each part of the DCN blocks. In this example, +we have just a single **pipeline** where the data flows from DCHUB to DIO, as +we intuitively expect. Nonetheless, DCN is flexible, as mentioned before, and +we can split this single pipe differently, as described in the below diagram: + +.. kernel-figure:: pipeline_4k_split.svg + +Now, if we inspect the DTN log again we can see some interesting changes:: + + HUBP: format addr_hi width height ... + [ 0]: 8h 81h 1920 2160 ... + ... + [ 4]: 0h 0h 0 0 ... + [ 5]: 8h 81h 1920 2160 ... + ... + MPCC: OPP DPP ... + [ 0]: 0h 0h ... + [ 5]: 0h 5h ... + +From the above example, we now split the display pipeline into two vertical +parts of 1920x2160 (i.e., 3440x2160), and as a result, we could reduce the +clock frequency in the DPP part. This is not only useful for saving power but +also to better handle the required throughput. The idea to keep in mind here is +that the pipe configuration can vary a lot according to the display +configuration, and it is the DML's responsibility to set up all required +configuration parameters for multiple scenarios supported by our hardware. + Global Sync ----------- diff --git a/Documentation/gpu/amdgpu/display/pipeline_4k_no_split.svg b/Documentation/gpu/amdgpu/display/pipeline_4k_no_split.svg new file mode 100644 index 000000000000..5fa289d99fcd --- /dev/null +++ b/Documentation/gpu/amdgpu/display/pipeline_4k_no_split.svg @@ -0,0 +1,958 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + DCHUB + + DPP(0) + + + + + HUBP(0) + + + + + + HUBP(1) + + + + + + HUBP(5) + + + + + ... + + ... + + + MPC(0) + + + + OPP(0) + + + ... + + + + OPTC + + + + ... + + SDP + + + + DPPCLK535.916Mhz + DISPCLK541.275 Mhz + DCFCLK506 Mhz + SymCLK + + DIO + + + + VirtualPCLK + + + diff --git a/Documentation/gpu/amdgpu/display/pipeline_4k_split.svg b/Documentation/gpu/amdgpu/display/pipeline_4k_split.svg new file mode 100644 index 000000000000..b43119e7eb8a --- /dev/null +++ b/Documentation/gpu/amdgpu/display/pipeline_4k_split.svg @@ -0,0 +1,1062 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + DCHUB + + DPP(0) + + + + + HUBP(0) + + + + + + HUBP(1) + + + + + + HUBP(5) + + + + + ... + + DPP(5) + + + + + ... + + + MPC(0) + + + + MPC(5) + + + + OPP(0) + + + ... + + + + + OPP(0) + + + + + OPTC + + + + + ... + + SDP + + + + DPPCLK267.958Mhz + DISPCLK541.275 Mhz + DCFCLK506 Mhz + SymCLK + + DIO + + + + VirtualPCLK + + + -- 2.35.1