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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 C930AC54F4E for ; Sat, 25 Jul 2026 04:51:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:Reply-To:List-Subscribe:List-Help: List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References: Message-Id:MIME-Version:Subject:Date:From:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=UnpJ36eXez3InSf3V++NCuv8OQXPbSRt4AImeojnwWU=; b=Z7K4xexXCgr3V/ LNCRyOGmcKlzToCJLAvKFlG+QI2supMB3SF6ZbDQe5FDfmK0Z8+3vckgb2k7g3AYt8r7CasJdJAA/ 7xCIOn0MiQM3NEkGOLhyJS5ohRSE/J6MSt9aRWhJhOOdtDxg3aI/BUHOjot3GYvPh/5oTjBKJroqb ClmFe7+LiMuX1DcQmi9YMNwdHrus6S2w4bXKjtuZZDerSaT4AN9G2Ihb1eUxsLfMxZfMVSLHHC/IW 08R1I5jfTgL3DvhKkQUeqIFpJ98zRsy4UdZuRwbvVIB2Ag6u5n+T7u7sY/uelTTUk5LM1QC79YT8W B+BgXfED/uc42q529FdA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.99.1 #2 (Red Hat Linux)) id 1wnUMC-000000000Xv-21oL; Sat, 25 Jul 2026 04:51:28 +0000 Received: from sea.source.kernel.org ([172.234.252.31]) by bombadil.infradead.org with esmtps (Exim 4.99.1 #2 (Red Hat Linux)) id 1wnUM9-000000000St-42e4; Sat, 25 Jul 2026 04:51:26 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sea.source.kernel.org (Postfix) with ESMTP id E790445168; Sat, 25 Jul 2026 04:51:24 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPS id AA3ADC4AF62; Sat, 25 Jul 2026 04:51:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1784955084; bh=5zZW995uf/6w0u2dAu/TOOs0m5Ysq8k20PuGakI4aTM=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=saD/zhwrwqM1ivE1WJ8nHZ/qyd/7ro3szomZt/rcxqay+Eya8RmtEn5FTFqlP3rHT iTffCy2MyNfVdr6CB10TE9JgDNBKQDLbXb7uJSgTu8n37+SB5neNnNQlMxuPh+0Ois Z4X4kcquJKq/p0kI/D+Bn7yFsy2wizIxFUeFjXSkxqCcPUmCU7s7ut4ZaEX/5obHnP Uj79kv9tWo0CQ4uTY/ut+PT1loUqunb3UFAxg9akVE0uZOcKnsh/aTTdQkkUzctiR7 HFEoqCLlhKfxVzZT213l1dXgDnSy9AwBACASNUj0ZgQeSqMVwJGTDWoq7YTRAd5YYG NG08aOxpl/FEQ== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9827AC53209; Sat, 25 Jul 2026 04:51:24 +0000 (UTC) From: Cody Kang via B4 Relay Date: Sat, 25 Jul 2026 00:51:18 -0400 Subject: [PATCH RESEND 09/17] drm/spacemit: add Saturn DPU hardware backend MIME-Version: 1.0 Message-Id: <20260725-k3-display-v1-9-6de34d80e86c@gmail.com> References: <20260725-k3-display-v1-0-6de34d80e86c@gmail.com> In-Reply-To: <20260725-k3-display-v1-0-6de34d80e86c@gmail.com> To: David Airlie , Simona Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Yixun Lan , Vinod Koul , Neil Armstrong , Haylen Chu , Michael Turquette , Stephen Boyd , Brian Masney , Philipp Zabel , Paul Walmsley , Palmer Dabbelt , Albert Ou , Alexandre Ghiti Cc: dri-devel@lists.freedesktop.org, linux-riscv@lists.infradead.org, devicetree@vger.kernel.org, spacemit@lists.linux.dev, linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org, linux-clk@vger.kernel.org, Cody Kang X-Mailer: b4 0.15.1 X-Developer-Signature: v=1; a=ed25519-sha256; t=1784955080; l=55317; i=codykang.hk@gmail.com; s=codykang; h=from:subject:message-id; bh=4b18IUpxdUPuc2UR1fOBGWI/fWiMRSKOdqaqfhq7tZE=; b=avDJ5H0XdxKJApr6fNR0yabuXucg8m8K6F/LMsNf+0y1i5FiNEpD6wEQ5vp7kOtwvqMjjDtdB 5IXfUK/y5YCB4fV5TAZceAGTkwsOYI00r01yI740bvN1xZmAvyYlHsK X-Developer-Key: i=codykang.hk@gmail.com; a=ed25519; pk=Osn6/cs9Su/mHHw4P19cmVc3v2FMQfiWahjsN0vEkuk= X-Endpoint-Received: by B4 Relay for codykang.hk@gmail.com/codykang with auth_id=895 X-Original-From: Cody Kang X-BeenThere: linux-phy@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux Phy Mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: codykang.hk@gmail.com Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-phy" Errors-To: linux-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.org From: Cody Kang Add the register-level programming of one Saturn instance: clock and reset bring-up, scene control and timing generator setup, RDMA channel and composer layer programming, FBC line-buffer budgeting, interrupt dispatch and the cfg-ready/vsync handshake that paces commits. The backend is exposed as an ops table and hardware descriptor to be aggregated by the KMS layer in an upcoming patch. Signed-off-by: Cody Kang --- drivers/gpu/drm/spacemit/dpu/dpu_saturn.c | 483 +++++++++++ drivers/gpu/drm/spacemit/dpu/dpu_saturn_hee.c | 896 +++++++++++++++++++++ drivers/gpu/drm/spacemit/dpu/saturn_fbcmem.c | 152 ++++ drivers/gpu/drm/spacemit/dpu/saturn_fbcmem.h | 21 + drivers/gpu/drm/spacemit/dpu/saturn_regs/ops_hee.h | 52 ++ 5 files changed, 1604 insertions(+) diff --git a/drivers/gpu/drm/spacemit/dpu/dpu_saturn.c b/drivers/gpu/drm/spacemit/dpu/dpu_saturn.c new file mode 100644 index 000000000000..8d5f13bc5373 --- /dev/null +++ b/drivers/gpu/drm/spacemit/dpu/dpu_saturn.c @@ -0,0 +1,483 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2025-2026 SpacemiT Co., Ltd. + * + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "dpu_saturn.h" +#include "saturn_fbcmem.h" +#include "../spacemit_cmdlist.h" +#include "../spacemit_dmmu.h" +#include "../spacemit_dpu_reg.h" +#include "../spacemit_drm.h" +#include