Received: from fhigh3-smtp.messagingengine.com (fhigh3-smtp.messagingengine.com [103.168.172.154]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0FB64161313; Sat, 21 Sep 2024 09:54:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.154 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726912446; cv=none; b=S7X1EFmxowJ3h8Jqy631IiveOUOL4v2oejvZfylbAC7vDkOMtB4F3VkITR8o/cedV00KXLZ7mifa01OQshN7PnF5skI8REuV+yGnThEFGP51ijZ+WjW1NBt8mVdQl4sfEFZGqQUfLE3EGKzm4WjS1WKYEXfpji3cIj3SppLoh2s= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726912446; c=relaxed/simple; bh=hyPojGGohhnXMO8b5gQwGhaz+6XqSf3SialaF5c9pDE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=TRFMJYzXQrqMpbFltGKmmLS0PYAfKGGDPTPKsiB89Sj6vInWwOhB7m5D42LKC8xTN2kZmJcS4JNlqUz4PUbLci2WeVXRyp6+cOtgMc0uA5/AuKTrEWhg0pp/V9OZqd7A0rmlJsr9mSNSiqrHAak2jOfVHJm/0aDfy3BytcLMdDA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=testtoast.com; spf=pass smtp.mailfrom=testtoast.com; dkim=pass (2048-bit key) header.d=testtoast.com header.i=@testtoast.com header.b=ODIB9VBV; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=d2bscYA7; arc=none smtp.client-ip=103.168.172.154 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=testtoast.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=testtoast.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=testtoast.com header.i=@testtoast.com header.b="ODIB9VBV"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="d2bscYA7" Received: from phl-compute-01.internal (phl-compute-01.phl.internal [10.202.2.41]) by mailfhigh.phl.internal (Postfix) with ESMTP id 2AD921140245; Sat, 21 Sep 2024 05:54:04 -0400 (EDT) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-01.internal (MEProxy); Sat, 21 Sep 2024 05:54:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=testtoast.com; h=cc:cc:content-transfer-encoding:content-type:date:date:from :from:in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to; s=fm2; t=1726912444; x= 1726998844; bh=vFAn77DPkhVmiFKjEXXB2+gUQSssJmHTL5ELI1Q/NII=; b=O DIB9VBVyRzM2YnTiFMxTqpWjbBiUsb02dkybBCp1hDiDcsAz6Gd8MflvS0WB+uhQ LcEPaoEziX/qePGRlmQr5gEaL12I7sCBdmol6mUS53U8BOSX/AAVf0rwUGtbXs2X QNDa0V/dNyPk6u/g0SgPXtdkljYrHCiK4Kx4P5yV3AxvZW2mg/kh0ezXI//8S9hx Cieqi2anBH4ohbJd0coNuFM3oInz/+NaFSzCrA5ooTmLjv68WDz1xqSUie1rE7bP DL7FFdDhx2Pdp7JVvLlFbNT8czE2oRulRjQTw4WP6GOufqeL2PVBVQ45GuOc1Vs2 EYzMfXvOlp91bBhIIZUXg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1726912444; x= 1726998844; bh=vFAn77DPkhVmiFKjEXXB2+gUQSssJmHTL5ELI1Q/NII=; b=d 2bscYA7jXk8Yq0x6tpx6g0fld/0PC6hkwY/e0ytqgjpgU4BHND0DygZCJLUpweHN cnj8eYCIkcvaIAwmJm8sBYt/B6mcgPvc5K974ljeO3wHW7z4iv5QcLucvM0w2SuT MeKeP2nlX49XaZYQz+iHXNwJzJAl4mLK7GbsUhu/WYFmtAc4RS4l7qv56a9/eMsA BSv5mNS9Q+BkMBOxl20N6gRxSTdzweEn5H+iytR3vZZ7HVOmlEGaSqb9GOU/Pib7 o9R4DsJOCzMb1gUxiIfOWTGis1sJ5DAiTEVjnKgcIVW9Ubaf8PZJyNJpLI0ti8Y6 Qy8fzZrD+89bqiE1w8/JA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrudelhedgvdduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh htshculddquddttddmnecujfgurhephffvvefufffkofgjfhgggfestdekredtredttden ucfhrhhomheptfihrghnucghrghlkhhlihhnuceorhihrghnsehtvghsthhtohgrshhtrd gtohhmqeenucggtffrrghtthgvrhhnpeffheeiffegtdfgffejteevgeefkeelieelkeev ueetffetteduffevgeeiieehteenucevlhhushhtvghrufhiiigvpedvnecurfgrrhgrmh epmhgrihhlfhhrohhmpehrhigrnhesthgvshhtthhorghsthdrtghomhdpnhgspghrtghp thhtohepvddvpdhmohguvgepshhmthhpohhuthdprhgtphhtthhopehmrhhiphgrrhguse hkvghrnhgvlhdrohhrghdprhgtphhtthhopeifvghnshestghsihgvrdhorhhgpdhrtghp thhtohepmhgrrghrthgvnhdrlhgrnhhkhhhorhhstheslhhinhhugidrihhnthgvlhdrtg homhdprhgtphhtthhopehtiihimhhmvghrmhgrnhhnsehsuhhsvgdruggvpdhrtghpthht oheprghirhhlihgvugesghhmrghilhdrtghomhdprhgtphhtthhopegurghnihgvlhesfh hffihllhdrtghhpdhrtghpthhtohepjhgvrhhnvghjrdhskhhrrggsvggtsehgmhgrihhl rdgtohhmpdhrtghpthhtohepshgrmhhuvghlsehshhholhhlrghnugdrohhrghdprhgtph htthhopehrohgshheskhgvrhhnvghlrdhorhhg X-ME-Proxy: Feedback-ID: idc0145fc:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 21 Sep 2024 05:53:58 -0400 (EDT) From: Ryan Walklin To: Maxime Ripard , Chen-Yu Tsai , Maarten Lankhorst , Thomas Zimmermann , David Airlie , Daniel Vetter , Jernej Skrabec , Samuel Holland , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Michael Turquette , Stephen Boyd Cc: Andre Przywara , Chris Morgan , John Watts , dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, devicetree@vger.kernel.org, linux-clk@vger.kernel.org, Ryan Walklin Subject: [PATCH v4 16/26] drm: sun4i: de2/de3: add generic blender register reference function Date: Sat, 21 Sep 2024 21:46:05 +1200 Message-ID: <20240921095153.213568-17-ryan@testtoast.com> X-Mailer: git-send-email 2.46.1 In-Reply-To: <20240921095153.213568-1-ryan@testtoast.com> References: <20240921095153.213568-1-ryan@testtoast.com> Precedence: bulk X-Mailing-List: linux-clk@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Jernej Skrabec The DE2 and DE3 engines have a blender register range within the mixer engine register map, whereas the DE33 separates this out into a separate display group. Prepare for this by adding a function to look the blender reference up, with a subsequent patch to add a conditional based on the DE type. Signed-off-by: Jernej Skrabec Signed-off-by: Ryan Walklin --- drivers/gpu/drm/sun4i/sun8i_mixer.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/gpu/drm/sun4i/sun8i_mixer.h b/drivers/gpu/drm/sun4i/sun8i_mixer.h index 82956cb97cfd9..75facc7d1fa66 100644 --- a/drivers/gpu/drm/sun4i/sun8i_mixer.h +++ b/drivers/gpu/drm/sun4i/sun8i_mixer.h @@ -224,6 +224,12 @@ sun8i_blender_base(struct sun8i_mixer *mixer) return mixer->cfg->de_type == sun8i_mixer_de3 ? DE3_BLD_BASE : DE2_BLD_BASE; } +static inline struct regmap * +sun8i_blender_regmap(struct sun8i_mixer *mixer) +{ + return mixer->engine.regs; +} + static inline u32 sun8i_channel_base(struct sun8i_mixer *mixer, int channel) { -- 2.46.1