From patchwork Mon Apr 11 04:34:19 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Holland X-Patchwork-Id: 12808506 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 EDEF1C433F5 for ; Mon, 11 Apr 2022 04:37:20 +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:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=LlN0Cl7iSi5BnS/vSQDT/hYLrxOD6h46eLOIrLEON20=; b=Ma7yl6cQUdg4zU ofJjVtecLhwF2Eh4uRNikiJyEaBCSnA0ezYEufGF5PVGT2dn6QbJKrN4hM7iGE/r8hpPyFzCpsRur G4gGmKzweRLJw0hJuMyzP3QT6tNUs+AHOZEVjtPjwKETyCK3gGVl+Jh0Wii3UqMSBW1ggMAAscT+g HibXiV1MtBbZGWG/p+jCC6i4l+XHLfQ5ISheu12DG7J2sQ0qguFSGS1hR65ZxTuQkzjThQ0yy63P0 u10pMy+Lt2K+ABNX7UsKOzFmsYx5ow072UaHoNZ4qmRefJWojC3n4xMV7SskwgPldVreHu8Xye/Gy Ijp83V2Fe7P3PMeXFu2Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ndlmc-006aWs-NJ; Mon, 11 Apr 2022 04:36:10 +0000 Received: from wout1-smtp.messagingengine.com ([64.147.123.24]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ndllK-006Zt6-6N for linux-arm-kernel@lists.infradead.org; Mon, 11 Apr 2022 04:34:51 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id DEAF13201F43; Mon, 11 Apr 2022 00:34:48 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Mon, 11 Apr 2022 00:34:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sholland.org; h= cc:cc:content-transfer-encoding:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm2; t=1649651688; x=1649738088; bh=N4 owQ9/Cd3nixi2R9mF9dun/uhDiVSwowfRJ5Lt96QU=; b=wYGxErcydPByZPckw1 FGP092owOmC8xV7Lj+e2uCLfXDitkHg1SrOMc6FBAGfvwpB1nPaggjKO3Hm1GoqC Oim9JbETWrQETP+nZaGD/Et9mBTb2H9o6eckU58aF5YrLZ9d7VYS+ns89H8vYcDC VTZQMNzU35JFCSGasNv19qimSoXNH7laIegMZqsgTEQuohuh0SuAYfjSoxkJPPpM 9uCWmt7KTpPQeggSv9sPojfAg6yuIJXu4tl3Ck/i+kmmrA3o06M3u8LrKrsCagPH IJx0/Wg/ZOfcxLH0vLFAbBbeWmCOrVch+pPEY0o9j3QC5nur+EzkdmlTjAiXRIVx ldqw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t= 1649651688; x=1649738088; bh=N4owQ9/Cd3nixi2R9mF9dun/uhDiVSwowfR J5Lt96QU=; b=XaHpD8jZEslw3zz6Z+6Mnjw8n/TBt6U5gP370/WKVPYYJXGZp9C cyNJQjYnjLDyuxCQImaL4V1h4GAqpN0cceqjALV+DnGkUffNkqjefqOsfGu/P0WN II7vln8mfQqA/BCwjbdaMX0zNEBgK9Y/rCEni5dhNBBtRDFVA37Ru6heeLh3m1th Vq4sMTMt5qcAAVfCN9UuOo1nW9j/udenuRy7nKnq5APROG6CsT/MVna/8cEBcyny EinDdYoLuB6jBQp/AUP5pzuOnOl19xuHcpJAtSR0sSjWzA9mT49JLltaVc+kuC6U JgLqz2vj7jv8kmqvpY56PszijaJ2TGI1B7w== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrudekhedgjeelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefurghmuhgv lhcujfholhhlrghnugcuoehsrghmuhgvlhesshhhohhllhgrnhgurdhorhhgqeenucggtf frrghtthgvrhhnpeduhfejfedvhffgfeehtefghfeiiefgfeehgfdvvdevfeegjeehjedv gfejheeuieenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhroh hmpehsrghmuhgvlhesshhhohhllhgrnhgurdhorhhg X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 11 Apr 2022 00:34:47 -0400 (EDT) From: Samuel Holland To: Chen-Yu Tsai , Jernej Skrabec , Maxime Ripard Cc: Samuel Holland , Daniel Vetter , David Airlie , Krzysztof Kozlowski , Rob Herring , devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-sunxi@lists.linux.dev Subject: [PATCH 07/10] drm/sun4i: Add support for D1 mixers Date: Sun, 10 Apr 2022 23:34:19 -0500 Message-Id: <20220411043423.37333-8-samuel@sholland.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220411043423.37333-1-samuel@sholland.org> References: <20220411043423.37333-1-samuel@sholland.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220410_213450_326537_1C020C24 X-CRM114-Status: GOOD ( 12.25 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org D1 has a display engine with the usual pair of mixers, albeit with relatively few layers. In fact, D1 appears to be the first SoC to have a mixer without any UI layers. Add support for these new variants. Signed-off-by: Samuel Holland Acked-by: Jernej Skrabec --- drivers/gpu/drm/sun4i/sun8i_mixer.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/drivers/gpu/drm/sun4i/sun8i_mixer.c b/drivers/gpu/drm/sun4i/sun8i_mixer.c index f5e8aeaa3cdf..49c0d17c6f0a 100644 --- a/drivers/gpu/drm/sun4i/sun8i_mixer.c +++ b/drivers/gpu/drm/sun4i/sun8i_mixer.c @@ -585,6 +585,24 @@ static const struct sun8i_mixer_cfg sun8i_v3s_mixer_cfg = { .mod_rate = 150000000, }; +static const struct sun8i_mixer_cfg sun20i_d1_mixer0_cfg = { + .ccsc = 2, + .mod_rate = 297000000, + .scaler_mask = 0x3, + .scanline_yuv = 2048, + .ui_num = 1, + .vi_num = 1, +}; + +static const struct sun8i_mixer_cfg sun20i_d1_mixer1_cfg = { + .ccsc = 1, + .mod_rate = 297000000, + .scaler_mask = 0x1, + .scanline_yuv = 1024, + .ui_num = 0, + .vi_num = 1, +}; + static const struct sun8i_mixer_cfg sun50i_a64_mixer0_cfg = { .ccsc = 0, .mod_rate = 297000000, @@ -638,6 +656,14 @@ static const struct of_device_id sun8i_mixer_of_table[] = { .compatible = "allwinner,sun8i-v3s-de2-mixer", .data = &sun8i_v3s_mixer_cfg, }, + { + .compatible = "allwinner,sun20i-d1-de2-mixer-0", + .data = &sun20i_d1_mixer0_cfg, + }, + { + .compatible = "allwinner,sun20i-d1-de2-mixer-1", + .data = &sun20i_d1_mixer1_cfg, + }, { .compatible = "allwinner,sun50i-a64-de2-mixer-0", .data = &sun50i_a64_mixer0_cfg,