From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from fhigh-a4-smtp.messagingengine.com (fhigh-a4-smtp.messagingengine.com [103.168.172.155]) (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 1C2912206A4; Mon, 10 Mar 2025 09:24:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.155 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741598671; cv=none; b=mzvyAXuYSwV+PWGPUBPxtwgWThWmQ9BQa3DqlXOTxyi/2j6Chqp7NjQ+oN7opreD4SJN5aklrVEwXug+uTugGOjyu38kYGT/Od0rEMz+dmGJHh5+CuksHEghPo4JFqUrtpUBP1I4VP75c3v0iOrOpbqIXbIGC8fRdUNUgo83j1M= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741598671; c=relaxed/simple; bh=359TpViH1ZUKNmUJtlhD0FWuI8PgTTd3TinY+Na8bQw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=TDO5kZeOEjO8L62braQ6XdCETtiNu/VY2x3UcqyygfX7Jd0XIfvRkvZS6NsL20bK8yegzwzMTJgl5qI62r3U5tPgoZu49UtVOCg9bn+FzuFdnEZRqdVtC8jH8gaaDWVO63jvWI/UHRFjIg05IqVTcgcBf4dv/u5p+GjiN/DClXM= 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=Z8yrxwY/; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=VBSEQ7Ua; arc=none smtp.client-ip=103.168.172.155 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="Z8yrxwY/"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="VBSEQ7Ua" Received: from phl-compute-01.internal (phl-compute-01.phl.internal [10.202.2.41]) by mailfhigh.phl.internal (Postfix) with ESMTP id 7265C114011F; Mon, 10 Mar 2025 05:24:29 -0400 (EDT) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-01.internal (MEProxy); Mon, 10 Mar 2025 05:24:29 -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=fm1; t=1741598669; x= 1741685069; bh=TAmJYyEumzEou620QY11fdpDk+WMryARn7BRuJePqUo=; b=Z 8yrxwY/Oz7joEWm4RohGpeoObdIptXmdxxqQH/kIIKjHbLbsCBE+zsWQy8SN6axF epwihAZtoHfhSrH+trsGbM/B2KYqXYS5RykHjAXQSB9fTmp7tA0DdDgHGSTkuwrv 3CFnYY2+KynxcfL1RB3hxmRkjeYTYMobLztrKGiHDefyEyb4AEfNTu/uDTmF1r4K aRD+Qsyu24du2OhOF0SbsuasShxQhUHSIHbW7ykKkKlXsswDmInFE/pY7QR55Pa+ S/gmxFuy4KhXMGvxMFE8Fnvzn+rhPaVmXx8yFo3z+9VAX7srg6BfuXot2JTAs7dM YvowPLhQYxKKFb9s6QSvw== 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-sender :x-me-sender:x-sasl-enc; s=fm1; t=1741598669; x=1741685069; bh=T AmJYyEumzEou620QY11fdpDk+WMryARn7BRuJePqUo=; b=VBSEQ7Ua8Ok6PRaIU 2tSYUx6XPMf7oGvvIb6lZ4YsBeRqTl+nhYgHdyP2fiBOMSNkHFPgC0Yb1NScWrQd 9BOpgFj8q2PZjaB1abvXafknYXanc3YIly7mKNtgZppnoILO4r5sxX1tbdU8ffP3 T59Rz3ecDjBBZw/1Q92yQo2Q5Q5bNx0wWo6vg5zvZaKp9AmfYEqsJ/kcTfX75cD2 XFFIu9h1hrxdV4GMKfjtPA6IaMBTOe5xX3cSflhKImagyBK2SYzH6stwKpM0Xzv9 aEGatj4Z6QSBr78OBplOoyrEAVgKmSQjp50fMkFY0iOkjh+geZ5MXMLa1gGZ+ESw naNFw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdduudekleekucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggv pdfurfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpih gvnhhtshculddquddttddmnecujfgurhephffvvefufffkofgjfhgggfestdekredtredt tdenucfhrhhomheptfihrghnucghrghlkhhlihhnuceorhihrghnsehtvghsthhtohgrsh htrdgtohhmqeenucggtffrrghtthgvrhhnpeffheeiffegtdfgffejteevgeefkeelieel keevueetffetteduffevgeeiieehteenucevlhhushhtvghrufhiiigvpedtnecurfgrrh grmhepmhgrihhlfhhrohhmpehrhigrnhesthgvshhtthhorghsthdrtghomhdpnhgspghr tghpthhtohepvdegpdhmohguvgepshhmthhpohhuthdprhgtphhtthhopehmrhhiphgrrh gusehkvghrnhgvlhdrohhrghdprhgtphhtthhopeifvghnshestghsihgvrdhorhhgpdhr tghpthhtohepmhgrrghrthgvnhdrlhgrnhhkhhhorhhstheslhhinhhugidrihhnthgvlh drtghomhdprhgtphhtthhopehtiihimhhmvghrmhgrnhhnsehsuhhsvgdruggvpdhrtghp thhtoheprghirhhlihgvugesghhmrghilhdrtghomhdprhgtphhtthhopegurghnihgvlh esfhhffihllhdrtghhpdhrtghpthhtohepjhgvrhhnvghjrdhskhhrrggsvggtsehgmhgr ihhlrdgtohhmpdhrtghpthhtohepshgrmhhuvghlsehshhholhhlrghnugdrohhrghdprh gtphhtthhopehrohgshheskhgvrhhnvghlrdhorhhg X-ME-Proxy: Feedback-ID: idc0145fc:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 10 Mar 2025 05:24:22 -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 , Hironori KIKUCHI , Philippe Simons , Dmitry Baryshkov , 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 v8 03/11] drm: sun4i: de2/de3: add generic blender register reference function Date: Mon, 10 Mar 2025 22:09:49 +1300 Message-ID: <20250310092345.31708-4-ryan@testtoast.com> X-Mailer: git-send-email 2.48.1 In-Reply-To: <20250310092345.31708-1-ryan@testtoast.com> References: <20250310092345.31708-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 7fe5ce20082a..43c413052a22 100644 --- a/drivers/gpu/drm/sun4i/sun8i_mixer.h +++ b/drivers/gpu/drm/sun4i/sun8i_mixer.h @@ -217,6 +217,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.48.1