From patchwork Wed Sep 27 07:26:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13400241 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 C6E15E810C8 for ; Wed, 27 Sep 2023 07:47:57 +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=KYVBOTm9MBwM4+39BwQTO9PBtO5DWsOnMAQEo1hTJ8M=; b=cUHSs3EPmLeHc/ kuLMtBMpT886vLcvcPx6AUhrHdUWYZ3uy7vKPmXKoc9rlhaIdNvvsIxqX3q6/IabGRvJHro2b2qcH pk6L243z3kjQzj1obPE1knYPHXJ8Z1QBiXoDJVpfY+rpxmntFEzt5CFAS2ROqNChptwi8aDRe8Rq5 V2zmM+eMxKwo+pUb33xxnoA15PT++WNwzpKamRPegLrOuLcEg+n71GmbFe51OKBHdKdSleRnvQ9V8 5ylWtZp6m1E5QjDBQzHUMw/t+yIto7xwnwMkMXA9iLFV4ugU4LV2H8GXcnn8tTX9y4hdVDgSyy0yw jwTtKo/2eHFZgd4tO2zA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qlPGc-000Dbd-1V; Wed, 27 Sep 2023 07:47:30 +0000 Received: from smtp-out1.suse.de ([2001:67c:2178:6::1c]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qlPGZ-000DYc-2x for linux-arm-kernel@lists.infradead.org; Wed, 27 Sep 2023 07:47:29 +0000 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 14B652187B; Wed, 27 Sep 2023 07:47:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1695800845; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=oY0i4UK34L7nr7xZ30uhUhEt/fgW7HZcMAw4vpL9y1w=; b=NAQrwn0vOHOUeDtuz8duOP1q1KKGXBNIwG07Y8PXZFF8/eRGffAGwSX+2wprVd5qKIS2nl tC3AyshRyocOz9YyWnCDPc/UznY2y1LGAWww2EaR2+DUSeHNa9fYbpNohnhZh9F1t7QoXs 6HShFT7l8mKFkOOGFsIncX4YANa7OCo= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1695800845; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=oY0i4UK34L7nr7xZ30uhUhEt/fgW7HZcMAw4vpL9y1w=; b=d4200Of02irElHR6+7mnD0qgX7ZRqn+zUs808jVnl3d30fb/rMv4QFpRj0NQgzfDXutwdf ZNF9qbsmrxvWVRAg== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id D0C5C13A74; Wed, 27 Sep 2023 07:47:24 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id MMQpMgzeE2XvUQAAMHmgww (envelope-from ); Wed, 27 Sep 2023 07:47:24 +0000 From: Thomas Zimmermann To: deller@gmx.de, javierm@redhat.com, sam@ravnborg.org, arnd@arndb.de, daniel@ffwll.ch Cc: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-nvidia@lists.surfsouth.com, linux-omap@vger.kernel.org, linux-parisc@vger.kernel.org, Thomas Zimmermann Subject: [PATCH 01/46] fbdev: Provide I/O-memory helpers as module Date: Wed, 27 Sep 2023 09:26:34 +0200 Message-ID: <20230927074722.6197-2-tzimmermann@suse.de> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20230927074722.6197-1-tzimmermann@suse.de> References: <20230927074722.6197-1-tzimmermann@suse.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230927_004728_121403_807F68DD X-CRM114-Status: GOOD ( 11.91 ) 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 Provide helpers for accessing I/O memory in a helper module. The fbdev core uses these helpers, so select the module unconditionally for fbdev. Drivers will later be able to select the module individually and the helpers will become optional. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas --- drivers/video/fbdev/core/Kconfig | 6 ++++++ drivers/video/fbdev/core/Makefile | 3 ++- drivers/video/fbdev/core/fb_io_fops.c | 3 +++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/drivers/video/fbdev/core/Kconfig b/drivers/video/fbdev/core/Kconfig index 756c8603cf39b..7a3ed13bed708 100644 --- a/drivers/video/fbdev/core/Kconfig +++ b/drivers/video/fbdev/core/Kconfig @@ -4,6 +4,7 @@ # config FB_CORE + select FB_IOMEM_FOPS select VIDEO_CMDLINE tristate @@ -144,12 +145,17 @@ config FB_DMAMEM_HELPERS select FB_SYS_FOPS select FB_SYS_IMAGEBLIT +config FB_IOMEM_FOPS + tristate + depends on FB_CORE + config FB_IOMEM_HELPERS bool depends on FB_CORE select FB_CFB_COPYAREA select FB_CFB_FILLRECT select FB_CFB_IMAGEBLIT + select FB_IOMEM_FOPS config FB_IOMEM_HELPERS_DEFERRED bool diff --git a/drivers/video/fbdev/core/Makefile b/drivers/video/fbdev/core/Makefile index 36d3156dc759c..c1d657601b2be 100644 --- a/drivers/video/fbdev/core/Makefile +++ b/drivers/video/fbdev/core/Makefile @@ -3,7 +3,7 @@ obj-$(CONFIG_FB_NOTIFY) += fb_notify.o obj-$(CONFIG_FB_CORE) += fb.o fb-y := fb_info.o \ fbmem.o fbcmap.o \ - modedb.o fbcvt.o fb_cmdline.o fb_io_fops.o + modedb.o fbcvt.o fb_cmdline.o ifdef CONFIG_FB fb-y += fb_backlight.o fbmon.o endif @@ -28,6 +28,7 @@ fb-$(CONFIG_LOGO) += fb_logo.o obj-$(CONFIG_FB_CFB_FILLRECT) += cfbfillrect.o obj-$(CONFIG_FB_CFB_COPYAREA) += cfbcopyarea.o obj-$(CONFIG_FB_CFB_IMAGEBLIT) += cfbimgblt.o +obj-$(CONFIG_FB_IOMEM_FOPS) += fb_io_fops.o obj-$(CONFIG_FB_SYS_FILLRECT) += sysfillrect.o obj-$(CONFIG_FB_SYS_COPYAREA) += syscopyarea.o obj-$(CONFIG_FB_SYS_IMAGEBLIT) += sysimgblt.o diff --git a/drivers/video/fbdev/core/fb_io_fops.c b/drivers/video/fbdev/core/fb_io_fops.c index 5985e5e1b040c..871b829521af3 100644 --- a/drivers/video/fbdev/core/fb_io_fops.c +++ b/drivers/video/fbdev/core/fb_io_fops.c @@ -131,3 +131,6 @@ ssize_t fb_io_write(struct fb_info *info, const char __user *buf, size_t count, return (cnt) ? cnt : err; } EXPORT_SYMBOL(fb_io_write); + +MODULE_DESCRIPTION("Fbdev helpers for framebuffers in I/O memory"); +MODULE_LICENSE("GPL"); From patchwork Wed Sep 27 07:26:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13400248 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 91100E7F14F for ; Wed, 27 Sep 2023 07:48:09 +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=FdiSLUrzXhUqeJjhBHM/beLu3F3QxCVo6F0bCdZ9p6M=; b=TGmmsZcuyOOMb/ Oqj5Q57AblDDtKbd7cMDBEG0nW42GvQoEDAVKH9fr170bxx0sU5PHCMSI/7NXEGEe8TR09lSmZGdQ +ngIwq22K3Nh77uzivwvREJLkkx3YL/IxAzeTLg9XcwMtNRTk756i4AyWdWPjIUoCvFRuvTGIT6oD jKuE9IRu7a3MI4Gi0OVhnHc9Pdk/QZ7FR7Anef8YqUmnqg6xLVJ8SfubhMb3dum73kNUi46UQpMS/ Id8mUEVvfqYSzhPPotLCSnOAzx3ydnAZer0yZRG4v+bG1yWRp43cVHTFqlf8l0/tE5dHkDGPI/i5K dNoVIp5AGoYXbDAgz3ew==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qlPGn-000DnV-07; Wed, 27 Sep 2023 07:47:41 +0000 Received: from smtp-out2.suse.de ([195.135.220.29]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qlPGa-000DYd-31 for linux-arm-kernel@lists.infradead.org; Wed, 27 Sep 2023 07:47:33 +0000 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 5738D1F897; Wed, 27 Sep 2023 07:47:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1695800845; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=5HaPVljnpjkFD2YdeJo0vWJ6OUpqhQ0QctV6KzfcKc0=; b=jJjgZYjtXI/ykIsrffxhfyQiCb7hg7CejksKX7NS4hGu0O0jrU0McMSUt0fjA6W4seDT02 eK3VCVJULZUiGKgViPvPBJcJGaSDE26WNHU+3LVfbi3qG/cvzjmTq/0jstvEkf1No0aNCC 7S5vSmt+uot/CtdCl7O8c2icvzZCj50= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1695800845; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=5HaPVljnpjkFD2YdeJo0vWJ6OUpqhQ0QctV6KzfcKc0=; b=vHAkbN3zjuM1bxnPzK9j0z676nnv2THBcr9o5aKwuwwMO1lHZN3EuxE5i37B18SM9c6wB/ pzvNVV6pz1TWJHCQ== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 1A0D11338F; Wed, 27 Sep 2023 07:47:25 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id wOqGBQ3eE2XvUQAAMHmgww (envelope-from ); Wed, 27 Sep 2023 07:47:25 +0000 From: Thomas Zimmermann To: deller@gmx.de, javierm@redhat.com, sam@ravnborg.org, arnd@arndb.de, daniel@ffwll.ch Cc: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-nvidia@lists.surfsouth.com, linux-omap@vger.kernel.org, linux-parisc@vger.kernel.org, Thomas Zimmermann Subject: [PATCH 02/46] fbdev/68328fb: Initialize fb_ops to fbdev I/O-memory helpers Date: Wed, 27 Sep 2023 09:26:35 +0200 Message-ID: <20230927074722.6197-3-tzimmermann@suse.de> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20230927074722.6197-1-tzimmermann@suse.de> References: <20230927074722.6197-1-tzimmermann@suse.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230927_004729_119237_EADC2BAE X-CRM114-Status: GOOD ( 13.59 ) 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 Initialize the instance of struct fb_ops with fbdev initializer macros for framebuffers in I/O address space. Set the read/write, draw and mmap callbacks to the correct implementation and avoid implicit defaults. Also select the necessary I/O helpers in Kconfig. Fbdev drivers sometimes rely on the callbacks being NULL for a default implementation to be invoked; hence requiring the I/O helpers to be built in any case. Setting all callbacks in all drivers explicitly will allow to make the I/O helpers optional. This benefits systems that do not use these functions. No functional changes. Signed-off-by: Thomas Zimmermann --- drivers/video/fbdev/68328fb.c | 5 ++--- drivers/video/fbdev/Kconfig | 4 +--- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/video/fbdev/68328fb.c b/drivers/video/fbdev/68328fb.c index 956dd2399cc0b..c24156eb3d0f6 100644 --- a/drivers/video/fbdev/68328fb.c +++ b/drivers/video/fbdev/68328fb.c @@ -95,13 +95,12 @@ static int mc68x328fb_mmap(struct fb_info *info, struct vm_area_struct *vma); static const struct fb_ops mc68x328fb_ops = { .owner = THIS_MODULE, + __FB_DEFAULT_IOMEM_OPS_RDWR, .fb_check_var = mc68x328fb_check_var, .fb_set_par = mc68x328fb_set_par, .fb_setcolreg = mc68x328fb_setcolreg, .fb_pan_display = mc68x328fb_pan_display, - .fb_fillrect = cfb_fillrect, - .fb_copyarea = cfb_copyarea, - .fb_imageblit = cfb_imageblit, + __FB_DEFAULT_IOMEM_OPS_DRAW, .fb_mmap = mc68x328fb_mmap, }; diff --git a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig index e142b15862cb7..94f578a44f275 100644 --- a/drivers/video/fbdev/Kconfig +++ b/drivers/video/fbdev/Kconfig @@ -1541,9 +1541,7 @@ config FB_G364 config FB_68328 bool "Motorola 68328 native frame buffer support" depends on (FB = y) && (M68328 || M68EZ328 || M68VZ328) - select FB_CFB_FILLRECT - select FB_CFB_COPYAREA - select FB_CFB_IMAGEBLIT + select FB_IOMEM_HELPERS help Say Y here if you want to support the built-in frame buffer of the Motorola 68328 CPU family. From patchwork Wed Sep 27 07:26:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13400392 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 366A7E810B2 for ; Wed, 27 Sep 2023 09:00:31 +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=R9468TnShqahgpB5ccuzFDrFZajvuxP2THHM9PGExt0=; b=FsPkbZi1N+sh4e XBEhFJB4RmCPYafu1U51NjeoT/8/nl+X9gJCqWE6jT/gQ1tgk9qABTObdcoOXsOVbmiPzJSQ7x1YS 6/epz7IMaeunCIyF2WlSwgd9QT5TTMYXH15Ml2FeBxDCHjgfdnulY0/nISFTBbX/912ucp7pftrkm /+BI5bImd3KdBQDhWvfaEBU10mHNsAATEuPm+YTbZwgbn8Ysut4YrtYu5lRyQ/jC80HuADd/sFLCW xgR9wIT4Y904az4ncmrKuU3T7bfFVIPmUZyvVAx9QaOuSd/hmKkyv5YupV+LdoUsxDoq5dYXwzMKV /prnsX5UoQwLqm9h/rzg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qlQPC-000P88-2W; Wed, 27 Sep 2023 09:00:26 +0000 Received: from smtp-out1.suse.de ([2001:67c:2178:6::1c]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qlPGa-000DYh-0z for linux-arm-kernel@lists.infradead.org; Wed, 27 Sep 2023 07:47:30 +0000 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 8F34721889; Wed, 27 Sep 2023 07:47:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1695800845; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=hkgSI0ZcvWgWjpmsP9qRZT1z0fKYpTV15lW1nvyfYQA=; b=cqV4PCm5AnTDKDyRbiVVTei+pwQQ6/+3Jv69ZichVib1i0h14Czt15qpcaJAbkQ5gMRmVc PXtCV4F22Fccb1kpkO7YwF4pU1buW0JN6fshXTMQxX73rFz6WLenf38JfDWvLh8WfW9Qqr gHwm8t4RmdEJ6YJcMO7hJOXti8W4u6s= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1695800845; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=hkgSI0ZcvWgWjpmsP9qRZT1z0fKYpTV15lW1nvyfYQA=; b=LQNfRuERIfFkd1D5Y/2XZE+4ztziqNc2tVC1dsj5DYo/z/RZ0+f6FXMZQ5UuWjlFlny9s5 9350ipLCDrqJYSBg== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 5A89B13A74; Wed, 27 Sep 2023 07:47:25 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id eO5RFQ3eE2XvUQAAMHmgww (envelope-from ); Wed, 27 Sep 2023 07:47:25 +0000 From: Thomas Zimmermann To: deller@gmx.de, javierm@redhat.com, sam@ravnborg.org, arnd@arndb.de, daniel@ffwll.ch Cc: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-nvidia@lists.surfsouth.com, linux-omap@vger.kernel.org, linux-parisc@vger.kernel.org, Thomas Zimmermann Subject: [PATCH 03/46] fbdev/amba-clcd: Initialize fb_ops to fbdev I/O-memory helpers Date: Wed, 27 Sep 2023 09:26:36 +0200 Message-ID: <20230927074722.6197-4-tzimmermann@suse.de> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20230927074722.6197-1-tzimmermann@suse.de> References: <20230927074722.6197-1-tzimmermann@suse.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230927_004728_512009_58FEA322 X-CRM114-Status: GOOD ( 13.52 ) 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 Initialize the instance of struct fb_ops with fbdev initializer macros for framebuffers in I/O address space. Set the read/write, draw and mmap callbacks to the correct implementation and avoid implicit defaults. Also select the necessary I/O helpers in Kconfig. Fbdev drivers sometimes rely on the callbacks being NULL for a default implementation to be invoked; hence requiring the I/O helpers to be built in any case. Setting all callbacks in all drivers explicitly will allow to make the I/O helpers optional. This benefits systems that do not use these functions. No functional changes. Signed-off-by: Thomas Zimmermann --- drivers/video/fbdev/Kconfig | 4 +--- drivers/video/fbdev/amba-clcd.c | 5 ++--- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig index 94f578a44f275..d7b6e9885fe54 100644 --- a/drivers/video/fbdev/Kconfig +++ b/drivers/video/fbdev/Kconfig @@ -118,9 +118,7 @@ config FB_ARMCLCD tristate "ARM PrimeCell PL110 support" depends on ARM || ARM64 || COMPILE_TEST depends on FB && ARM_AMBA && HAS_IOMEM - select FB_CFB_FILLRECT - select FB_CFB_COPYAREA - select FB_CFB_IMAGEBLIT + select FB_IOMEM_HELPERS select FB_MODE_HELPERS if OF select VIDEOMODE_HELPERS if OF select BACKLIGHT_CLASS_DEVICE if OF diff --git a/drivers/video/fbdev/amba-clcd.c b/drivers/video/fbdev/amba-clcd.c index 24d89e6fb7805..0399db369e709 100644 --- a/drivers/video/fbdev/amba-clcd.c +++ b/drivers/video/fbdev/amba-clcd.c @@ -412,13 +412,12 @@ static int clcdfb_mmap(struct fb_info *info, static const struct fb_ops clcdfb_ops = { .owner = THIS_MODULE, + __FB_DEFAULT_IOMEM_OPS_RDWR, .fb_check_var = clcdfb_check_var, .fb_set_par = clcdfb_set_par, .fb_setcolreg = clcdfb_setcolreg, .fb_blank = clcdfb_blank, - .fb_fillrect = cfb_fillrect, - .fb_copyarea = cfb_copyarea, - .fb_imageblit = cfb_imageblit, + __FB_DEFAULT_IOMEM_OPS_DRAW, .fb_mmap = clcdfb_mmap, }; From patchwork Wed Sep 27 07:26:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13400394 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 4C032E810B5 for ; Wed, 27 Sep 2023 09:00:33 +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=qaWqGsEdf5JzZtU37NxWbSxhtDeRVMfeYgMlxASvp2w=; b=GYQPUf7129ktcu Kn9neAjX6xGQP82H3GdCaUiN5KQmjHOTD2oeQhMLPdDUQLZV2zYzYqZ4L5XQy3/AnAVvSF5jvE5e3 6bIZ44FwjYkiUJiScjDV1M1sgAk4DAiWgsx2uSFvTY0kGULf4XVzst8UOF4rQ3xVokeWb8nbPunpP VpkwcHkT6+aUNKTDCBGBXsjL6NbaUnUwp12zsgkijWb6mzoNHAeeE2UKJdFyBZIGedwvJFO3tQ5L6 bLYgbnNfDQTfpnpN60cf4fb+X502/ImxrFyo9BGK5UUe1DtMl626fpEoJznqD1N6ocna+/UYuE7vb iEhrMCozSXGgUpBVEGLg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qlQPD-000P8w-38; Wed, 27 Sep 2023 09:00:27 +0000 Received: from smtp-out1.suse.de ([2001:67c:2178:6::1c]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qlPGa-000DYk-22 for linux-arm-kernel@lists.infradead.org; Wed, 27 Sep 2023 07:47:31 +0000 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id CCE4D2188F; Wed, 27 Sep 2023 07:47:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1695800845; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=luVhBvWd8C9dVe65alLr3Pz6idPvBOHChRLL8shqd0A=; b=O3vkiX/rC+xMIgmauD9pHFkxf2COO6D3ucA5rz2gZa28prv/O+9i07T2OnKp7r4I3XtHJj TTWrm5ziR6wFQ5F/5ooWQ/CZXrqckG4fmfwlpJTT5emvtBJeQsaAcMuWheUVWXXy4Xgsoe ygoFHnkGW6PThWTFrM4Lh/vAG8inHRE= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1695800845; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=luVhBvWd8C9dVe65alLr3Pz6idPvBOHChRLL8shqd0A=; b=zLES0alclb/4H/OVQTCgp2YfwQKEagjuYVBQCqq+9/87zaVy3x8fA8fg6xGWn4VGtjrzxg jd7CMXgTt2qVHWBg== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 915DB1338F; Wed, 27 Sep 2023 07:47:25 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id wF2rIg3eE2XvUQAAMHmgww (envelope-from ); Wed, 27 Sep 2023 07:47:25 +0000 From: Thomas Zimmermann To: deller@gmx.de, javierm@redhat.com, sam@ravnborg.org, arnd@arndb.de, daniel@ffwll.ch Cc: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-nvidia@lists.surfsouth.com, linux-omap@vger.kernel.org, linux-parisc@vger.kernel.org, Thomas Zimmermann Subject: [PATCH 04/46] fbdev/amifb: Initialize fb_ops to fbdev I/O-memory helpers Date: Wed, 27 Sep 2023 09:26:37 +0200 Message-ID: <20230927074722.6197-5-tzimmermann@suse.de> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20230927074722.6197-1-tzimmermann@suse.de> References: <20230927074722.6197-1-tzimmermann@suse.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230927_004728_832544_A0AB9A51 X-CRM114-Status: GOOD ( 13.78 ) 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 Initialize the instance of struct fb_ops with fbdev initializer macros for framebuffers in I/O address space. Set the read/write, draw and mmap callbacks to the correct implementation and avoid implicit defaults. Also select the necessary I/O helpers in Kconfig. Fbdev drivers sometimes rely on the callbacks being NULL for a default implementation to be invoked; hence requiring the I/O helpers to be built in any case. Setting all callbacks in all drivers explicitly will allow to make the I/O helpers optional. This benefits systems that do not use these functions. No functional changes. Signed-off-by: Thomas Zimmermann --- drivers/video/fbdev/Kconfig | 1 + drivers/video/fbdev/amifb.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig index d7b6e9885fe54..e24653109dea8 100644 --- a/drivers/video/fbdev/Kconfig +++ b/drivers/video/fbdev/Kconfig @@ -225,6 +225,7 @@ config FB_Q40 config FB_AMIGA tristate "Amiga native chipset support" depends on FB && AMIGA + select FB_IOMEM_FOPS help This is the frame buffer device driver for the builtin graphics chipset found in Amigas. diff --git a/drivers/video/fbdev/amifb.c b/drivers/video/fbdev/amifb.c index 441e7a8dbe584..b18c6b4f129a6 100644 --- a/drivers/video/fbdev/amifb.c +++ b/drivers/video/fbdev/amifb.c @@ -3488,6 +3488,7 @@ static irqreturn_t amifb_interrupt(int irq, void *dev_id) static const struct fb_ops amifb_ops = { .owner = THIS_MODULE, + __FB_DEFAULT_IOMEM_OPS_RDWR, .fb_check_var = amifb_check_var, .fb_set_par = amifb_set_par, .fb_setcolreg = amifb_setcolreg, @@ -3497,6 +3498,7 @@ static const struct fb_ops amifb_ops = { .fb_copyarea = amifb_copyarea, .fb_imageblit = amifb_imageblit, .fb_ioctl = amifb_ioctl, + __FB_DEFAULT_IOMEM_OPS_MMAP, }; From patchwork Wed Sep 27 07:26:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13400244 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 8FC19E810DE for ; Wed, 27 Sep 2023 07:48:05 +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=ySoub+/0eqHqaoBEkD0kq8Y36OqmMACgjUgKdtmmENA=; b=yKbLNtOYhMbLio N4mXCaS7QHKz9zZOaKncdDck1kVFf5cC//SWlBE1fYO0xAnvNoiRu7+TDWKVCJlqNiEvcgmCRZfWU otcVtMHFfceM+in8Io7e6yQJzYabci6Ih4KS3hiZtgE924+t7pF6EuQw3zC416SffyrprHCXezklm XYMf3JRpAraMlpcYhGOaR0nmd3BqHEMddJUh9k7NdisuglBbQ7EwJ8C1GKTlw86u4khsgBEJqZlx9 h4u3MORzcdwGQjqC/B4ycKGU55x0d00WFlC1le8jx13sK0tQzeew+rXRk5bloneJW+LDolu+e6v7X JkX1CbOtWZbo7dW9bekA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qlPGl-000DmL-1r; Wed, 27 Sep 2023 07:47:39 +0000 Received: from smtp-out2.suse.de ([195.135.220.29]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qlPGa-000DYl-31 for linux-arm-kernel@lists.infradead.org; Wed, 27 Sep 2023 07:47:31 +0000 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 1E6C01F899; Wed, 27 Sep 2023 07:47:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1695800846; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=kMGAppkbpU6AOjIUHzHmiI1PKhKctgWqSXZgj+cIjHw=; b=2YR2TxvY+AkquIHysYNlHEQF7icTPpCpdoyPEkaCpFLjKO5RqUzSbIA4JV0emxe/kDNmrs aWcGR3cmG/UZRXsRb1yQHDYd2iN77FrynqDF6ioLcvmnioHq8uXwp4x6nzJE4HlJhpgWJ7 TcfjRnfnsYemwNa3L/0gLtUYmSv1YU0= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1695800846; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=kMGAppkbpU6AOjIUHzHmiI1PKhKctgWqSXZgj+cIjHw=; b=kQj2soV5myVqfXRSO6v9xYK4q1A0c5QW5Rs3YyX8Dj1BTkM/9eurNDnCarEwZm+cIyPWpn gfywbGFYthBPooAw== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id CE24013A74; Wed, 27 Sep 2023 07:47:25 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id eFV+MQ3eE2XvUQAAMHmgww (envelope-from ); Wed, 27 Sep 2023 07:47:25 +0000 From: Thomas Zimmermann To: deller@gmx.de, javierm@redhat.com, sam@ravnborg.org, arnd@arndb.de, daniel@ffwll.ch Cc: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-nvidia@lists.surfsouth.com, linux-omap@vger.kernel.org, linux-parisc@vger.kernel.org, Thomas Zimmermann Subject: [PATCH 05/46] fbdev/arkfb: Initialize fb_ops to fbdev I/O-memory helpers Date: Wed, 27 Sep 2023 09:26:38 +0200 Message-ID: <20230927074722.6197-6-tzimmermann@suse.de> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20230927074722.6197-1-tzimmermann@suse.de> References: <20230927074722.6197-1-tzimmermann@suse.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230927_004729_116806_DD127C94 X-CRM114-Status: GOOD ( 11.69 ) 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 Initialize the instance of struct fb_ops with fbdev initializer macros for framebuffers in I/O address space. Set the read/write, draw and mmap callbacks to the correct implementation and avoid implicit defaults. Also select the necessary I/O helpers in Kconfig. Fbdev drivers sometimes rely on the callbacks being NULL for a default implementation to be invoked; hence requiring the I/O helpers to be built in any case. Setting all callbacks in all drivers explicitly will allow to make the I/O helpers optional. This benefits systems that do not use these functions. No functional changes. Signed-off-by: Thomas Zimmermann --- drivers/video/fbdev/Kconfig | 1 + drivers/video/fbdev/arkfb.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig index e24653109dea8..012680f24964b 100644 --- a/drivers/video/fbdev/Kconfig +++ b/drivers/video/fbdev/Kconfig @@ -1381,6 +1381,7 @@ config FB_ARK select FB_CFB_FILLRECT select FB_CFB_COPYAREA select FB_CFB_IMAGEBLIT + select FB_IOMEM_FOPS select FB_TILEBLITTING select FB_SVGALIB select VGASTATE diff --git a/drivers/video/fbdev/arkfb.c b/drivers/video/fbdev/arkfb.c index 60a96fdb5dd8e..dca9c0325b3f0 100644 --- a/drivers/video/fbdev/arkfb.c +++ b/drivers/video/fbdev/arkfb.c @@ -924,6 +924,7 @@ static const struct fb_ops arkfb_ops = { .owner = THIS_MODULE, .fb_open = arkfb_open, .fb_release = arkfb_release, + __FB_DEFAULT_IOMEM_OPS_RDWR, .fb_check_var = arkfb_check_var, .fb_set_par = arkfb_set_par, .fb_setcolreg = arkfb_setcolreg, @@ -932,6 +933,7 @@ static const struct fb_ops arkfb_ops = { .fb_fillrect = arkfb_fillrect, .fb_copyarea = cfb_copyarea, .fb_imageblit = arkfb_imageblit, + __FB_DEFAULT_IOMEM_OPS_MMAP, .fb_get_caps = svga_get_caps, }; From patchwork Wed Sep 27 07:26:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13400243 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 4445FE810A4 for ; Wed, 27 Sep 2023 07:48:06 +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=mXja+gak9mdwqbHyHD4II1iIvCnhJsPP9c1D+LlHkMY=; b=tyvpJuNzPB0/gx dW3r+aFlDFTr71e7q81nNUJ3VfkkfdSp7LBQscV+zO9l/RW7y8/dbiuR1/sTcZjBCpBjB+64ArYtK 9/VPfto8hoWraOtFsI8zqbxLdH4cfvjGM2shJyMFl0n10O4nSypJhjr/GZpJS1A39taf4Yi0YWK8P VyLBNoNDi5y6ZMZHN05E4PlfmNRbXI5AGTzTDsLWwkS+HULtaOEGEF3Qco5D/hETBfw3Z/ga358ll zfBDeQ2RJP4GPmOE2fX6/Y1/rsFQrFqrBFnghm3YTItZ/9Phjr78IbtuxktNEkk/5QWqI/sHcePLO H4PooBx8gN/GZXd5hdqg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qlPGo-000DoW-15; Wed, 27 Sep 2023 07:47:42 +0000 Received: from smtp-out1.suse.de ([2001:67c:2178:6::1c]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qlPGb-000DYn-09 for linux-arm-kernel@lists.infradead.org; Wed, 27 Sep 2023 07:47:33 +0000 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 55D372189B; Wed, 27 Sep 2023 07:47:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1695800846; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=k5FMXUVcVnOgdde3PHi7yl18mHetqjeOG9z5RUOvGiE=; b=1sMj715fW8AEYaqYPnEr/KLoMz+08tnPERFUa32xZdyQvljUsgYOuFy5DksvG8DkIRxxdy FU/tWuFq30mWbdWsnIl7BXBoUXQk1ezGPiyHyOb8r2qiH1yrduLJPAP49zClY6MJ3qjeGs L18DwaLwlRfJqqSNBQCEV9LFQKlfIq8= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1695800846; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=k5FMXUVcVnOgdde3PHi7yl18mHetqjeOG9z5RUOvGiE=; b=mp5RB86nXCOqH3dILpEgYfpYbZuYHZ/T08VhOluIYGUUjYtHnZ0p1EO+e6Nm7Qp54OAVVD qdSeBtbdtmfygfAA== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 16CCE1338F; Wed, 27 Sep 2023 07:47:26 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id IFvLBA7eE2XvUQAAMHmgww (envelope-from ); Wed, 27 Sep 2023 07:47:26 +0000 From: Thomas Zimmermann To: deller@gmx.de, javierm@redhat.com, sam@ravnborg.org, arnd@arndb.de, daniel@ffwll.ch Cc: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-nvidia@lists.surfsouth.com, linux-omap@vger.kernel.org, linux-parisc@vger.kernel.org, Thomas Zimmermann Subject: [PATCH 06/46] fbdev/atafb: Initialize fb_ops to fbdev I/O-memory helpers Date: Wed, 27 Sep 2023 09:26:39 +0200 Message-ID: <20230927074722.6197-7-tzimmermann@suse.de> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20230927074722.6197-1-tzimmermann@suse.de> References: <20230927074722.6197-1-tzimmermann@suse.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230927_004729_227135_48112F21 X-CRM114-Status: GOOD ( 13.19 ) 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 Initialize the instance of struct fb_ops with fbdev initializer macros for framebuffers in I/O address space. Set the read/write, draw and mmap callbacks to the correct implementation and avoid implicit defaults. Also select the necessary I/O helpers in Kconfig. Fbdev drivers sometimes rely on the callbacks being NULL for a default implementation to be invoked; hence requiring the I/O helpers to be built in any case. Setting all callbacks in all drivers explicitly will allow to make the I/O helpers optional. This benefits systems that do not use these functions. No functional changes. Signed-off-by: Thomas Zimmermann --- drivers/video/fbdev/Kconfig | 1 + drivers/video/fbdev/atafb.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig index 012680f24964b..3df86ae46ca77 100644 --- a/drivers/video/fbdev/Kconfig +++ b/drivers/video/fbdev/Kconfig @@ -289,6 +289,7 @@ config FB_ATARI select FB_CFB_FILLRECT select FB_CFB_COPYAREA select FB_CFB_IMAGEBLIT + select FB_IOMEM_FOPS help This is the frame buffer device driver for the builtin graphics chipset found in Ataris. diff --git a/drivers/video/fbdev/atafb.c b/drivers/video/fbdev/atafb.c index c4a420b791b9a..b8ed1c537293d 100644 --- a/drivers/video/fbdev/atafb.c +++ b/drivers/video/fbdev/atafb.c @@ -2665,6 +2665,7 @@ static int atafb_set_par(struct fb_info *info) static struct fb_ops atafb_ops = { .owner = THIS_MODULE, + __FB_DEFAULT_IOMEM_OPS_RDWR, .fb_check_var = atafb_check_var, .fb_set_par = atafb_set_par, .fb_blank = atafb_blank, @@ -2673,6 +2674,7 @@ static struct fb_ops atafb_ops = { .fb_copyarea = atafb_copyarea, .fb_imageblit = atafb_imageblit, .fb_ioctl = atafb_ioctl, + __FB_DEFAULT_IOMEM_OPS_MMAP, }; static void check_default_par(int detected_mode) From patchwork Wed Sep 27 07:26:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13400251 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 F1060E810B6 for ; Wed, 27 Sep 2023 07:48:13 +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=tD6OeUETUI3yprkq+dIfxoT7qQ5AhWLQHypGbgmR9AE=; b=VFNEfwpcME/2Qc VSv8tzZZVk87xDHzNaUE1zCFNEllK0S2tCChJmvS+883kcBqz1guvY9Dg54W1uHyPSzgj1fBh66da 3zNPAUIgVhBCDMJkoM7sGLLnBNE/MilMpb1Qi0NjvtJq9+3wIN4S1rEsK8x2PX1KhwJuBJ7wZDTd0 bSstaCtrVQajHipMBfwFZ8p7aTMsZXaPY7JIAfCf9osVoRAhrnNW/pSXxrYXUlmw36M6jnFUaEhT6 a9w+ZvKk+YM4xvm2NxeaJB8HVly2WP1nBhINfPengbajL3PGBHzMmh5hsx4zMVHgOEzVr5RkWk3j8 YYRXwjYFLXw9oHOMiy3Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qlPGr-000DrE-0L; Wed, 27 Sep 2023 07:47:45 +0000 Received: from smtp-out1.suse.de ([2001:67c:2178:6::1c]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qlPGc-000DbS-1y for linux-arm-kernel@lists.infradead.org; Wed, 27 Sep 2023 07:47:33 +0000 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 8FC1A2189C; Wed, 27 Sep 2023 07:47:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1695800846; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=hvXHprRgPAGCGKZcfBZtbMRYiyKxfIyXrCTsLgtwxIQ=; b=gFR6sPzk+p46uOwtgljfGeFghx16MM2Ynoy2la8Q+jUtpGGBjEcNfECffJc8eZ6OBPlQvG gDFxqE+5ti9epGC4u+O7IMu0Ryb7g7g3aRlEaf20qFPy5Aw2yTaaBZcgcQuaYvGEYvB/Rg kgeUezaOYEYbQOjkGWHBhM5qp5gcDu4= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1695800846; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=hvXHprRgPAGCGKZcfBZtbMRYiyKxfIyXrCTsLgtwxIQ=; b=cB4D+RhxAvyNmtEUDiLftNj89ybbb7cZUlqOr6U1WVpq2eqt+OexGKOsfxo9NG7Y/j6MXY SlYm4zu4f2QBGyDg== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 573E313A74; Wed, 27 Sep 2023 07:47:26 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id aIViFA7eE2XvUQAAMHmgww (envelope-from ); Wed, 27 Sep 2023 07:47:26 +0000 From: Thomas Zimmermann To: deller@gmx.de, javierm@redhat.com, sam@ravnborg.org, arnd@arndb.de, daniel@ffwll.ch Cc: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-nvidia@lists.surfsouth.com, linux-omap@vger.kernel.org, linux-parisc@vger.kernel.org, Thomas Zimmermann Subject: [PATCH 07/46] fbdev/atyfb: Initialize fb_ops to fbdev I/O-memory helpers Date: Wed, 27 Sep 2023 09:26:40 +0200 Message-ID: <20230927074722.6197-8-tzimmermann@suse.de> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20230927074722.6197-1-tzimmermann@suse.de> References: <20230927074722.6197-1-tzimmermann@suse.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230927_004730_798761_C979D88D X-CRM114-Status: GOOD ( 12.27 ) 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 Initialize the instance of struct fb_ops with fbdev initializer macros for framebuffers in I/O address space. Set the read/write, draw and mmap callbacks to the correct implementation and avoid implicit defaults. Also select the necessary I/O helpers in Kconfig. Fbdev drivers sometimes rely on the callbacks being NULL for a default implementation to be invoked; hence requiring the I/O helpers to be built in any case. Setting all callbacks in all drivers explicitly will allow to make the I/O helpers optional. This benefits systems that do not use these functions. No functional changes. Signed-off-by: Thomas Zimmermann --- drivers/video/fbdev/Kconfig | 1 + drivers/video/fbdev/aty/atyfb_base.c | 3 +++ 2 files changed, 4 insertions(+) diff --git a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig index 3df86ae46ca77..9cd116f175160 100644 --- a/drivers/video/fbdev/Kconfig +++ b/drivers/video/fbdev/Kconfig @@ -1086,6 +1086,7 @@ config FB_ATY select FB_CFB_COPYAREA select FB_CFB_IMAGEBLIT select FB_BACKLIGHT if FB_ATY_BACKLIGHT + select FB_IOMEM_FOPS select FB_MACMODES if PPC select FB_ATY_CT if SPARC64 && PCI select VIDEO_NOMODESET diff --git a/drivers/video/fbdev/aty/atyfb_base.c b/drivers/video/fbdev/aty/atyfb_base.c index 5c87817a4f4ce..aee96fa45857b 100644 --- a/drivers/video/fbdev/aty/atyfb_base.c +++ b/drivers/video/fbdev/aty/atyfb_base.c @@ -301,6 +301,7 @@ static struct fb_ops atyfb_ops = { .owner = THIS_MODULE, .fb_open = atyfb_open, .fb_release = atyfb_release, + __FB_DEFAULT_IOMEM_OPS_RDWR, .fb_check_var = atyfb_check_var, .fb_set_par = atyfb_set_par, .fb_setcolreg = atyfb_setcolreg, @@ -315,6 +316,8 @@ static struct fb_ops atyfb_ops = { .fb_imageblit = atyfb_imageblit, #ifdef __sparc__ .fb_mmap = atyfb_mmap, +#else + __FB_DEFAULT_IOMEM_OPS_MMAP, #endif .fb_sync = atyfb_sync, }; From patchwork Wed Sep 27 07:26:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13400247 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 E0EBAE810AA for ; Wed, 27 Sep 2023 07:48:08 +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=Rm0rxMGRXe2O5XiaA2tEsvKGhmtnLbf0l9j+9gX5HpU=; b=YdnKm3hkAt56sk pg9NLBWm6YzPLg0PHsP3eLvGhWWltO5IjhWYbVUQV5ju55AomQK4d58G34aSzhTwDokPOfkVLRFSH N7XqTo7XrCBK3SqqA2jGBHYDbuyTZoJTPJls/9vXQ+wHjY87F3InWfbZzx3MxDvlANRBKwtwYdais j/dW57WAS5f8LEJtU6sKSJfF5UDxSNQRxHgeXuc4A2yI3Wm1ckLIYF9Skfc1SYG9MzgWLbs0kLUrY y3DxF9RrkkPNCf9597Bq/jURomvIzOXiNlzie5/SCyGoTw0Awq/qCsMLAbf5VVBsxzS0Jsl/qLmml HiA9yYKIeQnqNA+TpavA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qlPGm-000Dmu-0s; Wed, 27 Sep 2023 07:47:40 +0000 Received: from smtp-out2.suse.de ([195.135.220.29]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qlPGa-000DYs-31 for linux-arm-kernel@lists.infradead.org; Wed, 27 Sep 2023 07:47:31 +0000 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id C9EEF1F8A3; Wed, 27 Sep 2023 07:47:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1695800846; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=9aCUbQ4NtrDcW2WQi8qce/YX4oqfMPBdqjwkO19x25s=; b=j3UM/hIvvEmp0jBEozajk2AKvx6pMgLE+fOWm+8ME3SUfBcKG/8nOiM9mcm18oVBjtPNwK aO4pb6olY57aihIS9Mbz/8rGpPRTy0J8zH2QNA+ESuI+QzyaVhqkWdAS0uUkpwo277hYN/ wMxfoeDXS7TRlRXW3K09T32ji8zjjd8= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1695800846; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=9aCUbQ4NtrDcW2WQi8qce/YX4oqfMPBdqjwkO19x25s=; b=uKM/DenZkGMLA+JE/YzqWVhp1CGrEWtddVDWnz1bOIAAtJ9joVJ3Hg9NU4N2h7FAd4KFBF 3mEGxuWDCE3agPDQ== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 93BEB1338F; Wed, 27 Sep 2023 07:47:26 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id AF5CIw7eE2XvUQAAMHmgww (envelope-from ); Wed, 27 Sep 2023 07:47:26 +0000 From: Thomas Zimmermann To: deller@gmx.de, javierm@redhat.com, sam@ravnborg.org, arnd@arndb.de, daniel@ffwll.ch Cc: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-nvidia@lists.surfsouth.com, linux-omap@vger.kernel.org, linux-parisc@vger.kernel.org, Thomas Zimmermann Subject: [PATCH 08/46] fbdev/au1100fb: Initialize fb_ops to fbdev I/O-memory helpers Date: Wed, 27 Sep 2023 09:26:41 +0200 Message-ID: <20230927074722.6197-9-tzimmermann@suse.de> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20230927074722.6197-1-tzimmermann@suse.de> References: <20230927074722.6197-1-tzimmermann@suse.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230927_004729_117093_F4B841DF X-CRM114-Status: GOOD ( 13.34 ) 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 Initialize the instance of struct fb_ops with fbdev initializer macros for framebuffers in I/O address space. Set the read/write, draw and mmap callbacks to the correct implementation and avoid implicit defaults. Also select the necessary I/O helpers in Kconfig. Fbdev drivers sometimes rely on the callbacks being NULL for a default implementation to be invoked; hence requiring the I/O helpers to be built in any case. Setting all callbacks in all drivers explicitly will allow to make the I/O helpers optional. This benefits systems that do not use these functions. No functional changes. Signed-off-by: Thomas Zimmermann --- drivers/video/fbdev/Kconfig | 4 +--- drivers/video/fbdev/au1100fb.c | 8 +++----- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig index 9cd116f175160..83e2f341cf911 100644 --- a/drivers/video/fbdev/Kconfig +++ b/drivers/video/fbdev/Kconfig @@ -1434,9 +1434,7 @@ endchoice config FB_AU1100 bool "Au1100 LCD Driver" depends on (FB = y) && MIPS_ALCHEMY - select FB_CFB_FILLRECT - select FB_CFB_COPYAREA - select FB_CFB_IMAGEBLIT + select FB_IOMEM_HELPERS help This is the framebuffer driver for the AMD Au1100 SOC. It can drive various panels and CRTs by passing in kernel cmd line option diff --git a/drivers/video/fbdev/au1100fb.c b/drivers/video/fbdev/au1100fb.c index 648d6cac86e8f..a9c8d33a6ef71 100644 --- a/drivers/video/fbdev/au1100fb.c +++ b/drivers/video/fbdev/au1100fb.c @@ -348,15 +348,13 @@ int au1100fb_fb_mmap(struct fb_info *fbi, struct vm_area_struct *vma) fbdev->fb_len); } -static const struct fb_ops au1100fb_ops = -{ +static const struct fb_ops au1100fb_ops = { .owner = THIS_MODULE, + __FB_DEFAULT_IOMEM_OPS_RDWR, .fb_setcolreg = au1100fb_fb_setcolreg, .fb_blank = au1100fb_fb_blank, .fb_pan_display = au1100fb_fb_pan_display, - .fb_fillrect = cfb_fillrect, - .fb_copyarea = cfb_copyarea, - .fb_imageblit = cfb_imageblit, + __FB_DEFAULT_IOMEM_OPS_DRAW, .fb_mmap = au1100fb_fb_mmap, }; From patchwork Wed Sep 27 07:26:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13400250 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 0DDB2E80AA4 for ; Wed, 27 Sep 2023 07:48:11 +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=Rnuq+bMSg4GF9GvUVQLrPxWIsu7/WzRsuJMm9/R5Bi0=; b=SVQgRlVwzA3Nb8 e/+9ZMW4BYB8I4dJ4NcPg++nLTJ9iTtepbR0fYsU7AsWBJiBxoa2mazb4IkkXHF1evxYabNwNeEyL CnXoJ7384AJumnS8Zbp73Ek4otqSuag9S3+K+nXg3BSVh7/UnhYMH0Dmhe+nTPBHvNji6r8dAs+VJ SbUkRQlLSMVgODvEmBzP54ddbYpLQDCSznOYamM/g13PaxhqEq8B9ij/V24MK9fVDdgZ0magkRTat rGKI9bSSREo5IWxqnq68McNe+3cgjISlauHyN/h70heSk46mPWiqPIkWkCvRKBmUssjTuY+BbN3V7 cwPJHmOqBrraACBMWOqg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qlPGp-000Dph-2P; Wed, 27 Sep 2023 07:47:43 +0000 Received: from smtp-out1.suse.de ([195.135.220.28]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qlPGc-000DbR-2f for linux-arm-kernel@lists.infradead.org; Wed, 27 Sep 2023 07:47:33 +0000 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 132842189D; Wed, 27 Sep 2023 07:47:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1695800847; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=mnDu2OW07lkAqwmxH//juPUc1CJ6dYIGGhFkEBuLM9Q=; b=d6eM/hBzoYVkyxrdGAsS/p/SGzgdya0NCy7UiU98G2JjJ/h9zFrEo9Xy6gS31PBkByMpc4 nZlt3DjWHYOr6oRXLThBwinzSXcJShvpfFzcuB7D00POveMSHOQW0rjUhUy99y9hVNKxq7 b9xiIyhnLZ4Y3oHz0hoglC3cTzO8/pU= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1695800847; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=mnDu2OW07lkAqwmxH//juPUc1CJ6dYIGGhFkEBuLM9Q=; b=WH4S5lB9YfH2fonSS2f18HHXEAJGeHHdn2BgWCxvSoQjBXBZ72iuIrkAaxOvbNQKBhojRr rUVYGK5BdjD69eAw== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id CE84913A74; Wed, 27 Sep 2023 07:47:26 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id kP2LMQ7eE2XvUQAAMHmgww (envelope-from ); Wed, 27 Sep 2023 07:47:26 +0000 From: Thomas Zimmermann To: deller@gmx.de, javierm@redhat.com, sam@ravnborg.org, arnd@arndb.de, daniel@ffwll.ch Cc: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-nvidia@lists.surfsouth.com, linux-omap@vger.kernel.org, linux-parisc@vger.kernel.org, Thomas Zimmermann Subject: [PATCH 09/46] fbdev/cirrusfb: Initialize fb_ops to fbdev I/O-memory helpers Date: Wed, 27 Sep 2023 09:26:42 +0200 Message-ID: <20230927074722.6197-10-tzimmermann@suse.de> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20230927074722.6197-1-tzimmermann@suse.de> References: <20230927074722.6197-1-tzimmermann@suse.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230927_004731_021058_D282F7CD X-CRM114-Status: GOOD ( 11.94 ) 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 Initialize the instance of struct fb_ops with fbdev initializer macros for framebuffers in I/O address space. Set the read/write, draw and mmap callbacks to the correct implementation and avoid implicit defaults. Also select the necessary I/O helpers in Kconfig. Fbdev drivers sometimes rely on the callbacks being NULL for a default implementation to be invoked; hence requiring the I/O helpers to be built in any case. Setting all callbacks in all drivers explicitly will allow to make the I/O helpers optional. This benefits systems that do not use these functions. No functional changes. Signed-off-by: Thomas Zimmermann --- drivers/video/fbdev/Kconfig | 1 + drivers/video/fbdev/cirrusfb.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig index 83e2f341cf911..06d20787da8b8 100644 --- a/drivers/video/fbdev/Kconfig +++ b/drivers/video/fbdev/Kconfig @@ -74,6 +74,7 @@ config FB_CIRRUS select FB_CFB_FILLRECT select FB_CFB_COPYAREA select FB_CFB_IMAGEBLIT + select FB_IOMEM_FOPS select VIDEO_NOMODESET help This enables support for Cirrus Logic GD542x/543x based boards on diff --git a/drivers/video/fbdev/cirrusfb.c b/drivers/video/fbdev/cirrusfb.c index 9d369b6a4dcc7..e29217e476ea4 100644 --- a/drivers/video/fbdev/cirrusfb.c +++ b/drivers/video/fbdev/cirrusfb.c @@ -1961,6 +1961,7 @@ static const struct fb_ops cirrusfb_ops = { .owner = THIS_MODULE, .fb_open = cirrusfb_open, .fb_release = cirrusfb_release, + __FB_DEFAULT_IOMEM_OPS_RDWR, .fb_setcolreg = cirrusfb_setcolreg, .fb_check_var = cirrusfb_check_var, .fb_set_par = cirrusfb_set_par, @@ -1970,6 +1971,7 @@ static const struct fb_ops cirrusfb_ops = { .fb_copyarea = cirrusfb_copyarea, .fb_sync = cirrusfb_sync, .fb_imageblit = cirrusfb_imageblit, + __FB_DEFAULT_IOMEM_OPS_MMAP, }; static int cirrusfb_set_fbinfo(struct fb_info *info) From patchwork Wed Sep 27 07:26:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13400393 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 BF0ABE810AD for ; Wed, 27 Sep 2023 09:00:31 +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=my+Ks+CQhZXqb9Q45XX1eL5//7uGyx+aYCrPXMKdRuI=; b=attmNPJHWoJobp f/O60ScfYtB5/1RWl0s3JlWBOyGgI/g69kfKRfYlgtbfg0UFaLR2hbPqB5cQs0YfbTPgS6D2ZRfEE s9uZOZX8OwvQ9wXjW8Ak97KDw+htGtYrP6oQTPBANwy2DmNH/7NeQC5gaY7PjrtxowRc/2ofb3UZV /fMVS8I7hvkY2pgzjD+bJ/o/AQLADkJjn5oI/fLQfhpv+XVm2oEtuiZbj9dMnEeHTpDNvUEZ1jv63 /4r/xIZcJtPde1rjmb0cU19DrtKYAU3dCv0ZaA4mF2W3QcDbnf11IxRTQBsED6xIOlWHtt2MuwXcL mdXV4LJfWn2DU207LX/Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qlQPD-000P8Z-1W; Wed, 27 Sep 2023 09:00:27 +0000 Received: from smtp-out2.suse.de ([2001:67c:2178:6::1d]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qlPGa-000DYx-2Z for linux-arm-kernel@lists.infradead.org; Wed, 27 Sep 2023 07:47:31 +0000 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 4C7E21F8A4; Wed, 27 Sep 2023 07:47:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1695800847; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=EZCIGadNzDcDDyy0uQKLnD2WXwhef9Wz5LBK3tYEh4M=; b=dOmiyRBnPpCv26IzyWzGDVcaAnYAIT5mOmaHSyeHiY6KIYzYDOESDeX7DHtnXfQulmxZEs cLrbo3GDra6TM1NbplPFFXWIYZar449Gej2FGgdeRLB+tK1cU72fwBa6M76sT4Ycnz6S6v cYeaP1Dq9I/7G4PCf0ttIY9jPMTbwdQ= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1695800847; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=EZCIGadNzDcDDyy0uQKLnD2WXwhef9Wz5LBK3tYEh4M=; b=ezavfw3HpJxdIJYra69t9VdeNtvqMrPD4QfQFK47RF6nEgFJdtsYgvGSxTKXgbCXKy+aOU Chf8ch2GgaO0CKBA== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 173101338F; Wed, 27 Sep 2023 07:47:27 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id SCXFBA/eE2XvUQAAMHmgww (envelope-from ); Wed, 27 Sep 2023 07:47:27 +0000 From: Thomas Zimmermann To: deller@gmx.de, javierm@redhat.com, sam@ravnborg.org, arnd@arndb.de, daniel@ffwll.ch Cc: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-nvidia@lists.surfsouth.com, linux-omap@vger.kernel.org, linux-parisc@vger.kernel.org, Thomas Zimmermann Subject: [PATCH 10/46] fbdev/cobalt-lcd: Initialize fb_ops to fbdev I/O-memory helpers Date: Wed, 27 Sep 2023 09:26:43 +0200 Message-ID: <20230927074722.6197-11-tzimmermann@suse.de> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20230927074722.6197-1-tzimmermann@suse.de> References: <20230927074722.6197-1-tzimmermann@suse.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230927_004728_977611_8AC132A6 X-CRM114-Status: GOOD ( 12.10 ) 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 Initialize the instance of struct fb_ops with fbdev initializer macros for framebuffers in I/O address space. Set the read/write, draw and mmap callbacks to the correct implementation and avoid implicit defaults. Also select the necessary I/O helpers in Kconfig. Fbdev drivers sometimes rely on the callbacks being NULL for a default implementation to be invoked; hence requiring the I/O helpers to be built in any case. Setting all callbacks in all drivers explicitly will allow to make the I/O helpers optional. This benefits systems that do not use these functions. No functional changes. Signed-off-by: Thomas Zimmermann --- drivers/video/fbdev/Kconfig | 1 + drivers/video/fbdev/cobalt_lcdfb.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig index 06d20787da8b8..5f8ba796aa382 100644 --- a/drivers/video/fbdev/Kconfig +++ b/drivers/video/fbdev/Kconfig @@ -1752,6 +1752,7 @@ config FB_GOLDFISH config FB_COBALT tristate "Cobalt server LCD frame buffer support" depends on FB && MIPS_COBALT + select FB_IOMEM_HELPERS config FB_SH7760 bool "SH7760/SH7763/SH7720/SH7721 LCDC support" diff --git a/drivers/video/fbdev/cobalt_lcdfb.c b/drivers/video/fbdev/cobalt_lcdfb.c index b94e7c97264cb..c2b8f894799ca 100644 --- a/drivers/video/fbdev/cobalt_lcdfb.c +++ b/drivers/video/fbdev/cobalt_lcdfb.c @@ -280,7 +280,9 @@ static const struct fb_ops cobalt_lcd_fbops = { .fb_read = cobalt_lcdfb_read, .fb_write = cobalt_lcdfb_write, .fb_blank = cobalt_lcdfb_blank, + __FB_DEFAULT_IOMEM_OPS_DRAW, .fb_cursor = cobalt_lcdfb_cursor, + __FB_DEFAULT_IOMEM_OPS_MMAP, }; static int cobalt_lcdfb_probe(struct platform_device *dev) From patchwork Wed Sep 27 07:26:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13400246 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 276CBE810DF for ; Wed, 27 Sep 2023 07:48:08 +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=cjwG7YnuJ1ueex3G2YRpm4BY3CTcHsbENwTarla2Twk=; b=0Pq9zekSr7XzYf cNLgGe09UB3Z2SxKBIEogrHJdUfnFJQ5gwwcQmeD7V5y5X9GSGKw98UqCBWAT5U9kjIDM1OEmttFD O7aCYv4NYKl6XS3cNLtNJjCNhJAPe4rRV4KSF2++6CDG0rlnd8WmC3H9u96ZlOrJyVN3teBnOD04c Of4shvP0WgAlfFGx9tZw2xaht55CF3USihGTZRsBVVFKf47yCsS8e38UeP2r+tMyToKu+Gx5AP8QX Pq2y9MHgIrVhtnfgsHXJDRRpYI2VnLOmuOzePSvfQzuL/dCMrlMopWZ+EiTq04XNx0xDxNh32Sa1F AH3hwBFYDHNkAFP9RS3A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qlPGr-000Ds5-2j; Wed, 27 Sep 2023 07:47:45 +0000 Received: from smtp-out1.suse.de ([195.135.220.28]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qlPGd-000Dba-0A for linux-arm-kernel@lists.infradead.org; Wed, 27 Sep 2023 07:47:34 +0000 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 8719A2189E; Wed, 27 Sep 2023 07:47:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1695800847; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=OTRgjt9ZIxQ8wFm8yqaudH0Dvs4qJ3X/F+C81dN1guQ=; b=sYF7UICBTy0vHY1RyJPAlA/aq8R43iAqGRyyQbQn6HlCwyrqMk8CDtO3diRr3KjCpU/D2r ib7lWJZC1nnddEvkcLoXun0UWfPzgBLoF7VglTcXyX7XzHLuoQumW2+uPmFkxMPP0nUdbv lrm67Bldhg57WlLVdgkq+lUaScHRj5g= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1695800847; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=OTRgjt9ZIxQ8wFm8yqaudH0Dvs4qJ3X/F+C81dN1guQ=; b=4vFlmY7+NBgSDYMmfYbgJIlF4r5PrRXijodYHhO6rr3WXbZjdW80JijDaTHCTIrKb2YMjw rjRTZp+IH73pilCw== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 503D413A74; Wed, 27 Sep 2023 07:47:27 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id SBCzEg/eE2XvUQAAMHmgww (envelope-from ); Wed, 27 Sep 2023 07:47:27 +0000 From: Thomas Zimmermann To: deller@gmx.de, javierm@redhat.com, sam@ravnborg.org, arnd@arndb.de, daniel@ffwll.ch Cc: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-nvidia@lists.surfsouth.com, linux-omap@vger.kernel.org, linux-parisc@vger.kernel.org, Thomas Zimmermann Subject: [PATCH 11/46] fbdev/controlfb: Initialize fb_ops to fbdev I/O-memory helpers Date: Wed, 27 Sep 2023 09:26:44 +0200 Message-ID: <20230927074722.6197-12-tzimmermann@suse.de> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20230927074722.6197-1-tzimmermann@suse.de> References: <20230927074722.6197-1-tzimmermann@suse.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230927_004731_276160_6A586692 X-CRM114-Status: GOOD ( 14.02 ) 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 Initialize the instance of struct fb_ops with fbdev initializer macros for framebuffers in I/O address space. Set the read/write, draw and mmap callbacks to the correct implementation and avoid implicit defaults. Also select the necessary I/O helpers in Kconfig. Fbdev drivers sometimes rely on the callbacks being NULL for a default implementation to be invoked; hence requiring the I/O helpers to be built in any case. Setting all callbacks in all drivers explicitly will allow to make the I/O helpers optional. This benefits systems that do not use these functions. No functional changes. Signed-off-by: Thomas Zimmermann --- drivers/video/fbdev/Kconfig | 4 +--- drivers/video/fbdev/controlfb.c | 5 ++--- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig index 5f8ba796aa382..499403f69329f 100644 --- a/drivers/video/fbdev/Kconfig +++ b/drivers/video/fbdev/Kconfig @@ -309,9 +309,7 @@ config FB_OF config FB_CONTROL bool "Apple \"control\" display support" depends on (FB = y) && ((PPC_PMAC && PPC32) || COMPILE_TEST) - select FB_CFB_FILLRECT - select FB_CFB_COPYAREA - select FB_CFB_IMAGEBLIT + select FB_IOMEM_HELPERS select FB_MACMODES help This driver supports a frame buffer for the graphics adapter in the diff --git a/drivers/video/fbdev/controlfb.c b/drivers/video/fbdev/controlfb.c index 717134c141ffe..5c5284e8ae0e9 100644 --- a/drivers/video/fbdev/controlfb.c +++ b/drivers/video/fbdev/controlfb.c @@ -755,15 +755,14 @@ static int controlfb_mmap(struct fb_info *info, static const struct fb_ops controlfb_ops = { .owner = THIS_MODULE, + __FB_DEFAULT_IOMEM_OPS_RDWR, .fb_check_var = controlfb_check_var, .fb_set_par = controlfb_set_par, .fb_setcolreg = controlfb_setcolreg, .fb_pan_display = controlfb_pan_display, .fb_blank = controlfb_blank, + __FB_DEFAULT_IOMEM_OPS_DRAW, .fb_mmap = controlfb_mmap, - .fb_fillrect = cfb_fillrect, - .fb_copyarea = cfb_copyarea, - .fb_imageblit = cfb_imageblit, }; /* From patchwork Wed Sep 27 07:26:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13400245 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 99328E810A8 for ; Wed, 27 Sep 2023 07:48:07 +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=OUflGWmQpY/9R0uWc+pglLW881axIngEyMacX1evyiY=; b=stCNh+ooEOWKDb 90jetOKaXU+VYu1TUP8HAH+UGdpUD9MQuLixdUC5PS7AoSzUTJp3G6KnXBO1B2/BmUdbHT6hoNOLd NuDMtaCZRz4bKZoXuwHABUa1csi3n79k2a0J64yUjGlVg6Wi0HfiIUc685212lTRPOCTwe9x95sS5 87pcFXo7qqSxqD68xZy9oIcY3A+n37+wIOXIv/LScSzoAiwRt8reDip6SuhhOZ8lW0ctw2ZbKtpV3 s6dMmxrQKT2zY2tsZXKa0HmgmkKL8LEzjvj1kXGFoUkpmD9inStJ0QbeX72RfUQyneuecvPSZR+7S SXQEig2cf6a+o95YqRGw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qlPGq-000Dqa-1L; Wed, 27 Sep 2023 07:47:44 +0000 Received: from smtp-out2.suse.de ([2001:67c:2178:6::1d]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qlPGb-000DZ0-05 for linux-arm-kernel@lists.infradead.org; Wed, 27 Sep 2023 07:47:33 +0000 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id C0E991F8A6; Wed, 27 Sep 2023 07:47:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1695800847; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=12aciqnbaZSjy+eyEgAkkHAz7ZcEIAq0VtJkOgz29oM=; b=i69aNv0/4MdN4Wkso1CTyOCgKYIjw2T8jX6/ncYTRAps+KJJChQxd/eXo0s3c1JizJ/3O4 il4iTP/ZhE5fLrYjSYLaS5Vpx5fOndzSQEOuOQH+GvKmv+dp8+XC2BvHm4O8tfT3AM5Ya9 5FfiynAGeOG0szwZ0VaZL1kwJPMAibQ= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1695800847; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=12aciqnbaZSjy+eyEgAkkHAz7ZcEIAq0VtJkOgz29oM=; b=ZK1cKEfjw7qOppREPqZAEiG5Eh22TLd9zpIQRqpEjzEzw/u0zHiXnLXqo2Py2uUTNvmq53 H5cBz1GmcJYYkjCw== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 8D32C1338F; Wed, 27 Sep 2023 07:47:27 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id uE6RIQ/eE2XvUQAAMHmgww (envelope-from ); Wed, 27 Sep 2023 07:47:27 +0000 From: Thomas Zimmermann To: deller@gmx.de, javierm@redhat.com, sam@ravnborg.org, arnd@arndb.de, daniel@ffwll.ch Cc: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-nvidia@lists.surfsouth.com, linux-omap@vger.kernel.org, linux-parisc@vger.kernel.org, Thomas Zimmermann Subject: [PATCH 12/46] fbdev/cyber2000fb: Initialize fb_ops to fbdev I/O-memory helpers Date: Wed, 27 Sep 2023 09:26:45 +0200 Message-ID: <20230927074722.6197-13-tzimmermann@suse.de> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20230927074722.6197-1-tzimmermann@suse.de> References: <20230927074722.6197-1-tzimmermann@suse.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230927_004729_208728_35B2718B X-CRM114-Status: GOOD ( 12.47 ) 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 Initialize the instance of struct fb_ops with fbdev initializer macros for framebuffers in I/O address space. Set the read/write, draw and mmap callbacks to the correct implementation and avoid implicit defaults. Also select the necessary I/O helpers in Kconfig. Fbdev drivers sometimes rely on the callbacks being NULL for a default implementation to be invoked; hence requiring the I/O helpers to be built in any case. Setting all callbacks in all drivers explicitly will allow to make the I/O helpers optional. This benefits systems that do not use these functions. No functional changes. Signed-off-by: Thomas Zimmermann --- drivers/video/fbdev/Kconfig | 1 + drivers/video/fbdev/cyber2000fb.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig index 499403f69329f..5ad55bf2b18e6 100644 --- a/drivers/video/fbdev/Kconfig +++ b/drivers/video/fbdev/Kconfig @@ -184,6 +184,7 @@ config FB_CYBER2000 select FB_CFB_FILLRECT select FB_CFB_COPYAREA select FB_CFB_IMAGEBLIT + select FB_IOMEM_FOPS select VIDEO_NOMODESET help This enables support for the Integraphics CyberPro 20x0 and 5000 diff --git a/drivers/video/fbdev/cyber2000fb.c b/drivers/video/fbdev/cyber2000fb.c index 98ea56a9abf1e..52105dc1a72f3 100644 --- a/drivers/video/fbdev/cyber2000fb.c +++ b/drivers/video/fbdev/cyber2000fb.c @@ -1061,6 +1061,7 @@ static int cyber2000fb_blank(int blank, struct fb_info *info) static const struct fb_ops cyber2000fb_ops = { .owner = THIS_MODULE, + __FB_DEFAULT_IOMEM_OPS_RDWR, .fb_check_var = cyber2000fb_check_var, .fb_set_par = cyber2000fb_set_par, .fb_setcolreg = cyber2000fb_setcolreg, @@ -1070,6 +1071,7 @@ static const struct fb_ops cyber2000fb_ops = { .fb_copyarea = cyber2000fb_copyarea, .fb_imageblit = cyber2000fb_imageblit, .fb_sync = cyber2000fb_sync, + __FB_DEFAULT_IOMEM_OPS_MMAP, }; /* From patchwork Wed Sep 27 07:26:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13400256 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 C178EE810A0 for ; Wed, 27 Sep 2023 07:49:44 +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=Jeq9BUMbm6K/VkYySNeqnowc7v/4I5m9ULPREWUgMh0=; b=C9fCqhnjEGrozt ch9+DX+3qkKwv5hwXWez7uBbFHHMN2Ap5ueEg5dflWgpwAIVjbn+YebekAm5tmspJFhpabVgonL9h TRNQm2vI+6dQPNw5dYua7qYVgwPVjiAIDNoUT1I80RhvaAotOXOw/F614Ea+CuTHrYiH4NTJTcOLb DM9yfMTuabBdpuRACNovhcWTtlfPDLQ8Iwdeiog8yRWIhbb9zTEmWB6TH7QpW5U/rRlpiH1La+U14 w5WSW4GKNE0nTgC2EIT7paaqwVQSsTfhufDSAp4DU77N2dwlL8spE+iAxRXLnOVQkicbeaVSgC5gH 6reJhr/QyPfJWQ7tM2ew==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qlPIN-000EtH-0X; Wed, 27 Sep 2023 07:49:19 +0000 Received: from smtp-out1.suse.de ([195.135.220.28]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qlPGd-000DbZ-0G for linux-arm-kernel@lists.infradead.org; Wed, 27 Sep 2023 07:47:35 +0000 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 081362189F; Wed, 27 Sep 2023 07:47:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1695800848; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=2/IAJ+nflY6vv4Hj8yMEqhnvYxgG/i/teJeTcVUgps4=; b=0ssOZia3Xz3ePzTXYq6vRGMryjR2ZOwQoYZY/etqsB60qP1EN9MIMOW9OiuzX+fuTww83C 4Jh2dzb9LN6N/Fr2Y2eBMGonVP+2WCq4EhZtGshM9oQPAfchBbwBRXp+V9zr8EaQCZQAPd 4t8N9Q+pWuENQ1+naHRg32/zUHoRDD0= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1695800848; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=2/IAJ+nflY6vv4Hj8yMEqhnvYxgG/i/teJeTcVUgps4=; b=Xh3vOdRSXZdH2cgCaDmXtjcjE6q5Xkpqf1QrKXJA4ZM+nP9O7p2FHP0hcp49Qlkvcg6bwB R4DiEpEDFRTT8oAA== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id C530913A74; Wed, 27 Sep 2023 07:47:27 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id +LlaLw/eE2XvUQAAMHmgww (envelope-from ); Wed, 27 Sep 2023 07:47:27 +0000 From: Thomas Zimmermann To: deller@gmx.de, javierm@redhat.com, sam@ravnborg.org, arnd@arndb.de, daniel@ffwll.ch Cc: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-nvidia@lists.surfsouth.com, linux-omap@vger.kernel.org, linux-parisc@vger.kernel.org, Thomas Zimmermann Subject: [PATCH 13/46] fbdev/dnfb: Initialize fb_ops to fbdev I/O-memory helpers Date: Wed, 27 Sep 2023 09:26:46 +0200 Message-ID: <20230927074722.6197-14-tzimmermann@suse.de> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20230927074722.6197-1-tzimmermann@suse.de> References: <20230927074722.6197-1-tzimmermann@suse.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230927_004731_282398_9E362947 X-CRM114-Status: GOOD ( 11.74 ) 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 Initialize the instance of struct fb_ops with fbdev initializer macros for framebuffers in I/O address space. Set the read/write, draw and mmap callbacks to the correct implementation and avoid implicit defaults. Also select the necessary I/O helpers in Kconfig. Fbdev drivers sometimes rely on the callbacks being NULL for a default implementation to be invoked; hence requiring the I/O helpers to be built in any case. Setting all callbacks in all drivers explicitly will allow to make the I/O helpers optional. This benefits systems that do not use these functions. No functional changes. Signed-off-by: Thomas Zimmermann --- drivers/video/fbdev/Kconfig | 1 + drivers/video/fbdev/dnfb.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig index 5ad55bf2b18e6..0997c6cc3bcdb 100644 --- a/drivers/video/fbdev/Kconfig +++ b/drivers/video/fbdev/Kconfig @@ -217,6 +217,7 @@ config FB_APOLLO default y select FB_CFB_FILLRECT select FB_CFB_IMAGEBLIT + select FB_IOMEM_FOPS config FB_Q40 bool diff --git a/drivers/video/fbdev/dnfb.c b/drivers/video/fbdev/dnfb.c index 18405c402ec15..c4d24540d9efd 100644 --- a/drivers/video/fbdev/dnfb.c +++ b/drivers/video/fbdev/dnfb.c @@ -110,10 +110,12 @@ static void dnfb_copyarea(struct fb_info *info, const struct fb_copyarea *area); static const struct fb_ops dn_fb_ops = { .owner = THIS_MODULE, + __FB_DEFAULT_IOMEM_OPS_RDWR, .fb_blank = dnfb_blank, .fb_fillrect = cfb_fillrect, .fb_copyarea = dnfb_copyarea, .fb_imageblit = cfb_imageblit, + __FB_DEFAULT_IOMEM_OPS_MMAP, }; static const struct fb_var_screeninfo dnfb_var = { From patchwork Wed Sep 27 07:26:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13400253 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 137A9E810C0 for ; Wed, 27 Sep 2023 07:48:17 +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=hpmOk78ohfX8DHvSJQn2HHs0GncbO3IxT2FWmm0Xzg8=; b=N0FtFaBpIanSpr n128SLXFV3UoAh1RudQdtzKTfV1A/tyPQYcI9PXMqwLPLTq9c2FPYS56fTPJ7iHO2eQQUQOdayjrP +H3MFli4wono06iOs58EEcSzrCtvUefi6kvVq/5NSfNIHt6BzcVqHsdnRzKqQzqq68Wm7QZKRrLWa N3gepnaEjOHiVjCFUDKGAdr+J2HPoPPVb4J9R8Y+QxAwTi84L1Wdtn0Jl+yM/nV9t6CVLXQLm3OLK P/Mia/Y1o5eYRleRchSM88HCSZAVRz+Tx9ar4Q/QFA9ICAcJlEzECFVtVWIUawks/DQKgX2LFpDTx 9Pb8jtKMSDiPDAd8VgmQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qlPGu-000Dux-1E; Wed, 27 Sep 2023 07:47:48 +0000 Received: from smtp-out2.suse.de ([2001:67c:2178:6::1d]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qlPGe-000Dd8-1D for linux-arm-kernel@lists.infradead.org; Wed, 27 Sep 2023 07:47:35 +0000 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 462991F8A8; Wed, 27 Sep 2023 07:47:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1695800848; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=3J+r/az24Cf0It/t6fWkvDXQmlqczGrS7csKaowZMPk=; b=P1+eBmBKLoFRAiD/htVZC8N3LyVEzFqsmumur4ZspLHG8OChn1E1kqWQohwwUpxSHLt1aG LuVKIHoWHPpFnH3Q69WouGRtG7SW5Ln00MgPoj0bbz+a/nfr7Avb4dJbkQeZ+cnGbhUg/I dYjzCLzhJ7lu04OAjTTVajV+mk/s70I= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1695800848; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=3J+r/az24Cf0It/t6fWkvDXQmlqczGrS7csKaowZMPk=; b=PRd9aWXeVDLSrt4N05pWVRztdsLncaoadypoZ0ppSRZh9VuBU7JFoHXXCOVgk0S+0MHhci 5luMklUEobwMYOBA== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 0BDA31338F; Wed, 27 Sep 2023 07:47:28 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id wNkJAhDeE2XvUQAAMHmgww (envelope-from ); Wed, 27 Sep 2023 07:47:28 +0000 From: Thomas Zimmermann To: deller@gmx.de, javierm@redhat.com, sam@ravnborg.org, arnd@arndb.de, daniel@ffwll.ch Cc: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-nvidia@lists.surfsouth.com, linux-omap@vger.kernel.org, linux-parisc@vger.kernel.org, Thomas Zimmermann Subject: [PATCH 14/46] fbdev/ep93xx-fb: Initialize fb_ops to fbdev I/O-memory helpers Date: Wed, 27 Sep 2023 09:26:47 +0200 Message-ID: <20230927074722.6197-15-tzimmermann@suse.de> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20230927074722.6197-1-tzimmermann@suse.de> References: <20230927074722.6197-1-tzimmermann@suse.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230927_004732_577677_BCD4B583 X-CRM114-Status: GOOD ( 14.23 ) 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 Initialize the instance of struct fb_ops with fbdev initializer macros for framebuffers in I/O address space. Set the read/write, draw and mmap callbacks to the correct implementation and avoid implicit defaults. Also select the necessary I/O helpers in Kconfig. Fbdev drivers sometimes rely on the callbacks being NULL for a default implementation to be invoked; hence requiring the I/O helpers to be built in any case. Setting all callbacks in all drivers explicitly will allow to make the I/O helpers optional. This benefits systems that do not use these functions. No functional changes. Signed-off-by: Thomas Zimmermann --- drivers/video/fbdev/Kconfig | 4 +--- drivers/video/fbdev/ep93xx-fb.c | 5 ++--- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig index 0997c6cc3bcdb..64c7cbeb4cd79 100644 --- a/drivers/video/fbdev/Kconfig +++ b/drivers/video/fbdev/Kconfig @@ -1866,9 +1866,7 @@ config FB_MB862XX_I2C config FB_EP93XX tristate "EP93XX frame buffer support" depends on FB && ARCH_EP93XX - select FB_CFB_FILLRECT - select FB_CFB_COPYAREA - select FB_CFB_IMAGEBLIT + select FB_IOMEM_HELPERS help Framebuffer driver for the Cirrus Logic EP93XX series of processors. This driver is also available as a module. The module will be called diff --git a/drivers/video/fbdev/ep93xx-fb.c b/drivers/video/fbdev/ep93xx-fb.c index d94e3e8d14a12..cae00deee0014 100644 --- a/drivers/video/fbdev/ep93xx-fb.c +++ b/drivers/video/fbdev/ep93xx-fb.c @@ -404,12 +404,11 @@ static int ep93xxfb_setcolreg(unsigned int regno, unsigned int red, static const struct fb_ops ep93xxfb_ops = { .owner = THIS_MODULE, + __FB_DEFAULT_IOMEM_OPS_RDWR, .fb_check_var = ep93xxfb_check_var, .fb_set_par = ep93xxfb_set_par, .fb_blank = ep93xxfb_blank, - .fb_fillrect = cfb_fillrect, - .fb_copyarea = cfb_copyarea, - .fb_imageblit = cfb_imageblit, + __FB_DEFAULT_IOMEM_OPS_DRAW, .fb_setcolreg = ep93xxfb_setcolreg, .fb_mmap = ep93xxfb_mmap, }; From patchwork Wed Sep 27 07:26:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13400258 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 A632AE810A2 for ; Wed, 27 Sep 2023 07:49:47 +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=UiRApabFtChNDJVPVDk3O6PUJyOsqSVxqVymj5/GVzw=; b=Y843zE9nS0Ksfj m9/AlJIy10TnV4TrBg2raChXxCCUzutR3or40im0AAgQjj/Li29iYgKENQ/5OP+6vzg6xzXKm2Y1p 2Z6TPGoV0H/4bLXmX75JuJWOn+T6eaJug+JE8Uelqg3bCY0e0ug2DOU9NsbPUYi9cQ52YxezbWXoz iFQmlXr2O93aGHISIkDmkV8Uytez7IZFRQedgiw9BLH+jyukO1LKOo8yUGJktXvhuG7ydPwc9f4Rr Da9jLfo+ejU4eoo+/kPN80iH113IPh0QUDbrBltHKam0U9geFvR8Oc46AsaDYeuTfwV9jO2uA6sS9 Bz8Q4+Wm5DRYwuMLMdIA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qlPIN-000EtZ-28; Wed, 27 Sep 2023 07:49:19 +0000 Received: from smtp-out2.suse.de ([195.135.220.29]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qlPGe-000Dd9-1J for linux-arm-kernel@lists.infradead.org; Wed, 27 Sep 2023 07:47:36 +0000 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 870581F8AA; Wed, 27 Sep 2023 07:47:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1695800848; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=pwrPSewCj0iC/8aEgEvffUft61fUsYVDTpvoTv4MfPo=; b=2TtqbP+KKdv55FpRj6JtxrPpZ2/MnKEJsJNzIstYd3GNLnyBs98rK0yxuj/rVYouLvKZkE 5JA2GPG5EqSNdjUjbVyyXguT4BIfiHNzXCyT3mRYBSej2kD53Sdao70LkIVp677wSbek7s H54AnBoXNIwD/KWeit9veW2efqEDjG8= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1695800848; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=pwrPSewCj0iC/8aEgEvffUft61fUsYVDTpvoTv4MfPo=; b=F9Bi+Rza9B57Xoe6qhIuAL6hypEZifEEZ4MJzP/ROyMAea66XOtlNE73hSWoNSnD+bwf4y z9kc2uFgCMoygDAg== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 4977213A74; Wed, 27 Sep 2023 07:47:28 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id gGIRERDeE2XvUQAAMHmgww (envelope-from ); Wed, 27 Sep 2023 07:47:28 +0000 From: Thomas Zimmermann To: deller@gmx.de, javierm@redhat.com, sam@ravnborg.org, arnd@arndb.de, daniel@ffwll.ch Cc: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-nvidia@lists.surfsouth.com, linux-omap@vger.kernel.org, linux-parisc@vger.kernel.org, Thomas Zimmermann Subject: [PATCH 15/46] fbdev/gbefb: Initialize fb_ops to fbdev I/O-memory helpers Date: Wed, 27 Sep 2023 09:26:48 +0200 Message-ID: <20230927074722.6197-16-tzimmermann@suse.de> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20230927074722.6197-1-tzimmermann@suse.de> References: <20230927074722.6197-1-tzimmermann@suse.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230927_004732_615673_25778A99 X-CRM114-Status: GOOD ( 13.84 ) 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 Initialize the instance of struct fb_ops with fbdev initializer macros for framebuffers in I/O address space. Set the read/write, draw and mmap callbacks to the correct implementation and avoid implicit defaults. Also select the necessary I/O helpers in Kconfig. Fbdev drivers sometimes rely on the callbacks being NULL for a default implementation to be invoked; hence requiring the I/O helpers to be built in any case. Setting all callbacks in all drivers explicitly will allow to make the I/O helpers optional. This benefits systems that do not use these functions. No functional changes. Signed-off-by: Thomas Zimmermann --- drivers/video/fbdev/Kconfig | 4 +--- drivers/video/fbdev/gbefb.c | 7 +++---- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig index 64c7cbeb4cd79..0f6cd44bc7561 100644 --- a/drivers/video/fbdev/Kconfig +++ b/drivers/video/fbdev/Kconfig @@ -498,9 +498,7 @@ config FB_GBE bool "SGI Graphics Backend frame buffer support" depends on (FB = y) && HAS_IOMEM depends on SGI_IP32 || COMPILE_TEST - select FB_CFB_FILLRECT - select FB_CFB_COPYAREA - select FB_CFB_IMAGEBLIT + select FB_IOMEM_HELPERS help This is the frame buffer device driver for SGI Graphics Backend. This chip is used in SGI O2 and Visual Workstation 320/540. diff --git a/drivers/video/fbdev/gbefb.c b/drivers/video/fbdev/gbefb.c index 4fccdccbc364a..e89e5579258ef 100644 --- a/drivers/video/fbdev/gbefb.c +++ b/drivers/video/fbdev/gbefb.c @@ -1044,14 +1044,13 @@ static int gbefb_mmap(struct fb_info *info, static const struct fb_ops gbefb_ops = { .owner = THIS_MODULE, + __FB_DEFAULT_IOMEM_OPS_RDWR, .fb_check_var = gbefb_check_var, .fb_set_par = gbefb_set_par, .fb_setcolreg = gbefb_setcolreg, - .fb_mmap = gbefb_mmap, .fb_blank = gbefb_blank, - .fb_fillrect = cfb_fillrect, - .fb_copyarea = cfb_copyarea, - .fb_imageblit = cfb_imageblit, + __FB_DEFAULT_IOMEM_OPS_DRAW, + .fb_mmap = gbefb_mmap, }; /* From patchwork Wed Sep 27 07:26:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13400261 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 C1C5EE810A1 for ; Wed, 27 Sep 2023 07:49:49 +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=NboJyPPGf8i0c+3/da8ezLDsYbxAtvopk6HQFsuFL0w=; b=exnMSlL37hY393 KbkE0LA8suQnft6HM9KrFSaxkpKiaZUkJ7dzsEckSUwbfkITreFwuN1RYBM+o38W4zmC1QoLVv54W cOk+/oZ9dF3TVh9kf8CjYMzjgfVGwJCs1TFUJbMXGe/Ectp4aSLkVlpowQioD76g4DvWcUDRU3qSW NlyL3ur3oiFm0cH54zjag1CaZRAK3SSekXzpG3O0OjafQXVvkzr7lCuD1RgrJPbr29iMSbtZUOR1Y Xiv9Ppy5sO10QueV41aAmMg9qlTcvqcg04w7WX18g/pKisIoRlpgD0cBxusb/hMsfyZ2tgDrbMDcm TmIXwYxOrQ00+KO/p//w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qlPIQ-000EvP-1g; Wed, 27 Sep 2023 07:49:22 +0000 Received: from smtp-out2.suse.de ([2001:67c:2178:6::1d]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qlPGe-000DdN-2V for linux-arm-kernel@lists.infradead.org; Wed, 27 Sep 2023 07:47:38 +0000 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id C75711F8AB; Wed, 27 Sep 2023 07:47:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1695800848; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=wF4q/BcGjd3EcEu/UtBnJFO+RuYCH2Wk4kZdjDMiFr0=; b=WqzRei3/rLDeaKxj3/3jqeBHVMqWmeTdoE+a8zvSe2G5wm5Oc+Lu8RAeJPGSjtbhGqdN6k 3U0e+7rsJEzcIhBWGvNtXQ38e6IGyF9JSgCNK6jBc6ZSb4YkiE7GXWg9vhWMr+61Z0oQJb 4GjOL7sMBi57JynSyCCJjhZQ68dI+u8= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1695800848; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=wF4q/BcGjd3EcEu/UtBnJFO+RuYCH2Wk4kZdjDMiFr0=; b=kzF3hdiK0b7++Wq+QbEA1mbfhS2uglWQZRjaGRS7a/rptovTeehY5jf83rgoWxgTRjv9op /7+iVHa+ipYY46AQ== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 8B0011338F; Wed, 27 Sep 2023 07:47:28 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id UNcHIRDeE2XvUQAAMHmgww (envelope-from ); Wed, 27 Sep 2023 07:47:28 +0000 From: Thomas Zimmermann To: deller@gmx.de, javierm@redhat.com, sam@ravnborg.org, arnd@arndb.de, daniel@ffwll.ch Cc: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-nvidia@lists.surfsouth.com, linux-omap@vger.kernel.org, linux-parisc@vger.kernel.org, Thomas Zimmermann , Ferenc Bakonyi Subject: [PATCH 16/46] fbdev/hgafb: Initialize fb_ops to fbdev I/O-memory helpers Date: Wed, 27 Sep 2023 09:26:49 +0200 Message-ID: <20230927074722.6197-17-tzimmermann@suse.de> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20230927074722.6197-1-tzimmermann@suse.de> References: <20230927074722.6197-1-tzimmermann@suse.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230927_004732_980762_A3F0BEEB X-CRM114-Status: GOOD ( 11.79 ) 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 Initialize the instance of struct fb_ops with fbdev initializer macros for framebuffers in I/O address space. Set the read/write, draw and mmap callbacks to the correct implementation and avoid implicit defaults. Also select the necessary I/O helpers in Kconfig. Fbdev drivers sometimes rely on the callbacks being NULL for a default implementation to be invoked; hence requiring the I/O helpers to be built in any case. Setting all callbacks in all drivers explicitly will allow to make the I/O helpers optional. This benefits systems that do not use these functions. No functional changes. Signed-off-by: Thomas Zimmermann Cc: Ferenc Bakonyi --- drivers/video/fbdev/Kconfig | 1 + drivers/video/fbdev/hgafb.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig index 0f6cd44bc7561..0e0591fb32cae 100644 --- a/drivers/video/fbdev/Kconfig +++ b/drivers/video/fbdev/Kconfig @@ -485,6 +485,7 @@ config FB_N411 config FB_HGA tristate "Hercules mono graphics support" depends on FB && X86 + select FB_IOMEM_FOPS help Say Y here if you have a Hercules mono graphics card. diff --git a/drivers/video/fbdev/hgafb.c b/drivers/video/fbdev/hgafb.c index 6a64e6d7255eb..10728259dac25 100644 --- a/drivers/video/fbdev/hgafb.c +++ b/drivers/video/fbdev/hgafb.c @@ -532,12 +532,14 @@ static const struct fb_ops hgafb_ops = { .owner = THIS_MODULE, .fb_open = hgafb_open, .fb_release = hgafb_release, + __FB_DEFAULT_IOMEM_OPS_RDWR, .fb_setcolreg = hgafb_setcolreg, .fb_pan_display = hgafb_pan_display, .fb_blank = hgafb_blank, .fb_fillrect = hgafb_fillrect, .fb_copyarea = hgafb_copyarea, .fb_imageblit = hgafb_imageblit, + __FB_DEFAULT_IOMEM_OPS_MMAP, }; /* ------------------------------------------------------------------------- * From patchwork Wed Sep 27 07:26:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13400249 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 B968AE80AA2 for ; Wed, 27 Sep 2023 07:48:09 +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=CzuPSr5b3fXVTaelqE4uYgQS1f8R0OPqqCdlqREHfg0=; b=LCOoon5C1Q2ntd EpYeq6Aa0EjO2ZO0Uw4Hu7b20hfG6Xmg2Q9CAFTBxS/cn29QqgOp3mB9TU95EUq4nTTAX5O9ycJeo QzwXOPzL4XZ2RiVeIceyU1pVHnjoDA/kgwVHN7KiWEa0OCIH81NGQIMzWXEjaLgQn2OeqTL57s3EA wkAOUEe0UB+TkptZMrcEsZ++tQQZK06PoQwL6Xgfuale2Sgkb6Ke9scO+sxrNRY2lnadfwNcgVDEO eFFeps3In4mpEfPcSYxOJ0Z3uPVzttntJXcW8f2tSYu8feSpkcHFyf9y39kb+9ZrsFCUfd7hbp/fz Vg6LcMOdZMEJItDGvfNA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qlPGt-000Dti-1Y; Wed, 27 Sep 2023 07:47:47 +0000 Received: from smtp-out1.suse.de ([2001:67c:2178:6::1c]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qlPGe-000Dcs-0m for linux-arm-kernel@lists.infradead.org; Wed, 27 Sep 2023 07:47:35 +0000 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 19E64218A0; Wed, 27 Sep 2023 07:47:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1695800849; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=a1cq3c/ruH7vpeaGLX2GQTQpwjLjGI8CdqEohsvmpzQ=; b=eQZp9EKEeBcw2piskzwn/PKIA+8HFg221d7xem7srB/fHpesXl78CfNhvIe/8bEx+TTJQS 8AqmKkMVLVSyV5eHZyOzF48OyD++AIT5eBJwAjCvM1vLjgbZZ1sIPr6XkbjNhnkc3FKrrC OEjQLXPWpuADLckK/B6YiT9PGUnHHdY= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1695800849; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=a1cq3c/ruH7vpeaGLX2GQTQpwjLjGI8CdqEohsvmpzQ=; b=GzVUm9VcDLtSfmlMhD8lP0iqa7KhWqrUwJOQ1K57t2Ihr033n13EyRH6vLSQGYbvtEfrBV 4iTmaGiKN46rRlDA== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id CC7B913A74; Wed, 27 Sep 2023 07:47:28 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id SOz+MBDeE2XvUQAAMHmgww (envelope-from ); Wed, 27 Sep 2023 07:47:28 +0000 From: Thomas Zimmermann To: deller@gmx.de, javierm@redhat.com, sam@ravnborg.org, arnd@arndb.de, daniel@ffwll.ch Cc: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-nvidia@lists.surfsouth.com, linux-omap@vger.kernel.org, linux-parisc@vger.kernel.org, Thomas Zimmermann Subject: [PATCH 17/46] fbdev/hitfb: Initialize fb_ops to fbdev I/O-memory helpers Date: Wed, 27 Sep 2023 09:26:50 +0200 Message-ID: <20230927074722.6197-18-tzimmermann@suse.de> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20230927074722.6197-1-tzimmermann@suse.de> References: <20230927074722.6197-1-tzimmermann@suse.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230927_004732_463111_FAF705B1 X-CRM114-Status: GOOD ( 15.05 ) 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 Initialize the instance of struct fb_ops with fbdev initializer macros for framebuffers in I/O address space. Set the read/write, draw and mmap callbacks to the correct implementation and avoid implicit defaults. Also select the necessary I/O helpers in Kconfig. Fbdev drivers sometimes rely on the callbacks being NULL for a default implementation to be invoked; hence requiring the I/O helpers to be built in any case. Setting all callbacks in all drivers explicitly will allow to make the I/O helpers optional. This benefits systems that do not use these functions. No functional changes. Signed-off-by: Thomas Zimmermann --- drivers/video/fbdev/Kconfig | 2 +- drivers/video/fbdev/hitfb.c | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig index 0e0591fb32cae..6a5437ab3df30 100644 --- a/drivers/video/fbdev/Kconfig +++ b/drivers/video/fbdev/Kconfig @@ -1490,8 +1490,8 @@ config FB_HIT tristate "HD64461 Frame Buffer support" depends on FB && HD64461 select FB_CFB_FILLRECT - select FB_CFB_COPYAREA select FB_CFB_IMAGEBLIT + select FB_IOMEM_FOPS help This is the frame buffer device driver for the Hitachi HD64461 LCD frame buffer card. diff --git a/drivers/video/fbdev/hitfb.c b/drivers/video/fbdev/hitfb.c index 17715eaf06732..b64b74b76c71f 100644 --- a/drivers/video/fbdev/hitfb.c +++ b/drivers/video/fbdev/hitfb.c @@ -328,8 +328,9 @@ static int hitfb_set_par(struct fb_info *info) static const struct fb_ops hitfb_ops = { .owner = THIS_MODULE, + __FB_DEFAULT_IOMEM_OPS_RDWR, .fb_check_var = hitfb_check_var, - .fb_set_par = hitfb_set_par, + .fb_set_par = hitfb_set_par, .fb_setcolreg = hitfb_setcolreg, .fb_blank = hitfb_blank, .fb_sync = hitfb_sync, @@ -337,6 +338,7 @@ static const struct fb_ops hitfb_ops = { .fb_fillrect = hitfb_fillrect, .fb_copyarea = hitfb_copyarea, .fb_imageblit = cfb_imageblit, + __FB_DEFAULT_IOMEM_OPS_MMAP, }; static int hitfb_probe(struct platform_device *dev) From patchwork Wed Sep 27 07:26:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13400262 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 25B51E810A3 for ; Wed, 27 Sep 2023 07:49:50 +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=BU94hcvaC2ykkxCSLuuVCrqIXXfLwqn8kqC1qnfLlK8=; b=hDOVaKt0KPJ5rq h8WVKGRycvf2pwdqvU9xxD/WPcgS/3+SKibCS3sZao64uWL9cT7v8ZH9UqjPaGIXnJIleyv8pKpsR CHtx6EiCytblFDXpId8h3gpECbpnx+nwzLXu8N9VsbHga2Rs46RcTrzGysWxMyA/YksJAdVHIqAQ4 9Ucm2n0+WTBPS//IYcJxMVZJpcW5ONk0J4944xrsPZCcgen7fkWLdxdunPQfJROYXL+IZgFZxjdAW FOjV+kGraw7klWTkeka+pW/5/AsapQnJmAOh39l73JciL8mBMsh/Nv8TdCkATGHva1H84dtrGrA6m HyW5TkAYDj6PdqDxmyKg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qlPIO-000Eu6-2f; Wed, 27 Sep 2023 07:49:20 +0000 Received: from smtp-out2.suse.de ([195.135.220.29]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qlPGe-000DdM-2O for linux-arm-kernel@lists.infradead.org; Wed, 27 Sep 2023 07:47:36 +0000 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 5F0EE1F8AC; Wed, 27 Sep 2023 07:47:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1695800849; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=LULBWX2C3xdjC+8GatQVumxBrgFf6+dGXHWqVAsepzU=; b=dP4u12mqWwAy9Rr5vIq/Fg7RF3QPVxhva3E+Sctr7EQbVu5O9LmxC3o8QRWI/AxJH3mox3 RtUP9wGlyFVscHIzh+GJc1+9eKQ0rrkkcTGCrali0cD1SEuDKymiZln4WzTj4eqHfQmgwM tHpuxb1u8abC0voEo4UXPRrgJCyZIOI= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1695800849; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=LULBWX2C3xdjC+8GatQVumxBrgFf6+dGXHWqVAsepzU=; b=xqV5MqiHIoFL4pAr3gUVDXeYyeDtaUik97vh7dTqAj4xULDk8tbS0aH5xMhsnZIvjr+sSS GhV3Js+3PXGCSzCA== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 204D91338F; Wed, 27 Sep 2023 07:47:29 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id oKnmBhHeE2XvUQAAMHmgww (envelope-from ); Wed, 27 Sep 2023 07:47:29 +0000 From: Thomas Zimmermann To: deller@gmx.de, javierm@redhat.com, sam@ravnborg.org, arnd@arndb.de, daniel@ffwll.ch Cc: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-nvidia@lists.surfsouth.com, linux-omap@vger.kernel.org, linux-parisc@vger.kernel.org, Thomas Zimmermann Subject: [PATCH 18/46] fbdev/hpfb: Initialize fb_ops to fbdev I/O-memory helpers Date: Wed, 27 Sep 2023 09:26:51 +0200 Message-ID: <20230927074722.6197-19-tzimmermann@suse.de> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20230927074722.6197-1-tzimmermann@suse.de> References: <20230927074722.6197-1-tzimmermann@suse.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230927_004732_924253_D647C31F X-CRM114-Status: GOOD ( 11.96 ) 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 Initialize the instance of struct fb_ops with fbdev initializer macros for framebuffers in I/O address space. Set the read/write, draw and mmap callbacks to the correct implementation and avoid implicit defaults. Also select the necessary I/O helpers in Kconfig. Fbdev drivers sometimes rely on the callbacks being NULL for a default implementation to be invoked; hence requiring the I/O helpers to be built in any case. Setting all callbacks in all drivers explicitly will allow to make the I/O helpers optional. This benefits systems that do not use these functions. No functional changes. Signed-off-by: Thomas Zimmermann --- drivers/video/fbdev/Kconfig | 1 + drivers/video/fbdev/hpfb.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig index 6a5437ab3df30..3c28bff8a0770 100644 --- a/drivers/video/fbdev/Kconfig +++ b/drivers/video/fbdev/Kconfig @@ -407,6 +407,7 @@ config FB_HP300 bool depends on (FB = y) && DIO select FB_CFB_IMAGEBLIT + select FB_IOMEM_FOPS default y config FB_TGA diff --git a/drivers/video/fbdev/hpfb.c b/drivers/video/fbdev/hpfb.c index 406c1383cbda9..66fac8e5393e0 100644 --- a/drivers/video/fbdev/hpfb.c +++ b/drivers/video/fbdev/hpfb.c @@ -186,12 +186,14 @@ static int hpfb_sync(struct fb_info *info) static const struct fb_ops hpfb_ops = { .owner = THIS_MODULE, + __FB_DEFAULT_IOMEM_OPS_RDWR, .fb_setcolreg = hpfb_setcolreg, .fb_blank = hpfb_blank, .fb_fillrect = hpfb_fillrect, .fb_copyarea = hpfb_copyarea, .fb_imageblit = cfb_imageblit, .fb_sync = hpfb_sync, + __FB_DEFAULT_IOMEM_OPS_MMAP, }; /* Common to all HP framebuffers */ From patchwork Wed Sep 27 07:26:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13400263 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 D5EC4E810A0 for ; Wed, 27 Sep 2023 07:49:51 +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=pS6GvXThhrMY//7c1lVLxz0dMHwf835Gn9FKHZfVQMs=; b=hIoD2ceru2JtnO FIBA8D2KPiXDKgzXaAZ0JRlos4pzKYiWZq97KuyFHeCImxXftUgi14NCDlvSmj9OdivElK6NrK99G T+LFpHBKbsFjEzu+fxmiKdiFDk5cSm4tMsiOSSAgv0/oQij/JonkvaSeDxVhLY40LwGHAYKkgeKEm lXuU61IsDb69lspMWhJYdfQOKD9bocs2/JTqqAUTv6LSgX/D1QPfu/O3rtXwVPtyDRli9DNJnr9CU WK06KTQlC2/bTcIhPlTRAvyoe++Dueb4mUbTgtnu6182Ibqxhgq0Z9+U6yoV7u4k41izVE1NPa9uP VwKv4e8UdyNREZdBOrAA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qlPIQ-000Ev5-00; Wed, 27 Sep 2023 07:49:22 +0000 Received: from smtp-out2.suse.de ([2001:67c:2178:6::1d]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qlPGe-000DdL-2S for linux-arm-kernel@lists.infradead.org; Wed, 27 Sep 2023 07:47:37 +0000 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 9DEEE1F8AE; Wed, 27 Sep 2023 07:47:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1695800849; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=NxBcd+igdUhtckrFZURNbcjN7GUux7BiTjx9FHmuYUo=; b=ZYCyX7r0cwcVJuy0LbAIc3dfYn16daA1zWaYMDf/G4t2CitbNzwZSjg2O+E7Jk1gxr2qzF j61FmDEDjHFlZteTtvA2GdD9T6mLWq3CDooI0sCXqRnEQ8qp8/mfaUc5jAWRpIo1VupUyg CFQ41Hg7cBT2+rn9hywtOmYNPxoWVIU= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1695800849; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=NxBcd+igdUhtckrFZURNbcjN7GUux7BiTjx9FHmuYUo=; b=GI97PDQXS1zxO7wDoQc0aZYPvGqpDwWWGJJGuAdaFAqpCGTlpvL0D9hPs6KhFpTL9jD0Ty LWd4okG9vbbYHgCA== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 62AB213A74; Wed, 27 Sep 2023 07:47:29 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 0BtDFxHeE2XvUQAAMHmgww (envelope-from ); Wed, 27 Sep 2023 07:47:29 +0000 From: Thomas Zimmermann To: deller@gmx.de, javierm@redhat.com, sam@ravnborg.org, arnd@arndb.de, daniel@ffwll.ch Cc: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-nvidia@lists.surfsouth.com, linux-omap@vger.kernel.org, linux-parisc@vger.kernel.org, Thomas Zimmermann , Antonino Daplas Subject: [PATCH 19/46] fbdev/i810fb: Initialize fb_ops to fbdev I/O-memory helpers Date: Wed, 27 Sep 2023 09:26:52 +0200 Message-ID: <20230927074722.6197-20-tzimmermann@suse.de> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20230927074722.6197-1-tzimmermann@suse.de> References: <20230927074722.6197-1-tzimmermann@suse.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230927_004732_945664_E240231A X-CRM114-Status: GOOD ( 12.75 ) 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 Initialize the instance of struct fb_ops with fbdev initializer macros for framebuffers in I/O address space. Set the read/write, draw and mmap callbacks to the correct implementation and avoid implicit defaults. Also select the necessary I/O helpers in Kconfig. Fbdev drivers sometimes rely on the callbacks being NULL for a default implementation to be invoked; hence requiring the I/O helpers to be built in any case. Setting all callbacks in all drivers explicitly will allow to make the I/O helpers optional. This benefits systems that do not use these functions. No functional changes. Signed-off-by: Thomas Zimmermann Cc: Antonino Daplas --- drivers/video/fbdev/Kconfig | 4 +--- drivers/video/fbdev/i810/i810_main.c | 2 ++ 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig index 3c28bff8a0770..e42439cfb1a1d 100644 --- a/drivers/video/fbdev/Kconfig +++ b/drivers/video/fbdev/Kconfig @@ -793,10 +793,8 @@ config FB_I740 config FB_I810 tristate "Intel 810/815 support" depends on FB && PCI && X86_32 && AGP_INTEL + select FB_IOMEM_FOPS select FB_MODE_HELPERS - select FB_CFB_FILLRECT - select FB_CFB_COPYAREA - select FB_CFB_IMAGEBLIT select VGASTATE select VIDEO_NOMODESET help diff --git a/drivers/video/fbdev/i810/i810_main.c b/drivers/video/fbdev/i810/i810_main.c index f5511bb4fadca..d73a795fe1bef 100644 --- a/drivers/video/fbdev/i810/i810_main.c +++ b/drivers/video/fbdev/i810/i810_main.c @@ -1547,6 +1547,7 @@ static const struct fb_ops i810fb_ops = { .owner = THIS_MODULE, .fb_open = i810fb_open, .fb_release = i810fb_release, + __FB_DEFAULT_IOMEM_OPS_RDWR, .fb_check_var = i810fb_check_var, .fb_set_par = i810fb_set_par, .fb_setcolreg = i810fb_setcolreg, @@ -1557,6 +1558,7 @@ static const struct fb_ops i810fb_ops = { .fb_imageblit = i810fb_imageblit, .fb_cursor = i810fb_cursor, .fb_sync = i810fb_sync, + __FB_DEFAULT_IOMEM_OPS_MMAP, }; /*********************************************************************** From patchwork Wed Sep 27 07:26:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13400283 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 6ADE1E810A0 for ; Wed, 27 Sep 2023 07:50:18 +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=BV6hXxAFp6TBQ9mo/Sz6gQgJ98Nwu5krxyFETTv4Gcc=; b=EPk+tccV0+TTDo SfRtT/rqFFJFXdiJeGUpPYdoMf7kT06hlRXjSxcdBdRTGlSfwA4oNuAKf2ez4D+/EZKiAlqY/HupR CFIg8ZDW0G3Qb7KY+/8AopnpMikNvCN2QOSVYueX/8eI0cgUw53f7ONVMOC33ZQfsTnsgnq3TsCRj fxo2pXsL3hkZQWJ58tMlp+1/kbWKTaVCFfe58FwZRT1j43b09TKuxuv4KVK4kYeTfwWyorgWxQIib Aui3MAKcYkoQT/b/wwY84/7OYaLiw7Wv+bOIo2trWxdipX5rbYHWPyXa7XiFeQiZZyqpHdrR8Uh1S ZuRxTpHQCqSOHYG2/+5g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qlPIl-000FKs-1d; Wed, 27 Sep 2023 07:49:43 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qlPHJ-000EEq-1I for linux-arm-kernel@bombadil.infradead.org; Wed, 27 Sep 2023 07:48:13 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Content-Transfer-Encoding:MIME-Version :References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=uGBOmgCm4i8iNNFrQ7yI8VwSysTFgSUPvcyeUC+LxeA=; b=USnHcoWjQYt7x1fJtXN1/s8qrt CilydaYRi3TzaR20D91WhjdYIVdo0lwOpztNYyVYAMmnu7QvPbBxYq3BZrX2VXSJKomuqHfRr8zxR W9BmjM+eaq73rvK8+NwqIkjZnSI9p+WRWSix6qffN493sOFF/1SaT/tHFK8oZl7oMMCOBcO3g9gCF tUdbvY663GJgETrP1xsfEGXHg2FWexRkjt+ZPzoOpZNlureRCl9qoNok3F1wc9+J4fd+GZObW1qQN gDeZzxqlY16Io7+AMfYZ5hZkO9pdrvF+MZhraYyFjzrrhnObvww3tfkstvTCAaojz1y7Xi3+XdB1d JtS04lfA==; Received: from smtp-out2.suse.de ([2001:67c:2178:6::1d]) by desiato.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qlPGm-003hWf-2S for linux-arm-kernel@lists.infradead.org; Wed, 27 Sep 2023 07:48:11 +0000 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id DD4AE1F8AF; Wed, 27 Sep 2023 07:47:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1695800849; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=uGBOmgCm4i8iNNFrQ7yI8VwSysTFgSUPvcyeUC+LxeA=; b=lDSxxqCye8ayxBHSNjJZnlkzXBWKs26KBTprb9/jIn4Y+JhfELBX9XX5y1jLCFWLpZyhEt occigyeQdaOZgubuz6u3fOmkNrDV7A2yYGr2zV1xeOBZoHVYprNU1Y1xCWoptjGnbyWDSi pwP6XC71eqK5A5e7Ur4CcQq5KzeZwOY= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1695800849; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=uGBOmgCm4i8iNNFrQ7yI8VwSysTFgSUPvcyeUC+LxeA=; b=AY8Vyi0VWvSJ3FCZJl7sHWE0blNllyYtMrE44IGN5YZ5rT2b0t84G5RLPouCwZnG9uO/O8 Op6U4K2Z31d19HCA== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id A2D301338F; Wed, 27 Sep 2023 07:47:29 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id MFrWJhHeE2XvUQAAMHmgww (envelope-from ); Wed, 27 Sep 2023 07:47:29 +0000 From: Thomas Zimmermann To: deller@gmx.de, javierm@redhat.com, sam@ravnborg.org, arnd@arndb.de, daniel@ffwll.ch Cc: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-nvidia@lists.surfsouth.com, linux-omap@vger.kernel.org, linux-parisc@vger.kernel.org, Thomas Zimmermann Subject: [PATCH 20/46] fbdev/imsttfb: Initialize fb_ops to fbdev I/O-memory helpers Date: Wed, 27 Sep 2023 09:26:53 +0200 Message-ID: <20230927074722.6197-21-tzimmermann@suse.de> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20230927074722.6197-1-tzimmermann@suse.de> References: <20230927074722.6197-1-tzimmermann@suse.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230927_084744_825336_7B785F5A X-CRM114-Status: GOOD ( 12.21 ) 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 Initialize the instance of struct fb_ops with fbdev initializer macros for framebuffers in I/O address space. Set the read/write, draw and mmap callbacks to the correct implementation and avoid implicit defaults. Also select the necessary I/O helpers in Kconfig. Fbdev drivers sometimes rely on the callbacks being NULL for a default implementation to be invoked; hence requiring the I/O helpers to be built in any case. Setting all callbacks in all drivers explicitly will allow to make the I/O helpers optional. This benefits systems that do not use these functions. No functional changes. Signed-off-by: Thomas Zimmermann --- drivers/video/fbdev/Kconfig | 1 + drivers/video/fbdev/imsttfb.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig index e42439cfb1a1d..46f761ffa13c9 100644 --- a/drivers/video/fbdev/Kconfig +++ b/drivers/video/fbdev/Kconfig @@ -356,6 +356,7 @@ config FB_IMSTT bool "IMS Twin Turbo display support" depends on (FB = y) && PCI select FB_CFB_IMAGEBLIT + select FB_IOMEM_FOPS select FB_MACMODES if PPC_PMAC select VIDEO_NOMODESET help diff --git a/drivers/video/fbdev/imsttfb.c b/drivers/video/fbdev/imsttfb.c index f4c8677488fb8..e7e03e920729d 100644 --- a/drivers/video/fbdev/imsttfb.c +++ b/drivers/video/fbdev/imsttfb.c @@ -1336,6 +1336,7 @@ static struct pci_driver imsttfb_pci_driver = { static const struct fb_ops imsttfb_ops = { .owner = THIS_MODULE, + __FB_DEFAULT_IOMEM_OPS_RDWR, .fb_check_var = imsttfb_check_var, .fb_set_par = imsttfb_set_par, .fb_setcolreg = imsttfb_setcolreg, @@ -1345,6 +1346,7 @@ static const struct fb_ops imsttfb_ops = { .fb_copyarea = imsttfb_copyarea, .fb_imageblit = cfb_imageblit, .fb_ioctl = imsttfb_ioctl, + __FB_DEFAULT_IOMEM_OPS_MMAP, }; static int init_imstt(struct fb_info *info) From patchwork Wed Sep 27 07:26:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13400252 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 B6199E810B2 for ; Wed, 27 Sep 2023 07:48:14 +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=BQVaJpVMH8XbOp0aPF1UtabPfzHh9ts/0yqO45pMe8o=; b=SZSh87GiNb9FOh 0Dty+GKm8wgVOQGSggwI+CCi9R1Te0XoFbrOs7V9TrONgAQOgWbA4FuuxLQv1Qg5aqZiJNj+KWbpF WjNJM84ZLeiOqUufKr1xByQVqEkX3dzY70YG9Rze1BX2j8seftaVdZnfuH8esdR7Fv4J2OFPGettx ONOMcnAfY3UKUTNWE7QDQoNkOibp40Uh+AiJKA7VEs7LtyvxDD/qh4vKb/66iMqqSiynTRI8mzAWq JiLmGXtnCaHa+eYOo+3b3eL2iBMODnQNeZMTy9ONV5rNoSw4PfY1xwfHE9i1b5AgAB6AKmTv8eija mDFcxLY8u2MbdTvE5S9g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qlPGs-000Dsk-1Q; Wed, 27 Sep 2023 07:47:46 +0000 Received: from smtp-out1.suse.de ([195.135.220.28]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qlPGe-000Dcl-11 for linux-arm-kernel@lists.infradead.org; Wed, 27 Sep 2023 07:47:35 +0000 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 30598218A2; Wed, 27 Sep 2023 07:47:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1695800850; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=zoNkSP1xm6F8e8A1K7Rp8buTbSF05HOcVujnEuQjmXA=; b=g3uV31Zq5cu/s+j+N17iTRI7prQaoiU42/M3es/U5vfZm3J8r9YpB70qiDLWSKf7dyTcO7 /gimMZzrguh2xuvMP5mIGJ6ZbgCj8DHYnZ1eU93p9+vCqbp2aGcnD9Q6luwSCa94zhuRI4 XzCXphj7wkaTcJxOaSx9ErcZQSiZAmo= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1695800850; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=zoNkSP1xm6F8e8A1K7Rp8buTbSF05HOcVujnEuQjmXA=; b=G2sOpLRe/EVgCAJJjss/r3CZV4J6LvipbEO6PHnwKCjNY/svTjrN0PKOz172NvGAN2sfve ECQgYnvKZNNLsNCQ== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id E2A711338F; Wed, 27 Sep 2023 07:47:29 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 2DJ4NhHeE2XvUQAAMHmgww (envelope-from ); Wed, 27 Sep 2023 07:47:29 +0000 From: Thomas Zimmermann To: deller@gmx.de, javierm@redhat.com, sam@ravnborg.org, arnd@arndb.de, daniel@ffwll.ch Cc: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-nvidia@lists.surfsouth.com, linux-omap@vger.kernel.org, linux-parisc@vger.kernel.org, Thomas Zimmermann , Maik Broemme Subject: [PATCH 21/46] fbdev/intelfb: Initialize fb_ops to fbdev I/O-memory helpers Date: Wed, 27 Sep 2023 09:26:54 +0200 Message-ID: <20230927074722.6197-22-tzimmermann@suse.de> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20230927074722.6197-1-tzimmermann@suse.de> References: <20230927074722.6197-1-tzimmermann@suse.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230927_004732_528891_5074F709 X-CRM114-Status: GOOD ( 13.47 ) 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 Initialize the instance of struct fb_ops with fbdev initializer macros for framebuffers in I/O address space. Set the read/write, draw and mmap callbacks to the correct implementation and avoid implicit defaults. Also select the necessary I/O helpers in Kconfig. Fbdev drivers sometimes rely on the callbacks being NULL for a default implementation to be invoked; hence requiring the I/O helpers to be built in any case. Setting all callbacks in all drivers explicitly will allow to make the I/O helpers optional. This benefits systems that do not use these functions. No functional changes. Signed-off-by: Thomas Zimmermann Cc: Maik Broemme --- drivers/video/fbdev/Kconfig | 3 ++- drivers/video/fbdev/intelfb/intelfbdrv.c | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig index 46f761ffa13c9..c1bb885cee4c3 100644 --- a/drivers/video/fbdev/Kconfig +++ b/drivers/video/fbdev/Kconfig @@ -861,10 +861,11 @@ config FB_CARILLO_RANCH config FB_INTEL tristate "Intel 830M/845G/852GM/855GM/865G/915G/945G/945GM/965G/965GM support" depends on FB && PCI && X86 && AGP_INTEL && EXPERT - select FB_MODE_HELPERS select FB_CFB_FILLRECT select FB_CFB_COPYAREA select FB_CFB_IMAGEBLIT + select FB_IOMEM_FOPS + select FB_MODE_HELPERS select BOOT_VESA_SUPPORT if FB_INTEL = y select VIDEO_NOMODESET depends on !DRM_I915 diff --git a/drivers/video/fbdev/intelfb/intelfbdrv.c b/drivers/video/fbdev/intelfb/intelfbdrv.c index 3d334f1719596..d29d80a16295e 100644 --- a/drivers/video/fbdev/intelfb/intelfbdrv.c +++ b/drivers/video/fbdev/intelfb/intelfbdrv.c @@ -198,6 +198,7 @@ static const struct fb_ops intel_fb_ops = { .owner = THIS_MODULE, .fb_open = intelfb_open, .fb_release = intelfb_release, + __FB_DEFAULT_IOMEM_OPS_RDWR, .fb_check_var = intelfb_check_var, .fb_set_par = intelfb_set_par, .fb_setcolreg = intelfb_setcolreg, @@ -208,7 +209,8 @@ static const struct fb_ops intel_fb_ops = { .fb_imageblit = intelfb_imageblit, .fb_cursor = intelfb_cursor, .fb_sync = intelfb_sync, - .fb_ioctl = intelfb_ioctl + .fb_ioctl = intelfb_ioctl, + __FB_DEFAULT_IOMEM_OPS_MMAP, }; /* PCI driver module table */ From patchwork Wed Sep 27 07:26:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13400280 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 11232E810A1 for ; Wed, 27 Sep 2023 07:50:12 +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=/b1/aHj5XRmqEEl6hlx9OKW/+lqnP6bmzuM49AT5WO8=; b=ZBOB6NSfRTv9zb NVO3LjGIY6t1Aa54y2lx5E0WrBuO1F/9cRv1QTHdZDz3PXJN0qKgmVVKLZnUkIPueVqE/8/WovZZV C15yss0cV9gTzkA7Dio5jlpWdhCrGmYQztuXH+Mi8zrdcT22BRBxtMuIi2vhs++ZIB63h8viQ6pXl IVMDyNDMvxR4e2acYJ4pa8gH4zsYeaoQVoXYGw9HU/9GIL2q8qEJ7WP6vWQqDuc/978WZfL0vk6mX V7+Cs/W/63u0gEpEpoqpbMnHduUtmJmS8hjkgdPloOy4zUt6Dlxcvw9AMbImJsW1rGpcFpO/UqNhg Blg6TTQ9INri9dCg2xGA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qlPIn-000FNS-0u; Wed, 27 Sep 2023 07:49:45 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qlPHJ-000EEr-1K for linux-arm-kernel@bombadil.infradead.org; Wed, 27 Sep 2023 07:48:13 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Content-Transfer-Encoding:MIME-Version :References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=h92Cu0T0RlZflzHgcawkGCio2NpMhXHxxurgHdpog5I=; b=ZjPuNnG6iXQQWSRfEaSqepxRFW Mqv0K4Si+3zqGpU6dYmVjou/7jaPbi2vDjUYXOdj7FPid5Qmg1ure44BQgz6uk/zeluBShgqjA7u7 ECtioxcW7hP7qq8G9qq5YRH/CnOKvKy37ODvXnha/KgGkStylUDiqCSU/nkRSg6BTEG0Rd/oZbucb s7tTU35pdih8tYEuczTD8BCfrqF0TJ3LTlMCz4HmCCNOqL3DJS4QWRc/TvkXcv6W05CWWDnmdG8R8 tKDNp0i55I049SPpy3dqiZRet4SbSH5OmUBQgod5V2lFvvWoaySO375opN4LAsFCW8RumjnBVr80T hiysBJBw==; Received: from smtp-out2.suse.de ([195.135.220.29]) by desiato.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qlPGm-003hWg-2S for linux-arm-kernel@lists.infradead.org; Wed, 27 Sep 2023 07:48:11 +0000 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 718461F8B0; Wed, 27 Sep 2023 07:47:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1695800850; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=h92Cu0T0RlZflzHgcawkGCio2NpMhXHxxurgHdpog5I=; b=DayUKSGy56Gb+Qn/WJpEv3oC/TgW61JXeTBF0x40yHiD7YR5qgOzFX/jNIkGEGmPuoYbiB cYealw8oKu6PKfa+AgJRWcsY4s7vnw+RYiCNwqs1QSZQ7/UWCEx/KsOXUjRO4l6vIoKplO M51Taj/CcghFu4vgnUdh/I7z/s8D+sQ= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1695800850; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=h92Cu0T0RlZflzHgcawkGCio2NpMhXHxxurgHdpog5I=; b=LFDte3MO/cosS32fVUJhb1ezVH4WPymlHBK5D3BV89hZ0XfJExXv4ZoCWBE70gaQaO03y7 OWyNOiqwwKgyzQBw== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 3365B13A74; Wed, 27 Sep 2023 07:47:30 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id MGqlCxLeE2XvUQAAMHmgww (envelope-from ); Wed, 27 Sep 2023 07:47:30 +0000 From: Thomas Zimmermann To: deller@gmx.de, javierm@redhat.com, sam@ravnborg.org, arnd@arndb.de, daniel@ffwll.ch Cc: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-nvidia@lists.surfsouth.com, linux-omap@vger.kernel.org, linux-parisc@vger.kernel.org, Thomas Zimmermann Subject: [PATCH 22/46] fbdev/matroxfb: Initialize fb_ops to fbdev I/O-memory helpers Date: Wed, 27 Sep 2023 09:26:55 +0200 Message-ID: <20230927074722.6197-23-tzimmermann@suse.de> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20230927074722.6197-1-tzimmermann@suse.de> References: <20230927074722.6197-1-tzimmermann@suse.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230927_084744_865969_5D52E1D9 X-CRM114-Status: GOOD ( 13.86 ) 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 Initialize each instance of struct fb_ops with fbdev initializer macros for framebuffers in I/O address space. Set the read/write, draw and mmap callbacks to the correct implementation and avoid implicit defaults. Also select the necessary I/O helpers in Kconfig. Fbdev drivers sometimes rely on the callbacks being NULL for a default implementation to be invoked; hence requiring the I/O helpers to be built in any case. Setting all callbacks in all drivers explicitly will allow to make the I/O helpers optional. This benefits systems that do not use these functions. No functional changes. Signed-off-by: Thomas Zimmermann --- drivers/video/fbdev/Kconfig | 2 ++ drivers/video/fbdev/matrox/matroxfb_base.c | 2 ++ drivers/video/fbdev/matrox/matroxfb_crtc2.c | 4 +--- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig index c1bb885cee4c3..aa3d2e3930e91 100644 --- a/drivers/video/fbdev/Kconfig +++ b/drivers/video/fbdev/Kconfig @@ -903,6 +903,7 @@ config FB_MATROX select FB_CFB_FILLRECT select FB_CFB_COPYAREA select FB_CFB_IMAGEBLIT + select FB_IOMEM_FOPS select FB_TILEBLITTING select FB_MACMODES if PPC_PMAC select VIDEO_NOMODESET @@ -989,6 +990,7 @@ config FB_MATROX_I2C config FB_MATROX_MAVEN tristate "G400 second head support" depends on FB_MATROX_G && FB_MATROX_I2C + select FB_IOMEM_HELPERS help WARNING !!! This support does not work with G450 !!! diff --git a/drivers/video/fbdev/matrox/matroxfb_base.c b/drivers/video/fbdev/matrox/matroxfb_base.c index a043a737ea9f7..81603ce05a229 100644 --- a/drivers/video/fbdev/matrox/matroxfb_base.c +++ b/drivers/video/fbdev/matrox/matroxfb_base.c @@ -1204,6 +1204,7 @@ static const struct fb_ops matroxfb_ops = { .owner = THIS_MODULE, .fb_open = matroxfb_open, .fb_release = matroxfb_release, + __FB_DEFAULT_IOMEM_OPS_RDWR, .fb_check_var = matroxfb_check_var, .fb_set_par = matroxfb_set_par, .fb_setcolreg = matroxfb_setcolreg, @@ -1214,6 +1215,7 @@ static const struct fb_ops matroxfb_ops = { /* .fb_copyarea = , */ /* .fb_imageblit = , */ /* .fb_cursor = , */ + __FB_DEFAULT_IOMEM_OPS_MMAP, }; #define RSDepth(X) (((X) >> 8) & 0x0F) diff --git a/drivers/video/fbdev/matrox/matroxfb_crtc2.c b/drivers/video/fbdev/matrox/matroxfb_crtc2.c index 372197c124dec..417fc692468da 100644 --- a/drivers/video/fbdev/matrox/matroxfb_crtc2.c +++ b/drivers/video/fbdev/matrox/matroxfb_crtc2.c @@ -567,15 +567,13 @@ static const struct fb_ops matroxfb_dh_ops = { .owner = THIS_MODULE, .fb_open = matroxfb_dh_open, .fb_release = matroxfb_dh_release, + FB_DEFAULT_IOMEM_OPS, .fb_check_var = matroxfb_dh_check_var, .fb_set_par = matroxfb_dh_set_par, .fb_setcolreg = matroxfb_dh_setcolreg, .fb_pan_display =matroxfb_dh_pan_display, .fb_blank = matroxfb_dh_blank, .fb_ioctl = matroxfb_dh_ioctl, - .fb_fillrect = cfb_fillrect, - .fb_copyarea = cfb_copyarea, - .fb_imageblit = cfb_imageblit, }; static struct fb_var_screeninfo matroxfb_dh_defined = { From patchwork Wed Sep 27 07:26:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13400257 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 4F3A8E810A1 for ; Wed, 27 Sep 2023 07:49:46 +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=hX5Mv5mPY5K1UqCQIjGKA1aV8srYFX1gHkgbabHEsiA=; b=KLrGL0JTEaVbzm y4qipuNDpb1cYZg/zp438TuGBJnFXSRCPR7Ncs/7XvQYHeuu3kSli3++98NmfD8RxtTl7uLhuzed6 t3ALBBOPwLKa1ooWmthIj+L8Mw2sF2vzzPIjT1EOddxJAVAXoplk6W+KHwyL5Kd397eAQL/I7ngAk FRjdMRELobDqhkG1US5oNhtCXppjfcKnACAEl1/mCHfwl4U3hPGDfdctfDBwI2tB6we5jAzBlhi1Y xhu5erap5dqYKNeksv7ckwu0C7WOzaY8oYy3rH2FqAbZIL9uhJ+uA30/GDBQkZAJUSvGwaeHkXcbw IB0dAZcRbVhji/FZruMQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qlPIM-000Esg-0L; Wed, 27 Sep 2023 07:49:18 +0000 Received: from smtp-out2.suse.de ([2001:67c:2178:6::1d]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qlPGg-000Dfv-1W for linux-arm-kernel@lists.infradead.org; Wed, 27 Sep 2023 07:47:38 +0000 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id B02F01F8B2; Wed, 27 Sep 2023 07:47:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1695800850; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=IsGg9pBHcmBGVB5fVyVMCdUdUXsjyV91NOpw9W5mbGw=; b=jr1y2UtrRO2Fvk4sTHj25E6K84GRQx4pQ/OPJPDlgynLAgPtyMDJkiktpaU8QgIPTXseh7 IcitXZOrzlCzPoTGhglzHEAuVCYW65xRhwd6eGvGOHs4btRAxn43q34sBrxoBT6k5NpCw4 smNgi2G/CgB1yY00cKoy7c/9798VbKc= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1695800850; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=IsGg9pBHcmBGVB5fVyVMCdUdUXsjyV91NOpw9W5mbGw=; b=VkmhwgRgFImZwchYzYgk7yADLhUAME2HkS8W1Ul4JJxek+eiAHTVprsnZni4roOFsXnHvm MAVqaDyIUa/lPTDQ== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 767171338F; Wed, 27 Sep 2023 07:47:30 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id AHv/GxLeE2XvUQAAMHmgww (envelope-from ); Wed, 27 Sep 2023 07:47:30 +0000 From: Thomas Zimmermann To: deller@gmx.de, javierm@redhat.com, sam@ravnborg.org, arnd@arndb.de, daniel@ffwll.ch Cc: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-nvidia@lists.surfsouth.com, linux-omap@vger.kernel.org, linux-parisc@vger.kernel.org, Thomas Zimmermann Subject: [PATCH 23/46] fbdev/neofb: Initialize fb_ops to fbdev I/O-memory helpers Date: Wed, 27 Sep 2023 09:26:56 +0200 Message-ID: <20230927074722.6197-24-tzimmermann@suse.de> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20230927074722.6197-1-tzimmermann@suse.de> References: <20230927074722.6197-1-tzimmermann@suse.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230927_004734_653315_C48E73AF X-CRM114-Status: GOOD ( 13.03 ) 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 Initialize the instance of struct fb_ops with fbdev initializer macros for framebuffers in I/O address space. Set the read/write, draw and mmap callbacks to the correct implementation and avoid implicit defaults. Also select the necessary I/O helpers in Kconfig. Fbdev drivers sometimes rely on the callbacks being NULL for a default implementation to be invoked; hence requiring the I/O helpers to be built in any case. Setting all callbacks in all drivers explicitly will allow to make the I/O helpers optional. This benefits systems that do not use these functions. No functional changes. Signed-off-by: Thomas Zimmermann --- drivers/video/fbdev/Kconfig | 3 ++- drivers/video/fbdev/neofb.c | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig index aa3d2e3930e91..6105a97a3cf9c 100644 --- a/drivers/video/fbdev/Kconfig +++ b/drivers/video/fbdev/Kconfig @@ -1268,10 +1268,11 @@ endif config FB_NEOMAGIC tristate "NeoMagic display support" depends on FB && PCI - select FB_MODE_HELPERS select FB_CFB_FILLRECT select FB_CFB_COPYAREA select FB_CFB_IMAGEBLIT + select FB_IOMEM_FOPS + select FB_MODE_HELPERS select VGASTATE select VIDEO_NOMODESET help diff --git a/drivers/video/fbdev/neofb.c b/drivers/video/fbdev/neofb.c index b58b11015c0c6..632ba24559139 100644 --- a/drivers/video/fbdev/neofb.c +++ b/drivers/video/fbdev/neofb.c @@ -1614,6 +1614,7 @@ static const struct fb_ops neofb_ops = { .owner = THIS_MODULE, .fb_open = neofb_open, .fb_release = neofb_release, + __FB_DEFAULT_IOMEM_OPS_RDWR, .fb_check_var = neofb_check_var, .fb_set_par = neofb_set_par, .fb_setcolreg = neofb_setcolreg, @@ -1623,6 +1624,7 @@ static const struct fb_ops neofb_ops = { .fb_fillrect = neofb_fillrect, .fb_copyarea = neofb_copyarea, .fb_imageblit = neofb_imageblit, + __FB_DEFAULT_IOMEM_OPS_MMAP, }; /* --------------------------------------------------------------------- */ From patchwork Wed Sep 27 07:26:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13400255 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 691E5E810A2 for ; Wed, 27 Sep 2023 07:49:44 +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=gsqLHo+/rzPE1r8JWwfSzNsvmVMZrYSUsVpVFQimMII=; b=YNtEx0pyS6HjYD 6YtYDMRRyRtjr4Ya5QhvF/r2+ybO0EovfvayVDHqtAiY8M55dohhXa93+ZJDPCNnA7glOneokO+hd MBzmH7DttKmNCgG2oGwT7/abkZ4dPib3rmLZiLDNjrhhgMTiyqkCafiN2Mp+3YpxPpme0u+oods6V WbvYKBW2Lzs+Xca5lHKa5XBtXdtDMRgBtQfMUymZ0QaIcwb/HAsK+EZPHKmMbrswzAzqfa6/MOF7y ea3HHchWCiLd7nAWmn3Mo2Uj2Ek2q7eKAbQelzbyWziHYMq2Psc1vyUESJIisC9vCZZWMmgXhpq44 vDt+mo/hMkOTbgIROJ3g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qlPIO-000Etp-0p; Wed, 27 Sep 2023 07:49:20 +0000 Received: from smtp-out1.suse.de ([195.135.220.28]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qlPGe-000DdA-1X for linux-arm-kernel@lists.infradead.org; Wed, 27 Sep 2023 07:47:36 +0000 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 336F2218A4; Wed, 27 Sep 2023 07:47:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1695800851; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=PeQUJIWHKBBJ3jys9jjR4bGnZhwDb6jK0AnbAs8YGpk=; b=yZkOcQObzqTpg0xhq9dzvYbujp/QwAFaI6MGVQqN2dGUAIS2mKhvY9D9qTGNDN7TqxCPCP oDCgAr6sz60QliCOY6/4imoISZS4n666LuzJq/BVCApp128aixe0OLrVvAy35Ny1MZTJQn 7RA0QbVn1L4mGnAkDdH9vP7v4RmNz4E= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1695800851; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=PeQUJIWHKBBJ3jys9jjR4bGnZhwDb6jK0AnbAs8YGpk=; b=TJrvxOxYcF4yr5U6G4xV3p21zcvJSi8u26plSvZZGhJIxrnXRzOT7CVicCbxHnUK6cOHyq JBOJngSDyrVIagAQ== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id B346613A74; Wed, 27 Sep 2023 07:47:30 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id YLXsKhLeE2XvUQAAMHmgww (envelope-from ); Wed, 27 Sep 2023 07:47:30 +0000 From: Thomas Zimmermann To: deller@gmx.de, javierm@redhat.com, sam@ravnborg.org, arnd@arndb.de, daniel@ffwll.ch Cc: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-nvidia@lists.surfsouth.com, linux-omap@vger.kernel.org, linux-parisc@vger.kernel.org, Thomas Zimmermann , Antonino Daplas Subject: [PATCH 24/46] fbdev/nvidiafb: Initialize fb_ops to fbdev I/O-memory helpers Date: Wed, 27 Sep 2023 09:26:57 +0200 Message-ID: <20230927074722.6197-25-tzimmermann@suse.de> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20230927074722.6197-1-tzimmermann@suse.de> References: <20230927074722.6197-1-tzimmermann@suse.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230927_004732_655619_31E0A849 X-CRM114-Status: GOOD ( 13.01 ) 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 Initialize the instance of struct fb_ops with fbdev initializer macros for framebuffers in I/O address space. Set the read/write, draw and mmap callbacks to the correct implementation and avoid implicit defaults. Also select the necessary I/O helpers in Kconfig. Fbdev drivers sometimes rely on the callbacks being NULL for a default implementation to be invoked; hence requiring the I/O helpers to be built in any case. Setting all callbacks in all drivers explicitly will allow to make the I/O helpers optional. This benefits systems that do not use these functions. No functional changes. Signed-off-by: Thomas Zimmermann Cc: Antonino Daplas --- drivers/video/fbdev/Kconfig | 2 +- drivers/video/fbdev/nvidia/nvidia.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig index 6105a97a3cf9c..8b387d98f6b1e 100644 --- a/drivers/video/fbdev/Kconfig +++ b/drivers/video/fbdev/Kconfig @@ -689,10 +689,10 @@ config FB_NVIDIA tristate "nVidia Framebuffer Support" depends on FB && PCI select FB_BACKLIGHT if FB_NVIDIA_BACKLIGHT - select FB_MODE_HELPERS select FB_CFB_FILLRECT select FB_CFB_COPYAREA select FB_CFB_IMAGEBLIT + select FB_IOMEM_FOPS select BITREVERSE select VGASTATE select VIDEO_NOMODESET diff --git a/drivers/video/fbdev/nvidia/nvidia.c b/drivers/video/fbdev/nvidia/nvidia.c index 907c22408652b..8900f181f1952 100644 --- a/drivers/video/fbdev/nvidia/nvidia.c +++ b/drivers/video/fbdev/nvidia/nvidia.c @@ -1028,6 +1028,7 @@ static struct fb_ops nvidia_fb_ops = { .owner = THIS_MODULE, .fb_open = nvidiafb_open, .fb_release = nvidiafb_release, + __FB_DEFAULT_IOMEM_OPS_RDWR, .fb_check_var = nvidiafb_check_var, .fb_set_par = nvidiafb_set_par, .fb_setcolreg = nvidiafb_setcolreg, @@ -1038,6 +1039,7 @@ static struct fb_ops nvidia_fb_ops = { .fb_imageblit = nvidiafb_imageblit, .fb_cursor = nvidiafb_cursor, .fb_sync = nvidiafb_sync, + __FB_DEFAULT_IOMEM_OPS_MMAP, }; static int nvidiafb_suspend_late(struct device *dev, pm_message_t mesg) From patchwork Wed Sep 27 07:26:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13400260 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 71AD4E810A0 for ; Wed, 27 Sep 2023 07:49:49 +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=AlfPKjpqPgfkeiIucg6KjqpYXdFie4wpAnT6WHachak=; b=s/Tmv/Wg9xhCbB JG4Oyk1uZFKGMB0+j9EHnEeFVjPnWxmpDjIXeuknIQdlfLxSBh92Qc33wzMool+esutHaAEqM+Jcw lJt08GcXlsEKHkerVdA5wwEAzdyEn+mUxEXnnT2+9j2PGxj19OhuVpzWKKWJb2iIA8UOIE3Out+Iq 33aHM9aJv0ywjeDHPnNqTyGjG0Hd+kRpAiI4ztLZgoX40W10KphSC3c7DJEApjgi1OoNiVEAfkfcQ nIsGGNY8j5gAc9XqRf52OVKsHaE64uFbt6bvCbc7wmKIvPJg06TjyvdIeeecY1Ab2WFTVATJZ53Y0 y5BPkTecUadKPIJF4RIw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qlPIP-000EuS-1D; Wed, 27 Sep 2023 07:49:21 +0000 Received: from smtp-out1.suse.de ([195.135.220.28]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qlPGe-000DdG-2J for linux-arm-kernel@lists.infradead.org; Wed, 27 Sep 2023 07:47:37 +0000 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 71EAF218A9; Wed, 27 Sep 2023 07:47:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1695800851; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=f9++LjsnH7yAhNPAXtWrv3/mQA8oqsgHR5HwyxPZ/n8=; b=iGt8RSFx+qwdAVUE5ENX/gS9CvFjEUyPgKX+Z6Hbyx+EOkBaFF0n+goaCdq9itSTFh9aSY lKNxmWbz4+J9UuQup+tvxBfyQcBAPFQQNz10MikzPUIYPt2yldbaAhnrIolAojCrWhMRR+ eNOOl4V/NKkQ13CFp84Y/BBoEAqprzI= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1695800851; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=f9++LjsnH7yAhNPAXtWrv3/mQA8oqsgHR5HwyxPZ/n8=; b=MXS8vStIxVi4Boh8/vDfK6/lOasauFDYKQE0Mj8PA7H0t2Gx5YCo9AeODJTKryFK1gvi6Z JWvDM5YHSt2/kGBg== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 389571338F; Wed, 27 Sep 2023 07:47:31 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id YJGsDBPeE2XvUQAAMHmgww (envelope-from ); Wed, 27 Sep 2023 07:47:31 +0000 From: Thomas Zimmermann To: deller@gmx.de, javierm@redhat.com, sam@ravnborg.org, arnd@arndb.de, daniel@ffwll.ch Cc: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-nvidia@lists.surfsouth.com, linux-omap@vger.kernel.org, linux-parisc@vger.kernel.org, Thomas Zimmermann Subject: [PATCH 25/46] fbdev/omapfb: Initialize fb_ops to fbdev I/O-memory helpers Date: Wed, 27 Sep 2023 09:26:58 +0200 Message-ID: <20230927074722.6197-26-tzimmermann@suse.de> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20230927074722.6197-1-tzimmermann@suse.de> References: <20230927074722.6197-1-tzimmermann@suse.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230927_004732_896792_2DC7F3D7 X-CRM114-Status: GOOD ( 13.02 ) 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 Initialize the instance of struct fb_ops with fbdev initializer macros for framebuffers in I/O address space. Set the read/write, draw and mmap callbacks to the correct implementation and avoid implicit defaults. Also select the necessary I/O helpers in Kconfig. Fbdev drivers sometimes rely on the callbacks being NULL for a default implementation to be invoked; hence requiring the I/O helpers to be built in any case. Setting all callbacks in all drivers explicitly will allow to make the I/O helpers optional. This benefits systems that do not use these functions. No functional changes. Signed-off-by: Thomas Zimmermann --- drivers/video/fbdev/omap2/omapfb/Kconfig | 4 +--- drivers/video/fbdev/omap2/omapfb/omapfb-main.c | 5 ++--- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/video/fbdev/omap2/omapfb/Kconfig b/drivers/video/fbdev/omap2/omapfb/Kconfig index 21069fdb7cc21..f4cdf999a0801 100644 --- a/drivers/video/fbdev/omap2/omapfb/Kconfig +++ b/drivers/video/fbdev/omap2/omapfb/Kconfig @@ -10,9 +10,7 @@ menuconfig FB_OMAP2 depends on GPIOLIB select FB_OMAP2_DSS select OMAP2_VRFB if ARCH_OMAP2 || ARCH_OMAP3 - select FB_CFB_FILLRECT - select FB_CFB_COPYAREA - select FB_CFB_IMAGEBLIT + select FB_IOMEM_HELPERS help Frame buffer driver for OMAP2+ based boards. diff --git a/drivers/video/fbdev/omap2/omapfb/omapfb-main.c b/drivers/video/fbdev/omap2/omapfb/omapfb-main.c index b5acad8eb2796..c9fd0ad352d7f 100644 --- a/drivers/video/fbdev/omap2/omapfb/omapfb-main.c +++ b/drivers/video/fbdev/omap2/omapfb/omapfb-main.c @@ -1280,10 +1280,9 @@ static const struct fb_ops omapfb_ops = { .owner = THIS_MODULE, .fb_open = omapfb_open, .fb_release = omapfb_release, - .fb_fillrect = cfb_fillrect, - .fb_copyarea = cfb_copyarea, - .fb_imageblit = cfb_imageblit, + __FB_DEFAULT_IOMEM_OPS_RDWR, .fb_blank = omapfb_blank, + __FB_DEFAULT_IOMEM_OPS_DRAW, .fb_ioctl = omapfb_ioctl, .fb_check_var = omapfb_check_var, .fb_set_par = omapfb_set_par, From patchwork Wed Sep 27 07:26:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13400276 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 C460DE810A0 for ; Wed, 27 Sep 2023 07:50:01 +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=YavIkVO0bR/oKQW7wixZ3GiqnDn9ChqgTEBh993xxJU=; b=14dMpiXJkLXAWC xk0wETLStKSfeXQafy5OckzDmvSYgCpDGR/VZsSAo+ZBObeZEaMGvwc+BsZMWzHB19y/Dq97Iksxn BiYg8VdNyKExB5gc4mBv3CeyG61zfZ38UfuPrj+VoTomx92JT5WW5COi/ogEf5O6udam90ZEFfAjG Wb2k0y3TxwwBCAoQ/NP8uFKKFz3P8Uu2VM7bae9369u/ZQaKAE9/pjkKftylFNjp/yGCS7yTLAdxL 0/nuWxJIQqqkcs8Zy//+fdHkub8P06wucn4lfEniylBVxeK86la5s00JuCvwXTqmC08fYoERedAkF x01zufCL3ei7vdLPGyCQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qlPId-000F9d-0g; Wed, 27 Sep 2023 07:49:35 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qlPGx-000DxK-1e for linux-arm-kernel@bombadil.infradead.org; Wed, 27 Sep 2023 07:47:51 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Content-Transfer-Encoding:MIME-Version :References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=4SawcUauzfSMzVc13G6P84v6QvX6h7SbS69ov5HniAc=; b=SrDwnCdJmMxm8x0KwAVsne0Jp3 O+3BsWmWt3/khGx57ngQBkrgisOkJ3WpSjVC7E393VXtW7D5AAWWV8mykzgIxWAlOfsPyu+qK2V// TFqefqS2ARIxkMOefS9SxFRsBbm8SHbthACVKy1XsCfRVxaTBEGyJbzq6cXvsL7FHll22F/P8maj2 F5xzcnUZHaBlYFDEi1n4H05CjB8VcsFtVPlKfWfrovtiV7Pu5+BToYl3cTEBXVQoPVHzDtvR+vcQ8 uaLrirQz4GQ46i+jUBmuOaScKeKK44QAl1VwifADnWah4ifSfT5GMo9kbBHtQ4KIDLhhZqQDhnmQ9 wR3rD6uQ==; Received: from smtp-out1.suse.de ([2001:67c:2178:6::1c]) by desiato.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qlPGm-003hWh-2S for linux-arm-kernel@lists.infradead.org; Wed, 27 Sep 2023 07:47:49 +0000 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id AD67C218B0; Wed, 27 Sep 2023 07:47:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1695800851; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=4SawcUauzfSMzVc13G6P84v6QvX6h7SbS69ov5HniAc=; b=gAeRtyWVTOp1CBjfO+yzCvNnS03xFhypMhwRWATg/qYmWfByITmZ/E0/r6rSTtB/M9dsyQ N6aEmwnhkgn0PGF8RICWnqSudPgg8WlWaJ5CQo7UZ/MomkZgDLK09fwuaBaejaZtWr0Mcs KQCVbGBiICKuScpbiHPlZXE7MTi9HS4= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1695800851; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=4SawcUauzfSMzVc13G6P84v6QvX6h7SbS69ov5HniAc=; b=pd6a3JyV1GzWhf5ykqEfILrm/5OokWKiJ1VyDRNYSoHKaLNLJdbOuIdpWORRbNchITHgw6 UwfNjg4nlE3D0bAQ== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 7406E13A74; Wed, 27 Sep 2023 07:47:31 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id cOuIGxPeE2XvUQAAMHmgww (envelope-from ); Wed, 27 Sep 2023 07:47:31 +0000 From: Thomas Zimmermann To: deller@gmx.de, javierm@redhat.com, sam@ravnborg.org, arnd@arndb.de, daniel@ffwll.ch Cc: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-nvidia@lists.surfsouth.com, linux-omap@vger.kernel.org, linux-parisc@vger.kernel.org, Thomas Zimmermann Subject: [PATCH 26/46] fbdev/pm2fb: Initialize fb_ops to fbdev I/O-memory helpers Date: Wed, 27 Sep 2023 09:26:59 +0200 Message-ID: <20230927074722.6197-27-tzimmermann@suse.de> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20230927074722.6197-1-tzimmermann@suse.de> References: <20230927074722.6197-1-tzimmermann@suse.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230927_084744_854373_20FC7A1E X-CRM114-Status: GOOD ( 12.78 ) 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 Initialize the instance of struct fb_ops with fbdev initializer macros for framebuffers in I/O address space. Set the read/write, draw and mmap callbacks to the correct implementation and avoid implicit defaults. Also select the necessary I/O helpers in Kconfig. Fbdev drivers sometimes rely on the callbacks being NULL for a default implementation to be invoked; hence requiring the I/O helpers to be built in any case. Setting all callbacks in all drivers explicitly will allow to make the I/O helpers optional. This benefits systems that do not use these functions. No functional changes. Signed-off-by: Thomas Zimmermann --- drivers/video/fbdev/Kconfig | 1 + drivers/video/fbdev/pm2fb.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig index 8b387d98f6b1e..ba5fc63691b16 100644 --- a/drivers/video/fbdev/Kconfig +++ b/drivers/video/fbdev/Kconfig @@ -94,6 +94,7 @@ config FB_PM2 select FB_CFB_FILLRECT select FB_CFB_COPYAREA select FB_CFB_IMAGEBLIT + select FB_IOMEM_FOPS select VIDEO_NOMODESET help This is the frame buffer device driver for cards based on diff --git a/drivers/video/fbdev/pm2fb.c b/drivers/video/fbdev/pm2fb.c index 5a79a12efd8e3..f34429829b7d7 100644 --- a/drivers/video/fbdev/pm2fb.c +++ b/drivers/video/fbdev/pm2fb.c @@ -1492,6 +1492,7 @@ static int pm2fb_cursor(struct fb_info *info, struct fb_cursor *cursor) static const struct fb_ops pm2fb_ops = { .owner = THIS_MODULE, + __FB_DEFAULT_IOMEM_OPS_RDWR, .fb_check_var = pm2fb_check_var, .fb_set_par = pm2fb_set_par, .fb_setcolreg = pm2fb_setcolreg, @@ -1502,6 +1503,7 @@ static const struct fb_ops pm2fb_ops = { .fb_imageblit = pm2fb_imageblit, .fb_sync = pm2fb_sync, .fb_cursor = pm2fb_cursor, + __FB_DEFAULT_IOMEM_OPS_MMAP, }; /* From patchwork Wed Sep 27 07:27:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13400267 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 ADB26E810A0 for ; Wed, 27 Sep 2023 07:49:54 +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=75DkA07zvu4UiEZUXdd0ekxj4ffizj4RdE9pXXQOVEs=; b=wvR0ychJKJdnLy Shpx+dLWuDZgoK0Vy+x1+w29azhuHyxc4Dq6eYNv6G41QavW5YlTjKJhaZ1zcrGNhA+yZwPZhGpX3 RDnZUG+c3fV7tH9xxn6NU0ORs3D59I1uVU1FCQ1Y4hwvRCdOu2RksST+YK8SPU9bjd7RXXmxsWWhL uSO255g92KR2ZHp8QSYZ28T9pO2cJkdsug3cLCES8+PkUcBBFWuYAHygumF1qE+QqcyY0kz2jE4Oi OB8aSrxLmsMMIJo4XzWlaxrrWwV+ykL1Wj8ies1fi9eGluUdyDeF0i0anQUfxGTeqNhc8KNvmTrJl YMplJ4bViD4QniSiVwpA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qlPIR-000Ew3-0R; Wed, 27 Sep 2023 07:49:23 +0000 Received: from smtp-out2.suse.de ([195.135.220.29]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qlPGg-000Dg7-2C for linux-arm-kernel@lists.infradead.org; Wed, 27 Sep 2023 07:47:39 +0000 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id EAA911F8B3; Wed, 27 Sep 2023 07:47:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1695800851; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=kiAB9thNN4d00UsEjXVGtXWPtmT3/Z08ldzeOF5qv0g=; b=b2+e6gOllobM4T8Sxt9uRNuvZShy4FeBfJ7SzxHBe4MBvIXj6vEIGsa04bKsGwkCJd9t7j dEfps7cZV6IS2cOe+fWc729lZCLJ3TvJlxdU3fTdbHCQCP+dRK6w4Kax9A/JEAljZKrAaD JrnJ+bitA4vhVMR8KmzAz4Me5KRwD3Q= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1695800851; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=kiAB9thNN4d00UsEjXVGtXWPtmT3/Z08ldzeOF5qv0g=; b=Ywx6rc0PMREZmRo0xBYdiSX3MNQzkF1F9JK5XTMMEC12La5wDWPduKh5v3/fptc2u/m7KD LAiVWnusIY2FBfDA== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id B0AB31338F; Wed, 27 Sep 2023 07:47:31 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id OL1TKhPeE2XvUQAAMHmgww (envelope-from ); Wed, 27 Sep 2023 07:47:31 +0000 From: Thomas Zimmermann To: deller@gmx.de, javierm@redhat.com, sam@ravnborg.org, arnd@arndb.de, daniel@ffwll.ch Cc: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-nvidia@lists.surfsouth.com, linux-omap@vger.kernel.org, linux-parisc@vger.kernel.org, Thomas Zimmermann Subject: [PATCH 27/46] fbdev/pm3fb: Initialize fb_ops to fbdev I/O-memory helpers Date: Wed, 27 Sep 2023 09:27:00 +0200 Message-ID: <20230927074722.6197-28-tzimmermann@suse.de> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20230927074722.6197-1-tzimmermann@suse.de> References: <20230927074722.6197-1-tzimmermann@suse.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230927_004734_862347_1FBA2894 X-CRM114-Status: GOOD ( 13.20 ) 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 Initialize the instance of struct fb_ops with fbdev initializer macros for framebuffers in I/O address space. Set the read/write, draw and mmap callbacks to the correct implementation and avoid implicit defaults. Also select the necessary I/O helpers in Kconfig. Fbdev drivers sometimes rely on the callbacks being NULL for a default implementation to be invoked; hence requiring the I/O helpers to be built in any case. Setting all callbacks in all drivers explicitly will allow to make the I/O helpers optional. This benefits systems that do not use these functions. No functional changes. Signed-off-by: Thomas Zimmermann --- drivers/video/fbdev/Kconfig | 1 + drivers/video/fbdev/pm3fb.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig index ba5fc63691b16..afc1cf05a30f8 100644 --- a/drivers/video/fbdev/Kconfig +++ b/drivers/video/fbdev/Kconfig @@ -1404,6 +1404,7 @@ config FB_PM3 select FB_CFB_FILLRECT select FB_CFB_COPYAREA select FB_CFB_IMAGEBLIT + select FB_IOMEM_FOPS select VIDEO_NOMODESET help This is the frame buffer device driver for the 3DLabs Permedia3 diff --git a/drivers/video/fbdev/pm3fb.c b/drivers/video/fbdev/pm3fb.c index 16577d0e41b1a..6e55e42514d63 100644 --- a/drivers/video/fbdev/pm3fb.c +++ b/drivers/video/fbdev/pm3fb.c @@ -1203,6 +1203,7 @@ static int pm3fb_blank(int blank_mode, struct fb_info *info) static const struct fb_ops pm3fb_ops = { .owner = THIS_MODULE, + __FB_DEFAULT_IOMEM_OPS_RDWR, .fb_check_var = pm3fb_check_var, .fb_set_par = pm3fb_set_par, .fb_setcolreg = pm3fb_setcolreg, @@ -1213,6 +1214,7 @@ static const struct fb_ops pm3fb_ops = { .fb_blank = pm3fb_blank, .fb_sync = pm3fb_sync, .fb_cursor = pm3fb_cursor, + __FB_DEFAULT_IOMEM_OPS_MMAP, }; /* ------------------------------------------------------------------------- */ From patchwork Wed Sep 27 07:27:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13400254 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 1DD15E810A1 for ; Wed, 27 Sep 2023 07:49:43 +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=Zxn57CyQtbKiwMOm/H9mbP1DsKPbjuBA3JoQ0OFeeqw=; b=zkATmZj7s9PEus 6GM7wiIqmkLBwOCaMX4Riwj/31meNS5DvgZNfipkgGLzDpyCDtpGY0wY//5iczDMeQREm1AE10yTW QK6vcwZbfqUpKbcCbBVOVK9zNWLBjKdvv1dCFAXnw7k4fsc2DOG+ACVmGgHgC35eE0iHAEvHUaWuC Fr64/9WerNvMWT4bJKkYO9+jTON7WmquOQgMDGiRYn9JZuv0lkIkdRv98NxNYVLX9RTMlmIYmCoU9 6LGruxIqwp2K4vHaGkaF4E/79Bj+Cn/UeDImHmbvu3CzUwLhw2dzmd02Hy5qXdq0o0QrzhRTnC9W4 8tS1khfi+Iw7+VJVUzPQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qlPIM-000Esw-22; Wed, 27 Sep 2023 07:49:18 +0000 Received: from smtp-out1.suse.de ([195.135.220.28]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qlPGg-000Dg3-1s for linux-arm-kernel@lists.infradead.org; Wed, 27 Sep 2023 07:47:38 +0000 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 3C26B218B1; Wed, 27 Sep 2023 07:47:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1695800852; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=BRFAVOlxEDTWE4cFk6yDyMet8ZuI75U/NWf6hM4D+dw=; b=LhjAdKlItp4CiEsM1w5ztyJTWnSOAttWPtR9KIdAeJ7ZBb/U5ZI8GGFX0u+ntv8TxfizSB DJQYgdS/O4EIiaqycv4M7UtbzCxOq2ome62DGu7jxYx54RHW1QO6Wz4ShLuPJbdpXN8p3o mXa6n+CDD+NKQagJ87eeK9cJaK+AXMI= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1695800852; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=BRFAVOlxEDTWE4cFk6yDyMet8ZuI75U/NWf6hM4D+dw=; b=8WcLRtRe/gOrd5T87UnVNKvWnzxpIsqANcxvngmbugQZtVz05tBM52TS76H7SsEjXcmFkb jCYRjWMqtbdsYeDg== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id EF49613A74; Wed, 27 Sep 2023 07:47:31 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id mAuRORPeE2XvUQAAMHmgww (envelope-from ); Wed, 27 Sep 2023 07:47:31 +0000 From: Thomas Zimmermann To: deller@gmx.de, javierm@redhat.com, sam@ravnborg.org, arnd@arndb.de, daniel@ffwll.ch Cc: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-nvidia@lists.surfsouth.com, linux-omap@vger.kernel.org, linux-parisc@vger.kernel.org, Thomas Zimmermann Subject: [PATCH 28/46] fbdev/pvr2fb: Initialize fb_ops to fbdev I/O-memory helpers Date: Wed, 27 Sep 2023 09:27:01 +0200 Message-ID: <20230927074722.6197-29-tzimmermann@suse.de> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20230927074722.6197-1-tzimmermann@suse.de> References: <20230927074722.6197-1-tzimmermann@suse.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230927_004734_756920_0C25B295 X-CRM114-Status: GOOD ( 13.11 ) 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 Initialize the instance of struct fb_ops with fbdev initializer macros for framebuffers in I/O address space. Set the read/write, draw and mmap callbacks to the correct implementation and avoid implicit defaults. Also select the necessary I/O helpers in Kconfig. Fbdev drivers sometimes rely on the callbacks being NULL for a default implementation to be invoked; hence requiring the I/O helpers to be built in any case. Setting all callbacks in all drivers explicitly will allow to make the I/O helpers optional. This benefits systems that do not use these functions. No functional changes. Signed-off-by: Thomas Zimmermann --- drivers/video/fbdev/Kconfig | 1 + drivers/video/fbdev/pvr2fb.c | 14 ++++++++------ 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig index afc1cf05a30f8..4d20c4523b83a 100644 --- a/drivers/video/fbdev/Kconfig +++ b/drivers/video/fbdev/Kconfig @@ -634,6 +634,7 @@ config FB_PVR2 select FB_CFB_FILLRECT select FB_CFB_COPYAREA select FB_CFB_IMAGEBLIT + select FB_IOMEM_FOPS select VIDEO_NOMODESET help Say Y here if you have a PowerVR 2 card in your box. If you plan to diff --git a/drivers/video/fbdev/pvr2fb.c b/drivers/video/fbdev/pvr2fb.c index 6307364e4a49c..cbdb1caf61bd5 100644 --- a/drivers/video/fbdev/pvr2fb.c +++ b/drivers/video/fbdev/pvr2fb.c @@ -725,16 +725,18 @@ static ssize_t pvr2fb_write(struct fb_info *info, const char *buf, static const struct fb_ops pvr2fb_ops = { .owner = THIS_MODULE, +#ifdef CONFIG_PVR2_DMA + .fb_read = fb_io_read, + .fb_write = pvr2fb_write, +#else + __FB_DEFAULT_IOMEM_OPS_RDWR, +#endif .fb_setcolreg = pvr2fb_setcolreg, .fb_blank = pvr2fb_blank, + __FB_DEFAULT_IOMEM_OPS_DRAW, .fb_check_var = pvr2fb_check_var, .fb_set_par = pvr2fb_set_par, -#ifdef CONFIG_PVR2_DMA - .fb_write = pvr2fb_write, -#endif - .fb_fillrect = cfb_fillrect, - .fb_copyarea = cfb_copyarea, - .fb_imageblit = cfb_imageblit, + __FB_DEFAULT_IOMEM_OPS_MMAP, }; #ifndef MODULE From patchwork Wed Sep 27 07:27:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13400281 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 2E3D7E810A2 for ; Wed, 27 Sep 2023 07:50:12 +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=W97QpalCT/0L49RBcm/LKivZdtHuKzPJegga22w9Vmg=; b=4rU5bKRg99FlxO Y/8ya+BcsiYoxY1N+M02zqIxwt9U7c+dTUJD5rhOFSOv9/ri8SYba8ch4DZPe4y2lphXYIXHjFKLe sGUJVc1U6Q8dzPiGTC+wOr/IenDfW+r6QdzSMTLH7xWCBwPo9ZgKT0q59WjHiiYlTu1VR3/Gm+tzM Tz+3LWQpSiJcT2vfsfeUcB5UTjgpJ+GyDPWqXnMR5KDV0XArxFmHZMzUe35VAKRIAOvsvmgCa1M+0 vWDj/fsq8BAdz9wnB2+QDg9hVVJDOjX0/VHtx2aMTqJ3IUKRCh7/qcX+h8i1pHI8lvAOitoww/T+g 0vXB6aD+ekhbICXhnj8w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qlPIb-000F7w-2Y; Wed, 27 Sep 2023 07:49:33 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qlPGv-000Dv9-0l for linux-arm-kernel@bombadil.infradead.org; Wed, 27 Sep 2023 07:47:49 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Content-Transfer-Encoding:MIME-Version :References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=D6JSbltDjLPXQ2eNL88Xc2Dct+dyPq+VIIl/ONh2FGQ=; b=qNr6L13xFB6AsmOLtPXcTLWFtL icRUaPxxZKdkbhNdAs6Z6BZAm/3pLYl7QI3NI8uu166XfPo+dlS1VDArn2FZYMYanmc5FfrT/bWWa MEUdO3f9tdANbnLplJB9LU3F82BUwWCINReqIU+YO+Owff2CPwAM+y4Zx6mSLkOvuUeA950Vornb9 ifpCLS67AixuC37NtxzHpCS175Vi8FeZtx3y/W5UzynDsnF0B29djPPvUg8Pz+sGr3pNdxQtLdZuX ZJdm1tfFRX5PkhLu+mUuyKTHrMNyGOAHgx+fNgAo8YznzbhPEm94bgDfDGDkc0mGKJMgbGBXL2yrp /F/QIHtw==; Received: from smtp-out1.suse.de ([195.135.220.28]) by desiato.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qlPGm-003hWi-0P for linux-arm-kernel@lists.infradead.org; Wed, 27 Sep 2023 07:47:47 +0000 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 7E2E8218B5; Wed, 27 Sep 2023 07:47:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1695800852; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=D6JSbltDjLPXQ2eNL88Xc2Dct+dyPq+VIIl/ONh2FGQ=; b=WYRYi4I41xR/RR3vWJSIMno+BLCFcG8OpaeIV6qnubqy7/VjexcJKEmHJuKscwNYzM8taa 0ojLXDng2XQeawEvlr5+s71356IWcwJ/QUklOKhEZnpCp55KuXIhKkil3ndI0fvgciWa+E i77wJQ6MVa5Gou7UvAfLLzwGhoF2Eog= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1695800852; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=D6JSbltDjLPXQ2eNL88Xc2Dct+dyPq+VIIl/ONh2FGQ=; b=/FFLOgG/I2XCbE0YJxl6a/j7aWKAjJN9/k/CcVgEr9fVwhUIH4tjXucfcHb1gELN51vT6c mE04VZsX6lM4iIAA== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 4003A1338F; Wed, 27 Sep 2023 07:47:32 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id aCSrDhTeE2XvUQAAMHmgww (envelope-from ); Wed, 27 Sep 2023 07:47:32 +0000 From: Thomas Zimmermann To: deller@gmx.de, javierm@redhat.com, sam@ravnborg.org, arnd@arndb.de, daniel@ffwll.ch Cc: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-nvidia@lists.surfsouth.com, linux-omap@vger.kernel.org, linux-parisc@vger.kernel.org, Thomas Zimmermann , Benjamin Herrenschmidt Subject: [PATCH 29/46] fbdev/radeon: Initialize fb_ops to fbdev I/O-memory helpers Date: Wed, 27 Sep 2023 09:27:02 +0200 Message-ID: <20230927074722.6197-30-tzimmermann@suse.de> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20230927074722.6197-1-tzimmermann@suse.de> References: <20230927074722.6197-1-tzimmermann@suse.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230927_084743_860151_0F88A9C0 X-CRM114-Status: GOOD ( 13.36 ) 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 Initialize the instance of struct fb_ops with fbdev initializer macros for framebuffers in I/O address space. Set the read/write, draw and mmap callbacks to the correct implementation and avoid implicit defaults. Also select the necessary I/O helpers in Kconfig. Fbdev drivers sometimes rely on the callbacks being NULL for a default implementation to be invoked; hence requiring the I/O helpers to be built in any case. Setting all callbacks in all drivers explicitly will allow to make the I/O helpers optional. This benefits systems that do not use these functions. No functional changes. Signed-off-by: Thomas Zimmermann Cc: Benjamin Herrenschmidt --- drivers/video/fbdev/Kconfig | 3 ++- drivers/video/fbdev/aty/radeon_base.c | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig index 4d20c4523b83a..74c623f2751dd 100644 --- a/drivers/video/fbdev/Kconfig +++ b/drivers/video/fbdev/Kconfig @@ -1025,11 +1025,12 @@ config FB_RADEON tristate "ATI Radeon display support" depends on FB && PCI select FB_BACKLIGHT if FB_RADEON_BACKLIGHT - select FB_MODE_HELPERS select FB_CFB_FILLRECT select FB_CFB_COPYAREA select FB_CFB_IMAGEBLIT + select FB_IOMEM_FOPS select FB_MACMODES if PPC + select FB_MODE_HELPERS select VIDEO_NOMODESET help Choose this option if you want to use an ATI Radeon graphics card as diff --git a/drivers/video/fbdev/aty/radeon_base.c b/drivers/video/fbdev/aty/radeon_base.c index 93fd1773402c5..36bfb6deb8abd 100644 --- a/drivers/video/fbdev/aty/radeon_base.c +++ b/drivers/video/fbdev/aty/radeon_base.c @@ -1952,6 +1952,7 @@ static int radeonfb_set_par(struct fb_info *info) static const struct fb_ops radeonfb_ops = { .owner = THIS_MODULE, + __FB_DEFAULT_IOMEM_OPS_RDWR, .fb_check_var = radeonfb_check_var, .fb_set_par = radeonfb_set_par, .fb_setcolreg = radeonfb_setcolreg, @@ -1963,6 +1964,7 @@ static const struct fb_ops radeonfb_ops = { .fb_fillrect = radeonfb_fillrect, .fb_copyarea = radeonfb_copyarea, .fb_imageblit = radeonfb_imageblit, + __FB_DEFAULT_IOMEM_OPS_MMAP, }; From patchwork Wed Sep 27 07:27:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13400277 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 C57E1E810A5 for ; Wed, 27 Sep 2023 07:50:02 +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=NbAVBKjjn4PsY80sqBDL0pQa+g/Abi9YOoMK0ERI410=; b=hafQqOz6Vi2Y+S Nf/8euEq8NSAUSw7V5YK4jh4uCODgGrix1OSrts/CZqV49sPq/tg3q2ws2mxAfSgh9aqlHPzNBqOy zPfhzUkDkRZEnhq1+8Nl4hXphcOzjo4fSyBWR7Q0HeePqkcxvoH9OhO9xn2OmoUtzlGLyMuLRkIeC YlsDO1HcbnlC4cN7xBeXGiRRcuB2FjSDiyB6GoZbJrL6AEOBLy3ubXjSEpOjK6lK5BUIBt/agXD2v j3cpvPTCvOg3RlZ/HhMsm2UyBzBHc7YgdSmr+uIlZ9r7+DRDxbTgs+ad9D6x8IrzXk4kZ4Rzdoebp jBQm63bLpP2Yom8eSKcQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qlPIZ-000F5B-2I; Wed, 27 Sep 2023 07:49:31 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qlPGu-000Du0-0o for linux-arm-kernel@bombadil.infradead.org; Wed, 27 Sep 2023 07:47:48 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Content-Transfer-Encoding:MIME-Version :References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=gmY1c7SoYqtK+Uh5/zRB4dnk1XiTcLqaWPZZDIvZlCQ=; b=nIKk5yHCZuaGqCKpOJnliZyMY4 u1cmo32emgqDnuKZyKzOFW+tMPwiWM6cY/lfWt8WmojmSP4otuT4SJXYi34axKlTDKl1/slBQncVu gkejlif71SYISzYHYkaTKZWY2YJk87MGZ0f3QeGmiIT2yyd6TUYVdn0v8o8uu/X39gYiXCZF3Ka1H 5IsAUf52K9uJjS/f4+2fproPQ4LiRv2+I4xWc2c7fZ64y9aY1DXjdqJTSbE97z1iSFQx4BfeS7MIr qS17ftwpXMYebQCsNLPAHfj4Ry894CSIL3Qgs8u8vsyIrjyXDp6yIG98MbW0C8hKhjtJTwafAD20E GHMTGjjA==; Received: from smtp-out1.suse.de ([195.135.220.28]) by desiato.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qlPGj-003hWj-21 for linux-arm-kernel@lists.infradead.org; Wed, 27 Sep 2023 07:47:45 +0000 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id C0314218BB; Wed, 27 Sep 2023 07:47:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1695800852; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=gmY1c7SoYqtK+Uh5/zRB4dnk1XiTcLqaWPZZDIvZlCQ=; b=rt7d96ECl4RsWBfhM1OEsMcP/JjDOE86RjH19TqbqbcCFVnj+73WB87B7uO0qWoNQmCCeA LjK8g36HhbFXcO611q+KRReR3wvJppKst040a8jiSPYAxwNnp/KLTzpujnezsBgIrr3Ypu ZEePaDdUWpWqB7T2HqJuJ0YdNZHAr68= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1695800852; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=gmY1c7SoYqtK+Uh5/zRB4dnk1XiTcLqaWPZZDIvZlCQ=; b=ezoX3OxiajMUJYB07UxPMRq4WO4SoxRUAKwkb4fByjUsHWfXW0dY0IhNZZwhPDw8amPVCZ VtoTmGpOoqRqamAw== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 827C013A74; Wed, 27 Sep 2023 07:47:32 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id gPT4HhTeE2XvUQAAMHmgww (envelope-from ); Wed, 27 Sep 2023 07:47:32 +0000 From: Thomas Zimmermann To: deller@gmx.de, javierm@redhat.com, sam@ravnborg.org, arnd@arndb.de, daniel@ffwll.ch Cc: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-nvidia@lists.surfsouth.com, linux-omap@vger.kernel.org, linux-parisc@vger.kernel.org, Thomas Zimmermann , Antonino Daplas Subject: [PATCH 30/46] fbdev/rivafb: Initialize fb_ops to fbdev I/O-memory helpers Date: Wed, 27 Sep 2023 09:27:03 +0200 Message-ID: <20230927074722.6197-31-tzimmermann@suse.de> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20230927074722.6197-1-tzimmermann@suse.de> References: <20230927074722.6197-1-tzimmermann@suse.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230927_084743_079951_F52F990D X-CRM114-Status: GOOD ( 12.71 ) 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 Initialize the instance of struct fb_ops with fbdev initializer macros for framebuffers in I/O address space. Set the read/write, draw and mmap callbacks to the correct implementation and avoid implicit defaults. Also select the necessary I/O helpers in Kconfig. Fbdev drivers sometimes rely on the callbacks being NULL for a default implementation to be invoked; hence requiring the I/O helpers to be built in any case. Setting all callbacks in all drivers explicitly will allow to make the I/O helpers optional. This benefits systems that do not use these functions. No functional changes. Signed-off-by: Thomas Zimmermann Cc: Antonino Daplas --- drivers/video/fbdev/Kconfig | 3 ++- drivers/video/fbdev/riva/fbdev.c | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig index 74c623f2751dd..64131e2b11bd5 100644 --- a/drivers/video/fbdev/Kconfig +++ b/drivers/video/fbdev/Kconfig @@ -739,10 +739,11 @@ config FB_RIVA tristate "nVidia Riva support" depends on FB && PCI select FB_BACKLIGHT if FB_RIVA_BACKLIGHT - select FB_MODE_HELPERS select FB_CFB_FILLRECT select FB_CFB_COPYAREA select FB_CFB_IMAGEBLIT + select FB_IOMEM_FOPS + select FB_MODE_HELPERS select BITREVERSE select VGASTATE select VIDEO_NOMODESET diff --git a/drivers/video/fbdev/riva/fbdev.c b/drivers/video/fbdev/riva/fbdev.c index 99576ba3ce6ec..237db738af13e 100644 --- a/drivers/video/fbdev/riva/fbdev.c +++ b/drivers/video/fbdev/riva/fbdev.c @@ -1670,6 +1670,7 @@ static const struct fb_ops riva_fb_ops = { .owner = THIS_MODULE, .fb_open = rivafb_open, .fb_release = rivafb_release, + __FB_DEFAULT_IOMEM_OPS_RDWR, .fb_check_var = rivafb_check_var, .fb_set_par = rivafb_set_par, .fb_setcolreg = rivafb_setcolreg, @@ -1680,6 +1681,7 @@ static const struct fb_ops riva_fb_ops = { .fb_imageblit = rivafb_imageblit, .fb_cursor = rivafb_cursor, .fb_sync = rivafb_sync, + __FB_DEFAULT_IOMEM_OPS_MMAP, }; static int riva_set_fbinfo(struct fb_info *info) From patchwork Wed Sep 27 07:27:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13400284 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 364EEE810A1 for ; Wed, 27 Sep 2023 07:50:32 +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=479A/QGw3GuoFTd8/04nF/Qw+JlOfkqij10DFK9ooAE=; b=5CiPBLIgRKoIgw DipO0QztYO4/B/MTabX/eZgpk6SXhBtGDA+qZIg9Txcha4vfyHZ+7pdjX5Xuhum+y9ph24IiSwwcY /uysA6OfYbMOw37ZgEvmPREWM0Uv9rRbD8l4mBXSVyMxy8J0GMO1uab128sNrr6bzjNzNYGiR2DZl 5zNIGbGQdSxasCBtXWPNeWSgLff1Qk60yQhTZ0MM+z8PTWYd4xyr+o8O3lJfvFS6OtGFQ3Ghaow66 sJS+WfcnoJzTlnHwIkBntnSVOTTfd6VSCo2NRWRCZjNLh3aeeFn4lil8jT3fPSTF0EPsYCUcTMGpM HxNBiwVyJmAHBcbSxXyg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qlPIy-000FcL-2J; Wed, 27 Sep 2023 07:49:56 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qlPHJ-000EEt-1P for linux-arm-kernel@bombadil.infradead.org; Wed, 27 Sep 2023 07:48:13 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Content-Transfer-Encoding:MIME-Version :References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=GaxMUTxJx9REMKwDO9x/6XTWgzZI2rs0OcKvhJZVHQ8=; b=Lhe7ez8BLB21DM5jteiy1aI+o7 OlkiY9u9xFBRfwf64Uy1xO8N4sRfHfXENdlFvMH7fP1/g0Bmm8leaB0xCuuPvjmVuIzgwVV3SxTA6 o1s0TljlvvYhRNxUk/pMCXSOWOICs6hay8eaeT2u4/ej5Oh0glHBFuVX9AtqGRA70CFHg3dmEnF/b 8voRLV4mlEAj9c+pQf0TsLitfFL3nEwO6oamx20tke+vreAkHjYxjebTGi/eH2u8P22XTjtZFDsHV 6p5upiDOcrYaS1pR3Q3deyZXKI/jIAdLwhrEV0p6YUL5JX7zCbTKTJaZKEk9ZxFyu2qVqjBD5lSSZ V46p6nTg==; Received: from smtp-out1.suse.de ([195.135.220.28]) by desiato.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qlPGk-003hWk-2z for linux-arm-kernel@lists.infradead.org; Wed, 27 Sep 2023 07:48:11 +0000 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 0A698218CE; Wed, 27 Sep 2023 07:47:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1695800853; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=GaxMUTxJx9REMKwDO9x/6XTWgzZI2rs0OcKvhJZVHQ8=; b=Ds07cppu9esS5bqr4WlvqywT/Nn6DVNuKAa9OXwxQIUS155b2t7OnJi42gxJP2JXHC6ykG N2w0AQ1wfYbzbmuDaxfAWa8HFIxbXKyYlkxsdqtUj0SlCnoXDS9UeuBapt/gD+qOKoamLa DQbP0DJbX9pLGDjp0sgBvbsu0ris44A= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1695800853; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=GaxMUTxJx9REMKwDO9x/6XTWgzZI2rs0OcKvhJZVHQ8=; b=S6vECYBQdIhDxJVnevb0+OLehSOeXE1NGQAQzOxVBu1wJB+cVBHOZOv4lH0AlRpJPUxIJc VUyjP5ZPDmMjIZCQ== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id C41071338F; Wed, 27 Sep 2023 07:47:32 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id WMUXLxTeE2XvUQAAMHmgww (envelope-from ); Wed, 27 Sep 2023 07:47:32 +0000 From: Thomas Zimmermann To: deller@gmx.de, javierm@redhat.com, sam@ravnborg.org, arnd@arndb.de, daniel@ffwll.ch Cc: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-nvidia@lists.surfsouth.com, linux-omap@vger.kernel.org, linux-parisc@vger.kernel.org, Thomas Zimmermann , Kristoffer Ericson Subject: [PATCH 31/46] fbdev/s1d13xxxfb: Initialize fb_ops to fbdev I/O-memory helpers Date: Wed, 27 Sep 2023 09:27:04 +0200 Message-ID: <20230927074722.6197-32-tzimmermann@suse.de> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20230927074722.6197-1-tzimmermann@suse.de> References: <20230927074722.6197-1-tzimmermann@suse.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230927_084744_711607_1B437E44 X-CRM114-Status: GOOD ( 14.95 ) 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 Initialize the instance of struct fb_ops with fbdev initializer macros for framebuffers in I/O address space. Set the read/write, draw and mmap callbacks to the correct implementation and avoid implicit defaults. Also select the necessary I/O helpers in Kconfig. Fbdev drivers sometimes rely on the callbacks being NULL for a default implementation to be invoked; hence requiring the I/O helpers to be built in any case. Setting all callbacks in all drivers explicitly will allow to make the I/O helpers optional. This benefits systems that do not use these functions. To simplify the conversion, provide a dedicated fb_ops instance for accelerated devices. No functional changes. Signed-off-by: Thomas Zimmermann Cc: Kristoffer Ericson --- drivers/video/fbdev/Kconfig | 1 + drivers/video/fbdev/s1d13xxxfb.c | 25 ++++++++++++++++--------- 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig index 64131e2b11bd5..fdac5f9177068 100644 --- a/drivers/video/fbdev/Kconfig +++ b/drivers/video/fbdev/Kconfig @@ -671,6 +671,7 @@ config FB_S1D13XXX select FB_CFB_FILLRECT select FB_CFB_COPYAREA select FB_CFB_IMAGEBLIT + select FB_IOMEM_FOPS help Support for S1D13XXX framebuffer device family (currently only working with S1D13806). Product specs at diff --git a/drivers/video/fbdev/s1d13xxxfb.c b/drivers/video/fbdev/s1d13xxxfb.c index c7d221cce06d7..0e871197c6de6 100644 --- a/drivers/video/fbdev/s1d13xxxfb.c +++ b/drivers/video/fbdev/s1d13xxxfb.c @@ -596,18 +596,26 @@ s1d13xxxfb_bitblt_solidfill(struct fb_info *info, const struct fb_fillrect *rect } /* framebuffer information structures */ -static struct fb_ops s1d13xxxfb_fbops = { +static const struct fb_ops s1d13xxxfb_fbops = { .owner = THIS_MODULE, + FB_DEFAULT_IOMEM_OPS, .fb_set_par = s1d13xxxfb_set_par, .fb_setcolreg = s1d13xxxfb_setcolreg, .fb_blank = s1d13xxxfb_blank, - .fb_pan_display = s1d13xxxfb_pan_display, +}; - /* gets replaced at chip detection time */ - .fb_fillrect = cfb_fillrect, - .fb_copyarea = cfb_copyarea, +static const struct fb_ops s1d13xxxfb_fbops_s1d13506 = { + .owner = THIS_MODULE, + __FB_DEFAULT_IOMEM_OPS_RDWR, + .fb_set_par = s1d13xxxfb_set_par, + .fb_setcolreg = s1d13xxxfb_setcolreg, + .fb_blank = s1d13xxxfb_blank, + .fb_pan_display = s1d13xxxfb_pan_display, + .fb_fillrect = s1d13xxxfb_bitblt_solidfill, + .fb_copyarea = s1d13xxxfb_bitblt_copyarea, .fb_imageblit = cfb_imageblit, + __FB_DEFAULT_IOMEM_OPS_MMAP, }; static int s1d13xxxfb_width_tab[2][4] = { @@ -869,17 +877,16 @@ static int s1d13xxxfb_probe(struct platform_device *pdev) default_par->regs, info->fix.smem_len / 1024, info->screen_base); info->par = default_par; - info->flags = FBINFO_HWACCEL_YPAN; - info->fbops = &s1d13xxxfb_fbops; switch(prod_id) { case S1D13506_PROD_ID: /* activate acceleration */ - s1d13xxxfb_fbops.fb_fillrect = s1d13xxxfb_bitblt_solidfill; - s1d13xxxfb_fbops.fb_copyarea = s1d13xxxfb_bitblt_copyarea; info->flags = FBINFO_HWACCEL_YPAN | FBINFO_HWACCEL_FILLRECT | FBINFO_HWACCEL_COPYAREA; + info->fbops = &s1d13xxxfb_fbops_s1d13506; break; default: + info->flags = FBINFO_HWACCEL_YPAN; + info->fbops = &s1d13xxxfb_fbops; break; } From patchwork Wed Sep 27 07:27:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13400272 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 38C3AE810A4 for ; Wed, 27 Sep 2023 07:49:58 +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=D0E0XeaM2ZryXJ2083vaFQPunVvEGF7AcWfVFEjBQMo=; b=WJVvPaZoS5mInq BY4orHSdDVvlXbO9Iedw6QyyrT6d6UPdtAlLAOInEjOIyS/K96rRfF48vHOjserA/HhP4DqmzL6CP Ds0eMk3TndEvSDG1XWCl5xKYakhNRM62W7Sy+RIsiJmgSxwJtweu5wA7SSRSc1z+/s/FU4MwlDmJI K6wyj567g+7wHzHcqdbwoYApPOWpaBg2FNjXfs10w3APtupDGHwPFnVbUZzwrEj2XdFW8RtqQ/+ZD XJ7UhFTLxRop+6EcDODIuaFxUv/BoWgOZ2MBg8lpQ1icwUHKrGLBKze06IORRNhs1k+YZfNwY8G8l haCP7tkCpfRaNPvhckLQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qlPIa-000F6R-29; Wed, 27 Sep 2023 07:49:32 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qlPGu-000Du5-0z for linux-arm-kernel@bombadil.infradead.org; Wed, 27 Sep 2023 07:47:48 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Content-Transfer-Encoding:MIME-Version :References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=wuCraVmb6fetKXIYlDd7pz0mIJwNSjp06/CRFvKh5iw=; b=bNG+0XSu5GsAkc12gGj59Lpk7p CD6NzmQF/cVNHc4rhtbRCaJ2zvOIbFZwPW2NSWy86EJsk4q5QKZx5RKPT1IOYjnWahsBLIzPPT4eH KdqvHuM5uQUWaWPqc2DI75qwA7VveMiTRPQS0wyAEvvwJ3mWmWsrYcFUAiu0warjAi3iIGk1FEmoO +1A5FWQ1Yl+hEpAmSFxwPhJHz30Sw1oguwKpwzSKoWTZk7yfjno09dQgBb3mvSP1RdBxPWJCNCeXI Juhc5jnb6vRF1+dxmcc88LPpix6LISRtmVztp/XBYm/kit3uI6kUirZjNwIEVnhxx4IlPZ7sRW9Rf utbKxKbw==; Received: from smtp-out1.suse.de ([195.135.220.28]) by desiato.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qlPGj-003hWl-1l for linux-arm-kernel@lists.infradead.org; Wed, 27 Sep 2023 07:47:45 +0000 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 4FC72218D6; Wed, 27 Sep 2023 07:47:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1695800853; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=wuCraVmb6fetKXIYlDd7pz0mIJwNSjp06/CRFvKh5iw=; b=DwU+R5hYc/bkSUg3X+LU3Q9i7K39DKOaMjMb3EcuId/r/07//jJXrMlfgOO454M5G3cOVq hdhMBSNgk9OZQCUpshzxidEJ5jF2wL9R5/5VvSOUKtiVtfjEIYA0OgVLMvRhEWd/K9+u8N rmGVvFQpIfmr7c6/SoY8Amdkf/VNzp4= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1695800853; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=wuCraVmb6fetKXIYlDd7pz0mIJwNSjp06/CRFvKh5iw=; b=o/NVxe9i6je2GuPDOCtQ0lA7ttxOd3o4Lsvgu1ailr4HnjHhmfNTN2xovtuK6gufO0L3q2 fCMnel5FRe4Zi8Cg== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 1012A1338F; Wed, 27 Sep 2023 07:47:33 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 2NbuAhXeE2XvUQAAMHmgww (envelope-from ); Wed, 27 Sep 2023 07:47:33 +0000 From: Thomas Zimmermann To: deller@gmx.de, javierm@redhat.com, sam@ravnborg.org, arnd@arndb.de, daniel@ffwll.ch Cc: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-nvidia@lists.surfsouth.com, linux-omap@vger.kernel.org, linux-parisc@vger.kernel.org, Thomas Zimmermann Subject: [PATCH 32/46] fbdev/s3fb: Initialize fb_ops to fbdev I/O-memory helpers Date: Wed, 27 Sep 2023 09:27:05 +0200 Message-ID: <20230927074722.6197-33-tzimmermann@suse.de> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20230927074722.6197-1-tzimmermann@suse.de> References: <20230927074722.6197-1-tzimmermann@suse.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230927_084743_814629_9FF7D749 X-CRM114-Status: GOOD ( 11.74 ) 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 Initialize the instance of struct fb_ops with fbdev initializer macros for framebuffers in I/O address space. Set the read/write, draw and mmap callbacks to the correct implementation and avoid implicit defaults. Also select the necessary I/O helpers in Kconfig. Fbdev drivers sometimes rely on the callbacks being NULL for a default implementation to be invoked; hence requiring the I/O helpers to be built in any case. Setting all callbacks in all drivers explicitly will allow to make the I/O helpers optional. This benefits systems that do not use these functions. No functional changes. Signed-off-by: Thomas Zimmermann --- drivers/video/fbdev/Kconfig | 1 + drivers/video/fbdev/s3fb.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig index fdac5f9177068..4f9dab566c28c 100644 --- a/drivers/video/fbdev/Kconfig +++ b/drivers/video/fbdev/Kconfig @@ -1145,6 +1145,7 @@ config FB_S3 select FB_CFB_FILLRECT select FB_CFB_COPYAREA select FB_CFB_IMAGEBLIT + select FB_IOMEM_FOPS select FB_TILEBLITTING select FB_SVGALIB select VGASTATE diff --git a/drivers/video/fbdev/s3fb.c b/drivers/video/fbdev/s3fb.c index 7d257489edcc2..589b349cb63e0 100644 --- a/drivers/video/fbdev/s3fb.c +++ b/drivers/video/fbdev/s3fb.c @@ -1047,6 +1047,7 @@ static const struct fb_ops s3fb_ops = { .owner = THIS_MODULE, .fb_open = s3fb_open, .fb_release = s3fb_release, + __FB_DEFAULT_IOMEM_OPS_RDWR, .fb_check_var = s3fb_check_var, .fb_set_par = s3fb_set_par, .fb_setcolreg = s3fb_setcolreg, @@ -1055,6 +1056,7 @@ static const struct fb_ops s3fb_ops = { .fb_fillrect = s3fb_fillrect, .fb_copyarea = cfb_copyarea, .fb_imageblit = s3fb_imageblit, + __FB_DEFAULT_IOMEM_OPS_MMAP, .fb_get_caps = svga_get_caps, }; From patchwork Wed Sep 27 07:27:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13400259 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 B1AD9E810A4 for ; Wed, 27 Sep 2023 07:49:47 +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=2c+INePPSQ78BDKbx8eQ/DnThN1yw3Dn4eB5QVDO4WA=; b=L52Rs82E8ggf2k LufDM4RByDqFHZokH+K5wob9d8E//4vRB8+jPNMHa6vpR9wuqqKwa3fSk4J4VIocWpGagGyy/zgAB rSBW197oDYyVsrUrH2e0z3sEp387zt/lkTCu1i9GtD5FucnPLKIUVrQuex0RzMrg0IZoqDpBhyVMp AxjK2I0Z0RZzj82tXA7Q8tJg4Gc4IdZEVJMs3uPBqYJhjj/wQydhHDABIkUa7g721IMY81Tq0iwWY mJtl/dZDN84ntVG/988sOPyC30T7EXihE3NeTri6ZvlPzAyaZTkrsBcmoRxc+HwucdXpCLJxYFYr3 jDugeI9uw7z/dKkW17Rw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qlPIR-000EwW-2N; Wed, 27 Sep 2023 07:49:23 +0000 Received: from smtp-out2.suse.de ([2001:67c:2178:6::1d]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qlPGg-000Dg8-2X for linux-arm-kernel@lists.infradead.org; Wed, 27 Sep 2023 07:47:40 +0000 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 8BEC41F8B4; Wed, 27 Sep 2023 07:47:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1695800853; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=jvZmFQreEHzgacqRp6EHUJQFf9HvPfPJwF6jgCKniW4=; b=iyGJOYghcFxIGBUfMBEqQCXVv/qAsWUWovApVlbA6BtMHFVJHF+u1Ev+X/TvIraeEJmFRi n1C4S0Jl+eAA+KBRNutmkN50IVMH591JG8cJ8bQmMjFpTG0YQOHPMaaMGaFUzVKVq139Xo cEjsG4SNABaNX0CT5S1FTGDXWzM7b4w= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1695800853; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=jvZmFQreEHzgacqRp6EHUJQFf9HvPfPJwF6jgCKniW4=; b=7tRsFvif02hZUJMaOjGik00TTFhVZs9orPt67z/8alQ0vM6QiHiR+IRRLdjFQxlAQoPcc8 qL4RuArv3HzujBDQ== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 5385613A74; Wed, 27 Sep 2023 07:47:33 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id uHF3ExXeE2XvUQAAMHmgww (envelope-from ); Wed, 27 Sep 2023 07:47:33 +0000 From: Thomas Zimmermann To: deller@gmx.de, javierm@redhat.com, sam@ravnborg.org, arnd@arndb.de, daniel@ffwll.ch Cc: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-nvidia@lists.surfsouth.com, linux-omap@vger.kernel.org, linux-parisc@vger.kernel.org, Thomas Zimmermann Subject: [PATCH 33/46] fbdev/sa1100fb: Initialize fb_ops to fbdev I/O-memory helpers Date: Wed, 27 Sep 2023 09:27:06 +0200 Message-ID: <20230927074722.6197-34-tzimmermann@suse.de> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20230927074722.6197-1-tzimmermann@suse.de> References: <20230927074722.6197-1-tzimmermann@suse.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230927_004734_965614_2C7A195A X-CRM114-Status: GOOD ( 14.15 ) 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 Initialize the instance of struct fb_ops with fbdev initializer macros for framebuffers in I/O address space. Set the read/write, draw and mmap callbacks to the correct implementation and avoid implicit defaults. Also select the necessary I/O helpers in Kconfig. Fbdev drivers sometimes rely on the callbacks being NULL for a default implementation to be invoked; hence requiring the I/O helpers to be built in any case. Setting all callbacks in all drivers explicitly will allow to make the I/O helpers optional. This benefits systems that do not use these functions. No functional changes. Signed-off-by: Thomas Zimmermann --- drivers/video/fbdev/Kconfig | 4 +--- drivers/video/fbdev/sa1100fb.c | 5 ++--- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig index 4f9dab566c28c..061af94837f99 100644 --- a/drivers/video/fbdev/Kconfig +++ b/drivers/video/fbdev/Kconfig @@ -159,9 +159,7 @@ config FB_CLPS711X config FB_SA1100 bool "SA-1100 LCD support" depends on (FB = y) && ARM && ARCH_SA1100 - select FB_CFB_FILLRECT - select FB_CFB_COPYAREA - select FB_CFB_IMAGEBLIT + select FB_IOMEM_HELPERS help This is a framebuffer device for the SA-1100 LCD Controller. See for information on framebuffer diff --git a/drivers/video/fbdev/sa1100fb.c b/drivers/video/fbdev/sa1100fb.c index 3d76ce1114882..446b44e172e15 100644 --- a/drivers/video/fbdev/sa1100fb.c +++ b/drivers/video/fbdev/sa1100fb.c @@ -575,14 +575,13 @@ static int sa1100fb_mmap(struct fb_info *info, static const struct fb_ops sa1100fb_ops = { .owner = THIS_MODULE, + __FB_DEFAULT_IOMEM_OPS_RDWR, .fb_check_var = sa1100fb_check_var, .fb_set_par = sa1100fb_set_par, // .fb_set_cmap = sa1100fb_set_cmap, .fb_setcolreg = sa1100fb_setcolreg, - .fb_fillrect = cfb_fillrect, - .fb_copyarea = cfb_copyarea, - .fb_imageblit = cfb_imageblit, .fb_blank = sa1100fb_blank, + __FB_DEFAULT_IOMEM_OPS_DRAW, .fb_mmap = sa1100fb_mmap, }; From patchwork Wed Sep 27 07:27:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13400265 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 9858AE810A2 for ; Wed, 27 Sep 2023 07:49:53 +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=mwylSIAXLJqGkyZGIEnpVkKo0KNd02EuB8JQDiJpX7I=; b=YNnZIG3jM5mmUv ICQZfM0dJeEkB/27Xka2TEx00D5ltl7/ATOudTPIym9yvvR2888T+iAQevIfewN8olvEN0NKaeJtD EaIFnexfcw0AWE8KtQ4C7VK6VpWosvwh72VyVZqC+LOgRpT3LmktFpE0jknaLSirLlWVea2EsgMw9 71ATedkegvtqlxBnOjVB+Z84LtOy19kxd9rQoLojA8JFul5toDfH1MMnMYil4xVxJxoqHcCMZkxVP lQjmUQ3v+LqRX8A00akzsrr6qXz69CFuoCOW6CFqyQJoD4A3E0GrdgOukcKqQdO64I0O1jZrbBX1f mR3OfPMd/up2/GKRf86A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qlPIU-000EzU-1I; Wed, 27 Sep 2023 07:49:26 +0000 Received: from smtp-out2.suse.de ([2001:67c:2178:6::1d]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qlPGj-000Di5-00 for linux-arm-kernel@lists.infradead.org; Wed, 27 Sep 2023 07:47:41 +0000 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id C93A71F8B5; Wed, 27 Sep 2023 07:47:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1695800853; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=uofMW0N/SIEKfHbQAWI4b3x+nOBu0EETY7TdIDrepVE=; b=naiTM/rt06TaOoNoBGrcp253HSOkYFx32omxqrWW4ec3dhRdiXgUjxPlP5WievcdyBkIds gjzonAHd7UKRf4WVsEcyRDuFmYXS8ETkht5tqYw9/Hl32Rjn2XyZtMiZD4LRpykxcpFcat SoaMA6wBHZNNYm2JyYYjSbKhy8zeg64= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1695800853; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=uofMW0N/SIEKfHbQAWI4b3x+nOBu0EETY7TdIDrepVE=; b=r2QPGT8vYo97vafmi+GcCubtO771otKPnVFjqFPHK78avjQZfNMv2R2fTMYr2xu7GFnY0O fRcTkgFkHufFzOCA== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 8DD911338F; Wed, 27 Sep 2023 07:47:33 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id mA7iIRXeE2XvUQAAMHmgww (envelope-from ); Wed, 27 Sep 2023 07:47:33 +0000 From: Thomas Zimmermann To: deller@gmx.de, javierm@redhat.com, sam@ravnborg.org, arnd@arndb.de, daniel@ffwll.ch Cc: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-nvidia@lists.surfsouth.com, linux-omap@vger.kernel.org, linux-parisc@vger.kernel.org, Thomas Zimmermann , Antonino Daplas Subject: [PATCH 34/46] fbdev/savagefb: Initialize fb_ops to fbdev I/O-memory helpers Date: Wed, 27 Sep 2023 09:27:07 +0200 Message-ID: <20230927074722.6197-35-tzimmermann@suse.de> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20230927074722.6197-1-tzimmermann@suse.de> References: <20230927074722.6197-1-tzimmermann@suse.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230927_004737_228092_91BCD918 X-CRM114-Status: GOOD ( 12.83 ) 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 Initialize the instance of struct fb_ops with fbdev initializer macros for framebuffers in I/O address space. Set the read/write, draw and mmap callbacks to the correct implementation and avoid implicit defaults. Also select the necessary I/O helpers in Kconfig. Fbdev drivers sometimes rely on the callbacks being NULL for a default implementation to be invoked; hence requiring the I/O helpers to be built in any case. Setting all callbacks in all drivers explicitly will allow to make the I/O helpers optional. This benefits systems that do not use these functions. No functional changes. Signed-off-by: Thomas Zimmermann Cc: Antonino Daplas --- drivers/video/fbdev/Kconfig | 3 ++- drivers/video/fbdev/savage/savagefb_driver.c | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig index 061af94837f99..2d8b7fe502f74 100644 --- a/drivers/video/fbdev/Kconfig +++ b/drivers/video/fbdev/Kconfig @@ -1163,10 +1163,11 @@ config FB_S3_DDC config FB_SAVAGE tristate "S3 Savage support" depends on FB && PCI - select FB_MODE_HELPERS select FB_CFB_FILLRECT select FB_CFB_COPYAREA select FB_CFB_IMAGEBLIT + select FB_IOMEM_FOPS + select FB_MODE_HELPERS select VGASTATE select VIDEO_NOMODESET help diff --git a/drivers/video/fbdev/savage/savagefb_driver.c b/drivers/video/fbdev/savage/savagefb_driver.c index b5f84bd4804b8..dddd6afcb972a 100644 --- a/drivers/video/fbdev/savage/savagefb_driver.c +++ b/drivers/video/fbdev/savage/savagefb_driver.c @@ -1641,6 +1641,7 @@ static const struct fb_ops savagefb_ops = { .owner = THIS_MODULE, .fb_open = savagefb_open, .fb_release = savagefb_release, + __FB_DEFAULT_IOMEM_OPS_RDWR, .fb_check_var = savagefb_check_var, .fb_set_par = savagefb_set_par, .fb_setcolreg = savagefb_setcolreg, @@ -1652,10 +1653,9 @@ static const struct fb_ops savagefb_ops = { .fb_imageblit = savagefb_imageblit, .fb_sync = savagefb_sync, #else - .fb_fillrect = cfb_fillrect, - .fb_copyarea = cfb_copyarea, - .fb_imageblit = cfb_imageblit, + __FB_DEFAULT_IOMEM_OPS_DRAW, #endif + __FB_DEFAULT_IOMEM_OPS_MMAP, }; /* --------------------------------------------------------------------- */ From patchwork Wed Sep 27 07:27:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13400269 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 6335EE810A2 for ; Wed, 27 Sep 2023 07:49:56 +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=g2DQrfTi2uVsNfb9c/hY8cLQLQFhkiuxJL1mMZ9zm3A=; b=O3zd0OQiYd9CMZ xWlgvQVduizNawSR3sV4SgQTQCEbaxR1NjufCLESwik0d2p8cgHQsaN1qQCQIb1qDrmjmiwr1otPz 1mc0CcMa3aeEVeAH++Bae3z+JklWrbYlyBcgJC0rqC/dDvKc0hRabkl1EWy8SzDw0tF9mWigZpvKW aLpM90AF9AKE9hx9BNQLaM4O5NPylRW4mWpo6iK/R//gctE1CkWGmXSJdXEtpWWMnMGlp1zq7o+so W5Ok/SE4Q8p9fJvmpWRFPLpyvsk7ny/uorq2D3fX8OtKmkZ/cpIOEVopQYBVbQRBwFb4X/hy9rCKW D4E2YDP8uKQbdp8s30TQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qlPIT-000EyV-2R; Wed, 27 Sep 2023 07:49:25 +0000 Received: from smtp-out2.suse.de ([2001:67c:2178:6::1d]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qlPGi-000Di4-33 for linux-arm-kernel@lists.infradead.org; Wed, 27 Sep 2023 07:47:41 +0000 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 0F3991F8B6; Wed, 27 Sep 2023 07:47:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1695800854; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=mQkKc/h6/3tCXG4Y1Fvgfmz/5VCV3YyJLn5dHo8ZkGo=; b=MNTtqbPGrx+rg3BKlXWt4r198KBkWzXWkKouDAaPIYNKira4aTQd3l8+uMVdTx45QWWZga ov6NgpYfO28ubXPS4E9VRn9BcY16m+3A34Em9sloMcXp+naE/umvoPRWPNHRMSVBISl07I xkcboScShx7O61rfEjS8meP85p57JEM= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1695800854; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=mQkKc/h6/3tCXG4Y1Fvgfmz/5VCV3YyJLn5dHo8ZkGo=; b=CD+aDLJKzhmfqGLnXxNhwCI7RNPhJwfXNOAvjgAGIOY8qnM6K+3k6lMv4Crxrctm1pKqoU zWqQQtCrYjA29EAg== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id CC21713A74; Wed, 27 Sep 2023 07:47:33 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id sLH+MBXeE2XvUQAAMHmgww (envelope-from ); Wed, 27 Sep 2023 07:47:33 +0000 From: Thomas Zimmermann To: deller@gmx.de, javierm@redhat.com, sam@ravnborg.org, arnd@arndb.de, daniel@ffwll.ch Cc: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-nvidia@lists.surfsouth.com, linux-omap@vger.kernel.org, linux-parisc@vger.kernel.org, Thomas Zimmermann Subject: [PATCH 35/46] fbdev/sisfb: Initialize fb_ops to fbdev I/O-memory helpers Date: Wed, 27 Sep 2023 09:27:08 +0200 Message-ID: <20230927074722.6197-36-tzimmermann@suse.de> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20230927074722.6197-1-tzimmermann@suse.de> References: <20230927074722.6197-1-tzimmermann@suse.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230927_004737_161388_233BA545 X-CRM114-Status: GOOD ( 13.71 ) 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 Initialize the instance of struct fb_ops with fbdev initializer macros for framebuffers in I/O address space. Set the read/write, draw and mmap callbacks to the correct implementation and avoid implicit defaults. Also select the necessary I/O helpers in Kconfig. Fbdev drivers sometimes rely on the callbacks being NULL for a default implementation to be invoked; hence requiring the I/O helpers to be built in any case. Setting all callbacks in all drivers explicitly will allow to make the I/O helpers optional. This benefits systems that do not use these functions. No functional changes. Signed-off-by: Thomas Zimmermann --- drivers/video/fbdev/Kconfig | 3 ++- drivers/video/fbdev/sis/sis_main.c | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig index 2d8b7fe502f74..bda5ed8a40b0a 100644 --- a/drivers/video/fbdev/Kconfig +++ b/drivers/video/fbdev/Kconfig @@ -1203,10 +1203,11 @@ config FB_SAVAGE_ACCEL config FB_SIS tristate "SiS/XGI display support" depends on FB && PCI + select BOOT_VESA_SUPPORT if FB_SIS = y select FB_CFB_FILLRECT select FB_CFB_COPYAREA select FB_CFB_IMAGEBLIT - select BOOT_VESA_SUPPORT if FB_SIS = y + select FB_IOMEM_FOPS select FB_SIS_300 if !FB_SIS_315 select VIDEO_NOMODESET help diff --git a/drivers/video/fbdev/sis/sis_main.c b/drivers/video/fbdev/sis/sis_main.c index 0f5374f6ef055..6ad47b6b60046 100644 --- a/drivers/video/fbdev/sis/sis_main.c +++ b/drivers/video/fbdev/sis/sis_main.c @@ -1911,6 +1911,7 @@ static const struct fb_ops sisfb_ops = { .owner = THIS_MODULE, .fb_open = sisfb_open, .fb_release = sisfb_release, + __FB_DEFAULT_IOMEM_OPS_RDWR, .fb_check_var = sisfb_check_var, .fb_set_par = sisfb_set_par, .fb_setcolreg = sisfb_setcolreg, @@ -1923,7 +1924,8 @@ static const struct fb_ops sisfb_ops = { #ifdef SIS_NEW_CONFIG_COMPAT .fb_compat_ioctl= sisfb_ioctl, #endif - .fb_ioctl = sisfb_ioctl + .fb_ioctl = sisfb_ioctl, + __FB_DEFAULT_IOMEM_OPS_MMAP, }; /* ---------------- Chip generation dependent routines ---------------- */ From patchwork Wed Sep 27 07:27:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13400264 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 AB3CFE810A1 for ; Wed, 27 Sep 2023 07:49:52 +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=RHD2KCYqI2JxdpWOPAGQMKJOfz3xoQPZQP3i0uNLNUI=; b=DM0UCYg9GqhSXc tBRF0zNi/FiYA4hog15Hn/FI1SoDwHtt+2E4sct9dG95jqLRkANQqK9sD1OwtCrn4jDsurlcb+gSI 7z24c2DXiGo1GbCcx8+b3pK4jwSogeRlSA7ucgOFSBHxV0d+Ub6hNupu+bDGY9bJetLskKeQ1HnMK miFRJVjRIdLsuxOhwyeskqBzf7Hf5+8Xwx6ZjZehwgxxcuwbYsL03U3lRof9aD7DsA4HuGcAY8jxH zUckVnH/Ge8ctGzHFbfuPMZhfK8kFjO79IkpBRvoPI1S0QlwNplYPuyKac26PaXxnrvA6+1wwQ39J Ap4tWrLk2kJEsnjggYXg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qlPIS-000Exn-37; Wed, 27 Sep 2023 07:49:24 +0000 Received: from smtp-out1.suse.de ([195.135.220.28]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qlPGi-000Dhf-0h for linux-arm-kernel@lists.infradead.org; Wed, 27 Sep 2023 07:47:40 +0000 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 4C8B9218A8; Wed, 27 Sep 2023 07:47:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1695800854; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=vZw8Bk3hSKCOgaHlTiXgdYztz2Y+ozx4V8mRYVfUzyQ=; b=V6cRAPCZrvs4NnJRIF9JtY1Dwsk+/+oT8FAouQ/oK/k6Y4SzF3GUIOHzQE/0q68Pqf1IKZ 3yGNIWLXQipNP7g4ftCSL91GJaCdBPIDsOFDlhsshIlhQZpUYQ/dmTqEGusSSmiVbib4KJ +D7mKCdtNFDS6bl2XgYj4zp+USv05A4= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1695800854; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=vZw8Bk3hSKCOgaHlTiXgdYztz2Y+ozx4V8mRYVfUzyQ=; b=BwcIdP6iM2lElCnOubhTCV/PHOmBNSTfR5d3IJ45k8jouKvnRlf4lxPPK6Ct/Q8nlx3Fui qB0TvoKbDRKKQwDg== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 12EA31338F; Wed, 27 Sep 2023 07:47:34 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 2AK4AxbeE2XvUQAAMHmgww (envelope-from ); Wed, 27 Sep 2023 07:47:34 +0000 From: Thomas Zimmermann To: deller@gmx.de, javierm@redhat.com, sam@ravnborg.org, arnd@arndb.de, daniel@ffwll.ch Cc: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-nvidia@lists.surfsouth.com, linux-omap@vger.kernel.org, linux-parisc@vger.kernel.org, Thomas Zimmermann Subject: [PATCH 36/46] fbdev/sm501fb: Initialize fb_ops to fbdev I/O-memory helpers Date: Wed, 27 Sep 2023 09:27:09 +0200 Message-ID: <20230927074722.6197-37-tzimmermann@suse.de> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20230927074722.6197-1-tzimmermann@suse.de> References: <20230927074722.6197-1-tzimmermann@suse.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230927_004736_412223_F8D2E35A X-CRM114-Status: GOOD ( 12.30 ) 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 Initialize each instance of struct fb_ops with fbdev initializer macros for framebuffers in I/O address space. Set the read/write, draw and mmap callbacks to the correct implementation and avoid implicit defaults. Also select the necessary I/O helpers in Kconfig. Fbdev drivers sometimes rely on the callbacks being NULL for a default implementation to be invoked; hence requiring the I/O helpers to be built in any case. Setting all callbacks in all drivers explicitly will allow to make the I/O helpers optional. This benefits systems that do not use these functions. No functional changes. Signed-off-by: Thomas Zimmermann --- drivers/video/fbdev/Kconfig | 1 + drivers/video/fbdev/sm501fb.c | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig index bda5ed8a40b0a..c87eb90c04af0 100644 --- a/drivers/video/fbdev/Kconfig +++ b/drivers/video/fbdev/Kconfig @@ -1667,6 +1667,7 @@ config FB_SM501 select FB_CFB_FILLRECT select FB_CFB_COPYAREA select FB_CFB_IMAGEBLIT + select FB_IOMEM_FOPS help Frame buffer driver for the CRT and LCD controllers in the Silicon Motion SM501. diff --git a/drivers/video/fbdev/sm501fb.c b/drivers/video/fbdev/sm501fb.c index 65c799ac5604f..d6fdc1737cd24 100644 --- a/drivers/video/fbdev/sm501fb.c +++ b/drivers/video/fbdev/sm501fb.c @@ -1452,6 +1452,7 @@ static void sm501fb_fillrect(struct fb_info *info, const struct fb_fillrect *rec static struct fb_ops sm501fb_ops_crt = { .owner = THIS_MODULE, + __FB_DEFAULT_IOMEM_OPS_RDWR, .fb_check_var = sm501fb_check_var_crt, .fb_set_par = sm501fb_set_par_crt, .fb_blank = sm501fb_blank_crt, @@ -1462,10 +1463,12 @@ static struct fb_ops sm501fb_ops_crt = { .fb_copyarea = sm501fb_copyarea, .fb_imageblit = cfb_imageblit, .fb_sync = sm501fb_sync, + __FB_DEFAULT_IOMEM_OPS_MMAP, }; static struct fb_ops sm501fb_ops_pnl = { .owner = THIS_MODULE, + __FB_DEFAULT_IOMEM_OPS_RDWR, .fb_check_var = sm501fb_check_var_pnl, .fb_set_par = sm501fb_set_par_pnl, .fb_pan_display = sm501fb_pan_pnl, @@ -1476,6 +1479,7 @@ static struct fb_ops sm501fb_ops_pnl = { .fb_copyarea = sm501fb_copyarea, .fb_imageblit = cfb_imageblit, .fb_sync = sm501fb_sync, + __FB_DEFAULT_IOMEM_OPS_MMAP, }; /* sm501_init_cursor From patchwork Wed Sep 27 07:27:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13400270 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 63BD2E810A0 for ; Wed, 27 Sep 2023 07:49:57 +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=CB9vNB/3MDotKVdtg0F10aiH3iKuY5Sm10pPjz4twUE=; b=N7opqKOnxUWUMD 00o7miHziLsEsolMkkWYRtho7DC+LQaKoeeSq1MEKCXHVYpYpIQX4JuVHI5H5ne8/ZUaN9IFak1T5 Rt2dEIk/RaPynyNKiVRWKGqQQzs6YW9HNa37ycJCVOf54x1Y4Sy/Dl0yR8xVV8h+MRdZzAr9lqUay sDzRo65SBBXSzExzOzWzK8gWEXZMKUNfvI6B+gDXVHcGnZxuAEG1VRAQR/qpDCG+9Bo5v0m+AXTdo yR7qe8Jzc1VxDBuIE8QS/PzUCadqxG6lKQERkxIhbTpPhUmyMFFiYpfFjsb2COa5VeyNM6zKjgcHD 9cuBDghPMMzxI9AaFa1g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qlPIS-000Ex4-0z; Wed, 27 Sep 2023 07:49:24 +0000 Received: from smtp-out1.suse.de ([2001:67c:2178:6::1c]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qlPGi-000Dhh-1w for linux-arm-kernel@lists.infradead.org; Wed, 27 Sep 2023 07:47:40 +0000 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 92223218D9; Wed, 27 Sep 2023 07:47:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1695800854; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=p9VwvdQvOc0++JlHmSo/HA2eGbR5x4CRaxbF+bnko6o=; b=t58t+nBaXFVh88RSnj3VTHp0JCggWdKa5ARk46ohcSr8afc15exCXYyPBa2UAbi1tpzGSg a1N84rjmRtSD7pftbg4Q3rS3dF7/xZeTEAuth1kcglSQt2SHVK2N3VQI7aykna3OOOVSlX KbqQSRk5kcxtykztGd72EYdSWWdMuJY= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1695800854; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=p9VwvdQvOc0++JlHmSo/HA2eGbR5x4CRaxbF+bnko6o=; b=ZulzUbHNbeCJgt17uDK4WDcbga14Gt0egrWygl4oJBw+YhB4Mm13PH6IO/U94uZsY7+2nq Wv6DKblgSKDtgKBg== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 4ED4213A74; Wed, 27 Sep 2023 07:47:34 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 2BRbEhbeE2XvUQAAMHmgww (envelope-from ); Wed, 27 Sep 2023 07:47:34 +0000 From: Thomas Zimmermann To: deller@gmx.de, javierm@redhat.com, sam@ravnborg.org, arnd@arndb.de, daniel@ffwll.ch Cc: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-nvidia@lists.surfsouth.com, linux-omap@vger.kernel.org, linux-parisc@vger.kernel.org, Thomas Zimmermann , Sudip Mukherjee , Teddy Wang Subject: [PATCH 37/46] fbdev/sm712fb: Initialize fb_ops to fbdev I/O-memory helpers Date: Wed, 27 Sep 2023 09:27:10 +0200 Message-ID: <20230927074722.6197-38-tzimmermann@suse.de> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20230927074722.6197-1-tzimmermann@suse.de> References: <20230927074722.6197-1-tzimmermann@suse.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230927_004736_806227_50001184 X-CRM114-Status: GOOD ( 13.74 ) 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 Initialize the instance of struct fb_ops with fbdev initializer macros for framebuffers in I/O address space. Set the read/write, draw and mmap callbacks to the correct implementation and avoid implicit defaults. Also select the necessary I/O helpers in Kconfig. Fbdev drivers sometimes rely on the callbacks being NULL for a default implementation to be invoked; hence requiring the I/O helpers to be built in any case. Setting all callbacks in all drivers explicitly will allow to make the I/O helpers optional. This benefits systems that do not use these functions. No functional changes. Signed-off-by: Thomas Zimmermann Cc: Sudip Mukherjee Cc: Teddy Wang --- drivers/video/fbdev/Kconfig | 4 +--- drivers/video/fbdev/sm712fb.c | 1 + 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig index c87eb90c04af0..b018f10ad07fc 100644 --- a/drivers/video/fbdev/Kconfig +++ b/drivers/video/fbdev/Kconfig @@ -1938,9 +1938,7 @@ config FB_SSD1307 config FB_SM712 tristate "Silicon Motion SM712 framebuffer support" depends on FB && PCI - select FB_CFB_FILLRECT - select FB_CFB_COPYAREA - select FB_CFB_IMAGEBLIT + select FB_IOMEM_HELPERS select VIDEO_NOMODESET help Frame buffer driver for the Silicon Motion SM710, SM712, SM721 diff --git a/drivers/video/fbdev/sm712fb.c b/drivers/video/fbdev/sm712fb.c index db129ed3b2f7c..3f8ef50e32095 100644 --- a/drivers/video/fbdev/sm712fb.c +++ b/drivers/video/fbdev/sm712fb.c @@ -1347,6 +1347,7 @@ static int smtc_set_par(struct fb_info *info) static const struct fb_ops smtcfb_ops = { .owner = THIS_MODULE, + FB_DEFAULT_IOMEM_OPS, .fb_check_var = smtc_check_var, .fb_set_par = smtc_set_par, .fb_setcolreg = smtc_setcolreg, From patchwork Wed Sep 27 07:27:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13400273 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 2F967E810A1 for ; Wed, 27 Sep 2023 07:50:00 +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=1wORG7wTtqodGk9oEppGVHJ3sCkSjOLmDrt0r2PF+1s=; b=TmaAuDm5dHH9Qu je2908Dm9xiJ92GmdRoXUJCSR/xrmz7D+PmIQ71myIVvVGaXVo+UKnsgChV1gWSO9ZIm/QAo8DwXy ZVuNNyM5+EAwAMAGDhDsJwJ+WWAoeg57uF+JLk5wBRxLEHoefozFt/S8lkCJ9rgqE/cXL/8dcXYLi bvS3xdXO3UlFro20ZC/1Fe9TWFxjpwwdQX7ja+jZtoafnTFU5w7sT9HGVmnNuxA+j/DDoSBU2phop r1f5eStHddgZI9IwwBhypxiYtO6jab2+KMC4hQzHcMq1WlctTb9+C05+CWSYfo9q3mZjANt6M44jO pYxmhZJ0rdIXBO4ONinQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qlPIV-000F02-06; Wed, 27 Sep 2023 07:49:27 +0000 Received: from smtp-out1.suse.de ([2001:67c:2178:6::1c]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qlPGj-000Di3-00 for linux-arm-kernel@lists.infradead.org; Wed, 27 Sep 2023 07:47:42 +0000 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id D28ED218DF; Wed, 27 Sep 2023 07:47:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1695800854; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=u3eRdS85xwPQzBuwJ54dspR9cbt48tPp46vdNh1wjsk=; b=WBdRDS1btysNCgwlgznFfPl70efEpbrCr4Tcv25lls+aMwgz2+dfAZPgRKWNd8kuXiCxt5 JcLewc0AZXfg1lRNvuPhT+IFIUSgOlq4S4rhq3R7Ttd8P2QXco6mvwnNU4dyJS/7IZHN3s GBa/qat9H7Ce3fvcPDL+NkL3r9YigAg= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1695800854; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=u3eRdS85xwPQzBuwJ54dspR9cbt48tPp46vdNh1wjsk=; b=8YIepgZd82gcTVo2funY19jpuH62p5/D7vph6egOvw4iuYYt+9iaBIsueRoewIXWLPKJRm dtWXYMcypeqLTsBA== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 956401338F; Wed, 27 Sep 2023 07:47:34 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 4M+fIxbeE2XvUQAAMHmgww (envelope-from ); Wed, 27 Sep 2023 07:47:34 +0000 From: Thomas Zimmermann To: deller@gmx.de, javierm@redhat.com, sam@ravnborg.org, arnd@arndb.de, daniel@ffwll.ch Cc: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-nvidia@lists.surfsouth.com, linux-omap@vger.kernel.org, linux-parisc@vger.kernel.org, Thomas Zimmermann , "James E.J. Bottomley" Subject: [PATCH 38/46] fbdev/stifb: Initialize fb_ops to fbdev I/O-memory helpers Date: Wed, 27 Sep 2023 09:27:11 +0200 Message-ID: <20230927074722.6197-39-tzimmermann@suse.de> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20230927074722.6197-1-tzimmermann@suse.de> References: <20230927074722.6197-1-tzimmermann@suse.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230927_004737_259147_F119349A X-CRM114-Status: GOOD ( 10.92 ) 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 Initialize the instance of struct fb_ops with fbdev initializer macros for framebuffers in I/O address space. Set the read/write, draw and mmap callbacks to the correct implementation and avoid implicit defaults. Also select the necessary I/O helpers in Kconfig. Fbdev drivers sometimes rely on the callbacks being NULL for a default implementation to be invoked; hence requiring the I/O helpers to be built in any case. Setting all callbacks in all drivers explicitly will allow to make the I/O helpers optional. This benefits systems that do not use these functions. No functional changes. Signed-off-by: Thomas Zimmermann Cc: "James E.J. Bottomley" --- drivers/video/fbdev/Kconfig | 1 + drivers/video/fbdev/stifb.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig index b018f10ad07fc..a7587f680e3a2 100644 --- a/drivers/video/fbdev/Kconfig +++ b/drivers/video/fbdev/Kconfig @@ -384,6 +384,7 @@ config FB_STI select FB_CFB_FILLRECT select FB_CFB_COPYAREA select FB_CFB_IMAGEBLIT + select FB_IOMEM_FOPS select STI_CORE default y help diff --git a/drivers/video/fbdev/stifb.c b/drivers/video/fbdev/stifb.c index c746deb79afce..548d992f8cb18 100644 --- a/drivers/video/fbdev/stifb.c +++ b/drivers/video/fbdev/stifb.c @@ -1167,12 +1167,14 @@ stifb_init_display(struct stifb_info *fb) static const struct fb_ops stifb_ops = { .owner = THIS_MODULE, + __FB_DEFAULT_IOMEM_OPS_RDWR, .fb_check_var = stifb_check_var, .fb_setcolreg = stifb_setcolreg, .fb_blank = stifb_blank, .fb_fillrect = stifb_fillrect, .fb_copyarea = stifb_copyarea, .fb_imageblit = cfb_imageblit, + __FB_DEFAULT_IOMEM_OPS_MMAP, }; From patchwork Wed Sep 27 07:27:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13400266 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 1B3E8E810A3 for ; Wed, 27 Sep 2023 07:49:54 +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=2/0pZ79L2aNS2MLNtYNh64CdxhPA6S/HI+cEQNM5ixg=; b=J5UcdeI6FrMti+ T61vbnXbQzs/vk5W8tbDQQISoDkWGsnHgCMHSeDvIm781pNO8IRgtkSdUjNZtExBs7ozsEnrv7XAi oCHUQeggOXJOAGrclsf+8wNCBNJM5eD/u1D40AlCC+AgxLQscNUa2R/6Rcvq7fALlMVoPCasX+8uO FNgvQNU+bcqgwlPFIcGlYwfyl1adzum0WbK8tHZJX4MyDJgxcZsgttlOv5MVg7OlFw4CzQv9WyCke mv1ONpe0EzABiDQAeOHm2UwqYZ1P3EwylzCbzb37Y4WAxPgEi4cchsbVV4jNsDSCuR1YGAWmTVgJh ttXGXK706b6YMUT+6JAA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qlPIV-000F0m-2F; Wed, 27 Sep 2023 07:49:27 +0000 Received: from smtp-out1.suse.de ([2001:67c:2178:6::1c]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qlPGi-000Di2-3D for linux-arm-kernel@lists.infradead.org; Wed, 27 Sep 2023 07:47:42 +0000 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 197CD218E0; Wed, 27 Sep 2023 07:47:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1695800855; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=dY/gTtC8WBTH/uuqHuU7Vc/u6Lymzpn7XcCxtiCi8Is=; b=IU9/nllIJn09IbeHMAiJDgAbp3ViXUNtA6oFgbRwoTLZesxgbj32yskZBFNCla5H1Tw9YX nRiyLwyujXFH4Se0ikTwFN8DqaEeQyqIJSaCifnqagK+VvcrmjaT9WMdpBzarjhild+5jU rEHcnInQ0rTecptsinT1mVJCkqPI71U= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1695800855; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=dY/gTtC8WBTH/uuqHuU7Vc/u6Lymzpn7XcCxtiCi8Is=; b=w29YIOX7GWHwEOsAbNpgNatfJtgJNjlZO/xRaWdUjifH/xg1poBbW6c4BFwUbpHwsF5ycU BWV9RFViKv3A68AA== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id D2B4313A74; Wed, 27 Sep 2023 07:47:34 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id SAibMhbeE2XvUQAAMHmgww (envelope-from ); Wed, 27 Sep 2023 07:47:34 +0000 From: Thomas Zimmermann To: deller@gmx.de, javierm@redhat.com, sam@ravnborg.org, arnd@arndb.de, daniel@ffwll.ch Cc: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-nvidia@lists.surfsouth.com, linux-omap@vger.kernel.org, linux-parisc@vger.kernel.org, Thomas Zimmermann Subject: [PATCH 39/46] fbdev/sunxvr500: Initialize fb_ops to fbdev I/O-memory helpers Date: Wed, 27 Sep 2023 09:27:12 +0200 Message-ID: <20230927074722.6197-40-tzimmermann@suse.de> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20230927074722.6197-1-tzimmermann@suse.de> References: <20230927074722.6197-1-tzimmermann@suse.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230927_004737_253518_448F6A39 X-CRM114-Status: GOOD ( 12.12 ) 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 Initialize the instance of struct fb_ops with fbdev initializer macros for framebuffers in I/O address space. Set the read/write, draw and mmap callbacks to the correct implementation and avoid implicit defaults. Also select the necessary I/O helpers in Kconfig. Fbdev drivers sometimes rely on the callbacks being NULL for a default implementation to be invoked; hence requiring the I/O helpers to be built in any case. Setting all callbacks in all drivers explicitly will allow to make the I/O helpers optional. This benefits systems that do not use these functions. No functional changes. Signed-off-by: Thomas Zimmermann --- drivers/video/fbdev/Kconfig | 1 + drivers/video/fbdev/sunxvr500.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig index a7587f680e3a2..1da6bf1eb6ff6 100644 --- a/drivers/video/fbdev/Kconfig +++ b/drivers/video/fbdev/Kconfig @@ -596,6 +596,7 @@ config FB_XVR500 select FB_CFB_FILLRECT select FB_CFB_COPYAREA select FB_CFB_IMAGEBLIT + select FB_IOMEM_FOPS select VIDEO_NOMODESET help This is the framebuffer device for the Sun XVR-500 and similar diff --git a/drivers/video/fbdev/sunxvr500.c b/drivers/video/fbdev/sunxvr500.c index 3b7dcdae9f83f..fef008b728dde 100644 --- a/drivers/video/fbdev/sunxvr500.c +++ b/drivers/video/fbdev/sunxvr500.c @@ -189,10 +189,12 @@ static void e3d_copyarea(struct fb_info *info, const struct fb_copyarea *area) static const struct fb_ops e3d_ops = { .owner = THIS_MODULE, + __FB_DEFAULT_IOMEM_OPS_RDWR, .fb_setcolreg = e3d_setcolreg, .fb_fillrect = e3d_fillrect, .fb_copyarea = e3d_copyarea, .fb_imageblit = e3d_imageblit, + __FB_DEFAULT_IOMEM_OPS_MMAP, }; static int e3d_set_fbinfo(struct e3d_info *ep) From patchwork Wed Sep 27 07:27:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13400274 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 6A768E810A2 for ; Wed, 27 Sep 2023 07:50:01 +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=hnb1LuYR3rjcZ+UVaeUMNhXymksZAGby4b3MX6LyQTc=; b=SWdnPrif9kXSVK zjOa+Iu6PrETS/r4m1wrpDN9xGX8hmZIIKc9OccXUz/Z0MOfK8KFETxtJyR/6iNAPNp9/UD+DRFxs meD0sjKhNaLlVDpmeYv7aWjcLp/Vh/EoQg0Q8DZ2yAz5hCpbTMkbeNtiTgWpirUltYRHdLgX7oE3D 93dz8KiJFDbSDXsmjmqmiKlVVnPKOk/mmS3iOrJjqaGmTwe124A5xExF/LG7tJBd+0KOl/UwNpYiA ujPAulCtTgAqfyzpxczY/M7ehTIieDXHmo2aonNT3Vk5VnUKfw2TXmsvpFqvaIZgSCV8aP8Q4yOXR 8bkLT7y/T2Yzi5FXQFDw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qlPIY-000F3L-0S; Wed, 27 Sep 2023 07:49:30 +0000 Received: from smtp-out2.suse.de ([2001:67c:2178:6::1d]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qlPGj-000Dj4-32 for linux-arm-kernel@lists.infradead.org; Wed, 27 Sep 2023 07:47:43 +0000 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 571EE1F8B8; Wed, 27 Sep 2023 07:47:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1695800855; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=s5qOVbrbLOekLG3jjnI5gHX3xc4utgbolflicw1Cavo=; b=jhhAf12q0JMOZmWQXUJ+ttVzXiQEvF/L9/k7jyYFNAsIa5MtlsYg26MX/pcNe88mgTRxsu Ks8+rRZkZnfLrBaHFCzTzeQID5499wAtyeFLCpeGiAEk/7uZ4iIoH4ePqTEbba3fB9QKPa bp1CA7aCpScQWXotcCHYtx/2HMdlQo4= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1695800855; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=s5qOVbrbLOekLG3jjnI5gHX3xc4utgbolflicw1Cavo=; b=IWlTGRF7JCs6l3jXQ401mLaXsGDlRfXYgJziU+s5itTFjzdeZN1EX9WVM+z2Tb9w0qAMXR aCGOnfexSM3ILFDw== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 1B5511338F; Wed, 27 Sep 2023 07:47:35 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id UAy8BRfeE2XvUQAAMHmgww (envelope-from ); Wed, 27 Sep 2023 07:47:35 +0000 From: Thomas Zimmermann To: deller@gmx.de, javierm@redhat.com, sam@ravnborg.org, arnd@arndb.de, daniel@ffwll.ch Cc: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-nvidia@lists.surfsouth.com, linux-omap@vger.kernel.org, linux-parisc@vger.kernel.org, Thomas Zimmermann Subject: [PATCH 40/46] fbdev/tdfxfb: Initialize fb_ops to fbdev I/O-memory helpers Date: Wed, 27 Sep 2023 09:27:13 +0200 Message-ID: <20230927074722.6197-41-tzimmermann@suse.de> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20230927074722.6197-1-tzimmermann@suse.de> References: <20230927074722.6197-1-tzimmermann@suse.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230927_004738_139342_F21FE949 X-CRM114-Status: GOOD ( 13.28 ) 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 Initialize the instance of struct fb_ops with fbdev initializer macros for framebuffers in I/O address space. Set the read/write, draw and mmap callbacks to the correct implementation and avoid implicit defaults. Also select the necessary I/O helpers in Kconfig. Fbdev drivers sometimes rely on the callbacks being NULL for a default implementation to be invoked; hence requiring the I/O helpers to be built in any case. Setting all callbacks in all drivers explicitly will allow to make the I/O helpers optional. This benefits systems that do not use these functions. No functional changes. Signed-off-by: Thomas Zimmermann --- drivers/video/fbdev/Kconfig | 3 ++- drivers/video/fbdev/tdfxfb.c | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig index 1da6bf1eb6ff6..79505f22bcd16 100644 --- a/drivers/video/fbdev/Kconfig +++ b/drivers/video/fbdev/Kconfig @@ -1305,9 +1305,10 @@ config FB_KYRO config FB_3DFX tristate "3Dfx Banshee/Voodoo3/Voodoo5 display support" depends on FB && PCI - select FB_CFB_IMAGEBLIT select FB_CFB_FILLRECT select FB_CFB_COPYAREA + select FB_CFB_IMAGEBLIT + select FB_IOMEM_FOPS select FB_MODE_HELPERS select VIDEO_NOMODESET help diff --git a/drivers/video/fbdev/tdfxfb.c b/drivers/video/fbdev/tdfxfb.c index 68e2a82220f3f..22aa953138b0f 100644 --- a/drivers/video/fbdev/tdfxfb.c +++ b/drivers/video/fbdev/tdfxfb.c @@ -1142,6 +1142,7 @@ static int tdfxfb_cursor(struct fb_info *info, struct fb_cursor *cursor) static const struct fb_ops tdfxfb_ops = { .owner = THIS_MODULE, + __FB_DEFAULT_IOMEM_OPS_RDWR, .fb_check_var = tdfxfb_check_var, .fb_set_par = tdfxfb_set_par, .fb_setcolreg = tdfxfb_setcolreg, @@ -1154,10 +1155,9 @@ static const struct fb_ops tdfxfb_ops = { .fb_copyarea = tdfxfb_copyarea, .fb_imageblit = tdfxfb_imageblit, #else - .fb_fillrect = cfb_fillrect, - .fb_copyarea = cfb_copyarea, - .fb_imageblit = cfb_imageblit, + __FB_DEFAULT_IOMEM_OPS_DRAW, #endif + __FB_DEFAULT_IOMEM_OPS_MMAP, }; #ifdef CONFIG_FB_3DFX_I2C From patchwork Wed Sep 27 07:27:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13400282 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 B1E75E810A1 for ; Wed, 27 Sep 2023 07:50:17 +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=/lt0xpqiC70KB+eCV+E4cdZZkDrkqXyrRWn0ADfvmkc=; b=W0VlDV7G8Fl775 Wve4OvkMF0ecsdDW7auy5AF1iZUb+KeYGBJbjzSPyNUpSq63eNU/iFmdzJ/NA8kL4OeOjGUuEruWf 83XMYwXUScnf2aDM1CTWrViKhuJALNamesK9UF7TKqch79VbZtVHtwpaS7sqaspBfh3eSbb4WXrQf 4GwMxt9UebO08eYK2E12CLl4aMlLkJ3fMMw3QZh5EWJrTof4SzuCPEBuGPHLZmrVVjtUbpfPl+ejB E7E8qKHW1HN/qB7Fo0A7vlfUCG3wkQ6FjJPrCc2nWVKW5835Uzhtjs2OFymDFUfr6Rfq013bS3tcy YnSNkZ5UhBaALcqfCRCw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qlPIj-000FIA-2E; Wed, 27 Sep 2023 07:49:41 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qlPGy-000DyI-1p for linux-arm-kernel@bombadil.infradead.org; Wed, 27 Sep 2023 07:47:52 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Content-Transfer-Encoding:MIME-Version :References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=XczjX0X+8lPvhErC/1h7FPpj2wQ5JXY3EAdpTkSY1Hs=; b=XHRVGSCVPcupBUROmP2SRljgHG GLRRqw9AWIuhrgUQVelQJFiFIC0bNJ1rMfVUW4/2jSPHrwxOnTK0AhExzhnxe4zc/BgDTSqnyeF42 VEnX8VuWnoXkb7vP9z0tjLtpTdxXIm0p3OdFM0SNhlyZoA2H0AMsRmzFbi0qh46wpTs8cnIQ1lT74 Pj7s9NlyDDRVym7WlDa1p4ADJ8Zcp9K73O0McT4tGsrLs3m1w5zuDwJyrNi/l8dI6UxKdmumLUgeb CMyCI2qNUx5uZhaIAvsa2doaN7yT55cDEcUKm3vFtUYZpVTA5mEdsdJ2H+jA15KRlAoCGhSRdvyEI vnTLqyjg==; Received: from smtp-out2.suse.de ([2001:67c:2178:6::1d]) by desiato.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qlPGm-003hXL-2S for linux-arm-kernel@lists.infradead.org; Wed, 27 Sep 2023 07:47:50 +0000 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 99C651F8B9; Wed, 27 Sep 2023 07:47:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1695800855; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=XczjX0X+8lPvhErC/1h7FPpj2wQ5JXY3EAdpTkSY1Hs=; b=SzBEj5JY+APTi8ZmXLkT4DoxKeJcqsLBhXQJ+78vrI0a6btp/t1hqIXWn/GOQz00CEQ6uw N5Hf5KTaTy4MXPO+pe/LiYrQqXNEAwp6aZpSo4cSBsAFsaUWApA3ghqkX10ZfDQLH5VrtO 1q14uJKnA2S6bPlZqpzogZgsyvu5C9U= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1695800855; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=XczjX0X+8lPvhErC/1h7FPpj2wQ5JXY3EAdpTkSY1Hs=; b=fO5L7kxNu50/DaUBRrtelj07zZuijNDaV11GkeTcUuRTbRKdsxPkbZ07BgPm7CPzvAaWZ+ ltBilgPAtcYFdLBQ== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 5B57313A74; Wed, 27 Sep 2023 07:47:35 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id YGhoFRfeE2XvUQAAMHmgww (envelope-from ); Wed, 27 Sep 2023 07:47:35 +0000 From: Thomas Zimmermann To: deller@gmx.de, javierm@redhat.com, sam@ravnborg.org, arnd@arndb.de, daniel@ffwll.ch Cc: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-nvidia@lists.surfsouth.com, linux-omap@vger.kernel.org, linux-parisc@vger.kernel.org, Thomas Zimmermann Subject: [PATCH 41/46] fbdev/tgafb: Initialize fb_ops to fbdev I/O-memory helpers Date: Wed, 27 Sep 2023 09:27:14 +0200 Message-ID: <20230927074722.6197-42-tzimmermann@suse.de> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20230927074722.6197-1-tzimmermann@suse.de> References: <20230927074722.6197-1-tzimmermann@suse.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230927_084744_898413_B2AA42C1 X-CRM114-Status: GOOD ( 14.16 ) 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 Initialize the instance of struct fb_ops with fbdev initializer macros for framebuffers in I/O address space. Set the read/write, draw and mmap callbacks to the correct implementation and avoid implicit defaults. Also select the necessary I/O helpers in Kconfig. Fbdev drivers sometimes rely on the callbacks being NULL for a default implementation to be invoked; hence requiring the I/O helpers to be built in any case. Setting all callbacks in all drivers explicitly will allow to make the I/O helpers optional. This benefits systems that do not use these functions. No functional changes. Signed-off-by: Thomas Zimmermann --- drivers/video/fbdev/Kconfig | 3 ++- drivers/video/fbdev/tgafb.c | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig index 79505f22bcd16..b5000b357a4ed 100644 --- a/drivers/video/fbdev/Kconfig +++ b/drivers/video/fbdev/Kconfig @@ -416,10 +416,11 @@ config FB_TGA depends on FB depends on PCI || TC depends on ALPHA || TC + select BITREVERSE select FB_CFB_FILLRECT select FB_CFB_COPYAREA select FB_CFB_IMAGEBLIT - select BITREVERSE + select FB_IOMEM_FOPS select VIDEO_NOMODESET help This is the frame buffer device driver for generic TGA and SFB+ diff --git a/drivers/video/fbdev/tgafb.c b/drivers/video/fbdev/tgafb.c index fc2d08dd1b45a..ca43774f3156e 100644 --- a/drivers/video/fbdev/tgafb.c +++ b/drivers/video/fbdev/tgafb.c @@ -73,6 +73,7 @@ static struct tc_driver tgafb_tc_driver; static const struct fb_ops tgafb_ops = { .owner = THIS_MODULE, + __FB_DEFAULT_IOMEM_OPS_RDWR, .fb_check_var = tgafb_check_var, .fb_set_par = tgafb_set_par, .fb_setcolreg = tgafb_setcolreg, @@ -81,6 +82,7 @@ static const struct fb_ops tgafb_ops = { .fb_fillrect = tgafb_fillrect, .fb_copyarea = tgafb_copyarea, .fb_imageblit = tgafb_imageblit, + __FB_DEFAULT_IOMEM_OPS_MMAP, }; From patchwork Wed Sep 27 07:27:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13400268 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 44244E810A4 for ; Wed, 27 Sep 2023 07:49:55 +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=vFkPOEWqIVZSxnDBxsQJRW62TAG6oCwBs6+p0pjQuOg=; b=edWZCLgPWDRQJ2 URvTo5Yple4AQla90cQTwWe78Ry1g8cTkQWNj2pL/3vP8elIQY9moqY32R2+2PBhsFGDm7VrznSNv rAt2nAL6pum7edo7CUJ695w7UBeQnArAfdI5gWFAiZvpXo3/k/d3oNnYPBVUFJPYIrTY8dMXccqKN AkrZipc02VbuqpBp/SGIMBRUBycWQDIVTE2y93Iv6Jb+xw0TCPH9fIvBa0EJSdHYk32LIsXRvBqnN c8UH7wIUM1CXmN/YU8vPUY4wcFxw3YbClYvT/ANrh/6vDz4vbQkfqSL6WSHRMjVun17i/H/VbZM4x wQgsONP5seemocKpNN6g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qlPIX-000F2L-0T; Wed, 27 Sep 2023 07:49:29 +0000 Received: from smtp-out1.suse.de ([2001:67c:2178:6::1c]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qlPGj-000Dia-1Z for linux-arm-kernel@lists.infradead.org; Wed, 27 Sep 2023 07:47:42 +0000 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id E2676218E1; Wed, 27 Sep 2023 07:47:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1695800855; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=fKvyhxO3vYBUiYxk2DHFf/CeC37PJ0rshfwSbN/fEUY=; b=XgEUXyZ10sPiu9/riRK8YAJfBU/c6H3wLEgVP9c6i7UwrL4dT2hWc4nk/MqBIkmZJ+9hzn l5/V6CmhMCRG3BSpV/fP7WJ0itqB/EC5GWYV8xeL5Dl9zK+v+oY116Zd8nqpg6U5GC3YN5 oe9DL3lvqfOIFcUmxrwOS9FTjlIhYbw= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1695800855; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=fKvyhxO3vYBUiYxk2DHFf/CeC37PJ0rshfwSbN/fEUY=; b=tY/zdDM2hxaA5Pdt30qNCFSYYxwIcNyjHjUdFDDuxs7IHUkUlXvzTiXLUYgkWVQYnrvw23 QBM90FEG03pmejBA== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 9C34F1338F; Wed, 27 Sep 2023 07:47:35 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id gAglJRfeE2XvUQAAMHmgww (envelope-from ); Wed, 27 Sep 2023 07:47:35 +0000 From: Thomas Zimmermann To: deller@gmx.de, javierm@redhat.com, sam@ravnborg.org, arnd@arndb.de, daniel@ffwll.ch Cc: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-nvidia@lists.surfsouth.com, linux-omap@vger.kernel.org, linux-parisc@vger.kernel.org, Thomas Zimmermann Subject: [PATCH 42/46] fbdev/tridentfb: Initialize fb_ops to fbdev I/O-memory helpers Date: Wed, 27 Sep 2023 09:27:15 +0200 Message-ID: <20230927074722.6197-43-tzimmermann@suse.de> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20230927074722.6197-1-tzimmermann@suse.de> References: <20230927074722.6197-1-tzimmermann@suse.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230927_004737_687337_62ECFF1A X-CRM114-Status: GOOD ( 11.83 ) 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 Initialize the instance of struct fb_ops with fbdev initializer macros for framebuffers in I/O address space. Set the read/write, draw and mmap callbacks to the correct implementation and avoid implicit defaults. Also select the necessary I/O helpers in Kconfig. Fbdev drivers sometimes rely on the callbacks being NULL for a default implementation to be invoked; hence requiring the I/O helpers to be built in any case. Setting all callbacks in all drivers explicitly will allow to make the I/O helpers optional. This benefits systems that do not use these functions. No functional changes. Signed-off-by: Thomas Zimmermann --- drivers/video/fbdev/Kconfig | 1 + drivers/video/fbdev/tridentfb.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig index b5000b357a4ed..93c09a879dc5d 100644 --- a/drivers/video/fbdev/Kconfig +++ b/drivers/video/fbdev/Kconfig @@ -1375,6 +1375,7 @@ config FB_TRIDENT select FB_CFB_COPYAREA select FB_CFB_IMAGEBLIT select FB_DDC + select FB_IOMEM_FOPS select FB_MODE_HELPERS select VIDEO_NOMODESET help diff --git a/drivers/video/fbdev/tridentfb.c b/drivers/video/fbdev/tridentfb.c index 1ba157530af2f..816d40b6f689c 100644 --- a/drivers/video/fbdev/tridentfb.c +++ b/drivers/video/fbdev/tridentfb.c @@ -1444,6 +1444,7 @@ static int tridentfb_blank(int blank_mode, struct fb_info *info) static const struct fb_ops tridentfb_ops = { .owner = THIS_MODULE, + __FB_DEFAULT_IOMEM_OPS_RDWR, .fb_setcolreg = tridentfb_setcolreg, .fb_pan_display = tridentfb_pan_display, .fb_blank = tridentfb_blank, @@ -1453,6 +1454,7 @@ static const struct fb_ops tridentfb_ops = { .fb_copyarea = tridentfb_copyarea, .fb_imageblit = tridentfb_imageblit, .fb_sync = tridentfb_sync, + __FB_DEFAULT_IOMEM_OPS_MMAP, }; static int trident_pci_probe(struct pci_dev *dev, From patchwork Wed Sep 27 07:27:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13400271 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 B3683E810A1 for ; Wed, 27 Sep 2023 07:49:57 +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=IxOx/+z7Cj0md5GM7/EIrb2tkTkktZbF5yeb9wKlEtY=; b=TTcU+656RFOPOr yJWhT3MxV8pfqoAh9ENMxHdjb8Y7lT/bg6cY4ydZHk+1LpY267c7D5w/r2kbLV/+EJZ+y4Og4Qc8/ 77luNV3Ug8KVw7UQQRVZxIQpGcsWievKZFev6GRs1RDYlb3YMlW9D0VrYWI0hwcLD/aJSlkLRnVPX sp3BKWNJqJr2fVRvTIdhrRu7I+5z3i/lV1yDTbo4FOogKnQkWHJ0IY28Lj/7wQ6uypTFgz+eg/CPW SOOyhon7PTuQKqu2NQjRiyqMFS4lcPx/xO0BlXIIZCK7vVsronnq5xJRvA2MFmgbHuvw1dD0NX5BJ r5Hc4ESgDuvKu+vEhdGQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qlPIY-000F4N-2o; Wed, 27 Sep 2023 07:49:30 +0000 Received: from smtp-out2.suse.de ([195.135.220.29]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qlPGk-000DkA-18 for linux-arm-kernel@lists.infradead.org; Wed, 27 Sep 2023 07:47:43 +0000 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 1F5DB1F8BA; Wed, 27 Sep 2023 07:47:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1695800856; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=IrLLX5/sK6S3iIZ1GFmELYBQlModnKmfWVSTNn9pSpA=; b=T5KZD73hArD4C73/M1ZWYrVpxW9Ji2cgM5MGAICYBqSrzTjPA6a6jgmhQ/9d3H5CirjZfM rfjyMg0kwJYbxxXupNQi+9LaARg1uTqljvHwZfjH1mf5sTI3DuttjfG+wrMs/RTtLDbx72 hGzWUUEAgXqeaHTKBhcyPdlIDa8vuic= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1695800856; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=IrLLX5/sK6S3iIZ1GFmELYBQlModnKmfWVSTNn9pSpA=; b=1jsn7Wv8iAeup2Cw0zddAgUmBWhBw9mVCBGPedePfhxFfF1sp92N8aza5gUlcVFs5k+Siq UX+D4j6bG0/7AeBw== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id D8B5513A74; Wed, 27 Sep 2023 07:47:35 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id oPoDNBfeE2XvUQAAMHmgww (envelope-from ); Wed, 27 Sep 2023 07:47:35 +0000 From: Thomas Zimmermann To: deller@gmx.de, javierm@redhat.com, sam@ravnborg.org, arnd@arndb.de, daniel@ffwll.ch Cc: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-nvidia@lists.surfsouth.com, linux-omap@vger.kernel.org, linux-parisc@vger.kernel.org, Thomas Zimmermann Subject: [PATCH 43/46] fbdev/vermilionfb: Initialize fb_ops to fbdev I/O-memory helpers Date: Wed, 27 Sep 2023 09:27:16 +0200 Message-ID: <20230927074722.6197-44-tzimmermann@suse.de> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20230927074722.6197-1-tzimmermann@suse.de> References: <20230927074722.6197-1-tzimmermann@suse.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230927_004738_541386_D9CB4C4C X-CRM114-Status: GOOD ( 13.20 ) 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 Initialize the instance of struct fb_ops with fbdev initializer macros for framebuffers in I/O address space. Set the read/write, draw and mmap callbacks to the correct implementation and avoid implicit defaults. Also select the necessary I/O helpers in Kconfig. Fbdev drivers sometimes rely on the callbacks being NULL for a default implementation to be invoked; hence requiring the I/O helpers to be built in any case. Setting all callbacks in all drivers explicitly will allow to make the I/O helpers optional. This benefits systems that do not use these functions. No functional changes. Signed-off-by: Thomas Zimmermann --- drivers/video/fbdev/Kconfig | 4 +--- drivers/video/fbdev/vermilion/vermilion.c | 5 ++--- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig index 93c09a879dc5d..576a00c6a0f1b 100644 --- a/drivers/video/fbdev/Kconfig +++ b/drivers/video/fbdev/Kconfig @@ -849,10 +849,8 @@ config FB_I810_I2C config FB_LE80578 tristate "Intel LE80578 (Vermilion) support" depends on FB && PCI && X86 + select FB_IOMEM_HELPERS select FB_MODE_HELPERS - select FB_CFB_FILLRECT - select FB_CFB_COPYAREA - select FB_CFB_IMAGEBLIT select VIDEO_NOMODESET help This driver supports the LE80578 (Vermilion Range) chipset diff --git a/drivers/video/fbdev/vermilion/vermilion.c b/drivers/video/fbdev/vermilion/vermilion.c index 71584c775efd4..840ead69654b8 100644 --- a/drivers/video/fbdev/vermilion/vermilion.c +++ b/drivers/video/fbdev/vermilion/vermilion.c @@ -1024,13 +1024,12 @@ static struct fb_ops vmlfb_ops = { .owner = THIS_MODULE, .fb_open = vmlfb_open, .fb_release = vmlfb_release, + __FB_DEFAULT_IOMEM_OPS_RDWR, .fb_check_var = vmlfb_check_var, .fb_set_par = vmlfb_set_par, .fb_blank = vmlfb_blank, .fb_pan_display = vmlfb_pan_display, - .fb_fillrect = cfb_fillrect, - .fb_copyarea = cfb_copyarea, - .fb_imageblit = cfb_imageblit, + __FB_DEFAULT_IOMEM_OPS_DRAW, .fb_cursor = vmlfb_cursor, .fb_sync = vmlfb_sync, .fb_mmap = vmlfb_mmap, From patchwork Wed Sep 27 07:27:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13400279 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 72656E810A0 for ; Wed, 27 Sep 2023 07:50:08 +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=pkJYxn4GLXKDNx8LaZU4eR//e90YhekO3Qfoj7QjzcE=; b=J1SVfL47MR5X3c T2/Isj7J+CCx5EoLYjV8jFzFU1qG10R0uGgKadi0U7lOGSsY1H+9dpTEqTQu/bFCHOspoJDpwglgK toRb9OBZZbG+qluVYcFhBgtifGAODAqPV34HIbPqEBmx+xrTFaFjVgRbQGgDLfGW6Axczz1ZgCkYY zw0EF/4YENe+L0toYNzH9zYAiEwqo9ZIo6xCZfV4GJTc62jo96ioV2NQCbSfhMrtjD8uvpm4ztk05 dnd0C/fdjZHvLUKmWAy3W4K2N782IuCH/W27FXykqtd7j1cU4+VqhYbTSJgAbtEfM0iF/jn43dRdx J/7ddoYABmq1tXUUytAA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qlPIe-000FC1-2y; Wed, 27 Sep 2023 07:49:36 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qlPGx-000Dxl-2W for linux-arm-kernel@bombadil.infradead.org; Wed, 27 Sep 2023 07:47:51 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Content-Transfer-Encoding:MIME-Version :References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=p77V2UZWwLT++cVTks2OnLkM8fKDV/6QuEv6ixdom3c=; b=EBSnTp7tNdawvgJIy0Fe25GHoY eH7F7ZrtJWA0MeDUTokGd2y0q/GUK+ku/xsEhR8ggV4lGzkHIvaeyC34vop3e5SiNh3zVqhqG9NrD XWHC7JLW3uaant0FaJ79WNQCbm74/OFyodB4yrZnfQdlhTT66fc0vrDW2g67PF7f9toruvSx5c4LF aqCcj4ZfU30R/LEfhpZOPVuCFcWP3xl8Z85YtRchCrg/rN9aR//nTNU7Q05xXwtyJlIBoHfftQnAw sSa9lB7IuYx5ZjPQw3QtyLivjzlVr0DILx77mlinbNlFfm4foOeNhaisRl0g5ZBTeLForKGKr2o7g ofLy6nPA==; Received: from smtp-out1.suse.de ([2001:67c:2178:6::1c]) by desiato.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qlPGm-003hXM-2S for linux-arm-kernel@lists.infradead.org; Wed, 27 Sep 2023 07:47:49 +0000 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 610E0218E2; Wed, 27 Sep 2023 07:47:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1695800856; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=p77V2UZWwLT++cVTks2OnLkM8fKDV/6QuEv6ixdom3c=; b=G7YJ6ciw++CUKa7XEO/ObJ5URIXyVzbGp3naHDUspgn6DYICMIq5KLBK+Hyh2V2KuXY9eu LusDjUZ8+0zbZSqsaqs5WfIQ0vT9EtVGcRoPUpnLhGM5d4Pgp662v+4ZgNPZEETYUdDVHO /Oc+Y/LW2F8KH6lAK/qMz5PrZyAOCGo= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1695800856; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=p77V2UZWwLT++cVTks2OnLkM8fKDV/6QuEv6ixdom3c=; b=ipxk+ExbZqu46ATH8JEvYiZqsrlu4l8wU2uLpbxqZkZqCTLw69ceOGhhRhJJNtJr+NEKdm 1rc3jTPdksaJO2Cw== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 238E71338F; Wed, 27 Sep 2023 07:47:36 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id mM/MBxjeE2XvUQAAMHmgww (envelope-from ); Wed, 27 Sep 2023 07:47:36 +0000 From: Thomas Zimmermann To: deller@gmx.de, javierm@redhat.com, sam@ravnborg.org, arnd@arndb.de, daniel@ffwll.ch Cc: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-nvidia@lists.surfsouth.com, linux-omap@vger.kernel.org, linux-parisc@vger.kernel.org, Thomas Zimmermann Subject: [PATCH 44/46] fbdev/vga16fb: Initialize fb_ops to fbdev I/O-memory helpers Date: Wed, 27 Sep 2023 09:27:17 +0200 Message-ID: <20230927074722.6197-45-tzimmermann@suse.de> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20230927074722.6197-1-tzimmermann@suse.de> References: <20230927074722.6197-1-tzimmermann@suse.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230927_084744_664605_A874F913 X-CRM114-Status: GOOD ( 11.73 ) 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 Initialize the instance of struct fb_ops with fbdev initializer macros for framebuffers in I/O address space. Set the read/write, draw and mmap callbacks to the correct implementation and avoid implicit defaults. Also select the necessary I/O helpers in Kconfig. Fbdev drivers sometimes rely on the callbacks being NULL for a default implementation to be invoked; hence requiring the I/O helpers to be built in any case. Setting all callbacks in all drivers explicitly will allow to make the I/O helpers optional. This benefits systems that do not use these functions. No functional changes. Signed-off-by: Thomas Zimmermann --- drivers/video/fbdev/Kconfig | 1 + drivers/video/fbdev/vga16fb.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig index 576a00c6a0f1b..021214ecd5e80 100644 --- a/drivers/video/fbdev/Kconfig +++ b/drivers/video/fbdev/Kconfig @@ -369,6 +369,7 @@ config FB_VGA16 select FB_CFB_FILLRECT select FB_CFB_COPYAREA select FB_CFB_IMAGEBLIT + select FB_IOMEM_FOPS select VGASTATE select FONT_8x16 if FRAMEBUFFER_CONSOLE help diff --git a/drivers/video/fbdev/vga16fb.c b/drivers/video/fbdev/vga16fb.c index b43c874c199f6..ac21942d53110 100644 --- a/drivers/video/fbdev/vga16fb.c +++ b/drivers/video/fbdev/vga16fb.c @@ -1291,6 +1291,7 @@ static const struct fb_ops vga16fb_ops = { .owner = THIS_MODULE, .fb_open = vga16fb_open, .fb_release = vga16fb_release, + __FB_DEFAULT_IOMEM_OPS_RDWR, .fb_destroy = vga16fb_destroy, .fb_check_var = vga16fb_check_var, .fb_set_par = vga16fb_set_par, @@ -1300,6 +1301,7 @@ static const struct fb_ops vga16fb_ops = { .fb_fillrect = vga16fb_fillrect, .fb_copyarea = vga16fb_copyarea, .fb_imageblit = vga16fb_imageblit, + __FB_DEFAULT_IOMEM_OPS_MMAP, }; static int vga16fb_probe(struct platform_device *dev) From patchwork Wed Sep 27 07:27:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13400275 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 E6AA1E810A4 for ; Wed, 27 Sep 2023 07:50:01 +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=K+hVoATaCv/rs8nnnBnDKtOBM8dli04IL1e47npgYRU=; b=tvm3VT4t3Zm/cM 6m6mKmoeY2HdtFsHNVAX5isbhnhnyz94fH5fw6C49TtZJENOEzsYSQEbozaISfc872aaR8l96Eljz QYtpqkGMueqmDOYXmNTYX+NSuTWonpoulGkabygS3BDdzMQwSaM0AaK/84+WzcJITuBkPxSe0gjfX I6ds0nozl+5Ta7pMhYvyCMCrnt0qvYdxZtb5nMYYhC4engztZFKnM8dT9eeErGC2l+Um9OC8uxKOX 1or4QYlzUabfi/qXjnR57BgBHSLzjSqpWboTefa+BmJaGJlq601U690VnP+53L3pVUZrYrfHkohYV m/oDPLdO60yin85qAFDw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qlPIW-000F1Y-1X; Wed, 27 Sep 2023 07:49:28 +0000 Received: from smtp-out2.suse.de ([195.135.220.29]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qlPGj-000Dj9-39 for linux-arm-kernel@lists.infradead.org; Wed, 27 Sep 2023 07:47:42 +0000 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id A68B41F8BB; Wed, 27 Sep 2023 07:47:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1695800856; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=DHvYuZQdrlX0/gUrYQoG6bajZYjXhbN61pWx8V5d59M=; b=zDvoPONN29q2cVtKgYYz2F98tiEw6TuhrIDRlQXuZhqnKdCrefE5uTtLOc1CEfosbrtIiP 1t5accBsL2WqyOVnSnDCw1xqdzYCkEb4RU/9Sv6jPhXUXlEPLB9n4/S4w8R9I43V7WYjGa ZbkWQ+he8tUo/3xYrcw3kMaVSi6dKfo= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1695800856; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=DHvYuZQdrlX0/gUrYQoG6bajZYjXhbN61pWx8V5d59M=; b=oSws83JxfGXAb0x3OX2IAf8Rv7wXUP/bGT6yFoBjlDmy93XfSO13uPZxl31bEoT2Ju+uC2 WcRgv1wvsu6C2PAQ== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 643F913A74; Wed, 27 Sep 2023 07:47:36 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id mKBfFxjeE2XvUQAAMHmgww (envelope-from ); Wed, 27 Sep 2023 07:47:36 +0000 From: Thomas Zimmermann To: deller@gmx.de, javierm@redhat.com, sam@ravnborg.org, arnd@arndb.de, daniel@ffwll.ch Cc: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-nvidia@lists.surfsouth.com, linux-omap@vger.kernel.org, linux-parisc@vger.kernel.org, Thomas Zimmermann , Florian Tobias Schandinat Subject: [PATCH 45/46] fbdev/viafb: Initialize fb_ops to fbdev I/O-memory helpers Date: Wed, 27 Sep 2023 09:27:18 +0200 Message-ID: <20230927074722.6197-46-tzimmermann@suse.de> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20230927074722.6197-1-tzimmermann@suse.de> References: <20230927074722.6197-1-tzimmermann@suse.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230927_004738_188268_F2132AF8 X-CRM114-Status: GOOD ( 11.50 ) 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 Initialize the instance of struct fb_ops with fbdev initializer macros for framebuffers in I/O address space. Set the read/write, draw and mmap callbacks to the correct implementation and avoid implicit defaults. Also select the necessary I/O helpers in Kconfig. Fbdev drivers sometimes rely on the callbacks being NULL for a default implementation to be invoked; hence requiring the I/O helpers to be built in any case. Setting all callbacks in all drivers explicitly will allow to make the I/O helpers optional. This benefits systems that do not use these functions. No functional changes. Signed-off-by: Thomas Zimmermann Cc: Florian Tobias Schandinat --- drivers/video/fbdev/Kconfig | 1 + drivers/video/fbdev/via/viafbdev.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig index 021214ecd5e80..dab0e49a66d20 100644 --- a/drivers/video/fbdev/Kconfig +++ b/drivers/video/fbdev/Kconfig @@ -1240,6 +1240,7 @@ config FB_VIA select FB_CFB_FILLRECT select FB_CFB_COPYAREA select FB_CFB_IMAGEBLIT + select FB_IOMEM_FOPS select I2C_ALGOBIT select VIDEO_NOMODESET help diff --git a/drivers/video/fbdev/via/viafbdev.c b/drivers/video/fbdev/via/viafbdev.c index 190fddee62e67..58868f8880d65 100644 --- a/drivers/video/fbdev/via/viafbdev.c +++ b/drivers/video/fbdev/via/viafbdev.c @@ -2054,6 +2054,7 @@ static struct fb_ops viafb_ops = { .owner = THIS_MODULE, .fb_open = viafb_open, .fb_release = viafb_release, + __FB_DEFAULT_IOMEM_OPS_RDWR, .fb_check_var = viafb_check_var, .fb_set_par = viafb_set_par, .fb_setcolreg = viafb_setcolreg, @@ -2065,6 +2066,7 @@ static struct fb_ops viafb_ops = { .fb_cursor = viafb_cursor, .fb_ioctl = viafb_ioctl, .fb_sync = viafb_sync, + __FB_DEFAULT_IOMEM_OPS_MMAP, }; From patchwork Wed Sep 27 07:27:19 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13400278 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 D1D05E810A1 for ; Wed, 27 Sep 2023 07:50:07 +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=4hRcS/ND2ETpujq7wRGQ0tZdWHPEJDMbxs7ajlgbHGM=; b=AXXyBzYFeQkc4x 44/LN8Zdyio1yq6hOCWs7mdfZ7/mCz07OK08MXc6NGHg/2veWvdab2emGdZvJncthc3gL0W9h6jYQ BWFn6OKUTDRyXqzmTR2ewx1Y5060Q3brDjRHNcvjlhs1p0l114GuGoHQQ36ELyuYS89ajdqr39xQH qReFErTRewivd7ZPQlJwUdy1+D+POWYjwZg0FYZbWp8aTQAzvepmNCirc/9sOR/SJxr6G/On8VaNC DqQ2Cc+Crj6i5MTw8pg6y6QomA4Xvae9zEWAwNZkBQdvX7/NANiaEcuBNtmSCWemISPSU/P385Ysd PU1gv0SCYmW520ytr4ww==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qlPIg-000FER-2H; Wed, 27 Sep 2023 07:49:38 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qlPGy-000DyL-1P for linux-arm-kernel@bombadil.infradead.org; Wed, 27 Sep 2023 07:47:52 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Content-Transfer-Encoding:MIME-Version :References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=nyztPihry+uYWVQVQilr9GF3JEmaojYG/GDs/5jbvgg=; b=pUG2n70++elcP/Zl+BcRkarrc3 3KCEKAxGvVhfy+qfnM9iL94GdwmqdsirsszdQVpTJcfhuefRMzGJtzl0ZC8ENVdAe60PEQlpt9dM7 M8ylPneIwfzfwk6QMDTUvCyzhdxUyI+fKQvqIkZ3UZ1JKhjYHfR94TFatwcQr33jHqYbZJwbaiGmH XoeftEsftqXsBcIBd5q6fTbXJZKibF1EVm8J06NjVSeN+SaUW07+UfeRxEKLsepUG7C9c9ubFVl7c ThwqnPISuv+papqOsPq1xlKWJwq5FqOWMk4t/bjTn9GNVjN8t79jc2U7SylHnEXYy3tBN/jM9r+sD gVq0jD8Q==; Received: from smtp-out2.suse.de ([2001:67c:2178:6::1d]) by desiato.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qlPGm-003hXP-2S for linux-arm-kernel@lists.infradead.org; Wed, 27 Sep 2023 07:47:51 +0000 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id E4DC51F8BD; Wed, 27 Sep 2023 07:47:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1695800856; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=nyztPihry+uYWVQVQilr9GF3JEmaojYG/GDs/5jbvgg=; b=rHGHbynxiC201XZf419py+7wmacbnv7TvFX6pL8BmBQmCu3jxALTfunKlMmemhQB/UwxLE ZBlrt/jR3yfiS91k3QpYnT4cwDdvDPBerZS3ZYz+kiQi5Pluj4lT8s0BTpbDFcXEmUL0Fx a8n5SMYiuhtFUsaNX1X1DMzIKlXz9fw= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1695800856; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=nyztPihry+uYWVQVQilr9GF3JEmaojYG/GDs/5jbvgg=; b=bsi9xPfXPtJYkKZOeDjG2LSjbZRJca7H7r4qHipe8HYJhIj+7lJt/AV335m+SgoLhaLaI/ 1rVsDDIKV9XQxyAA== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id A8F431338F; Wed, 27 Sep 2023 07:47:36 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 4PVRKBjeE2XvUQAAMHmgww (envelope-from ); Wed, 27 Sep 2023 07:47:36 +0000 From: Thomas Zimmermann To: deller@gmx.de, javierm@redhat.com, sam@ravnborg.org, arnd@arndb.de, daniel@ffwll.ch Cc: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-nvidia@lists.surfsouth.com, linux-omap@vger.kernel.org, linux-parisc@vger.kernel.org, Thomas Zimmermann Subject: [PATCH 46/46] fbdev/vt8623fb: Initialize fb_ops to fbdev I/O-memory helpers Date: Wed, 27 Sep 2023 09:27:19 +0200 Message-ID: <20230927074722.6197-47-tzimmermann@suse.de> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20230927074722.6197-1-tzimmermann@suse.de> References: <20230927074722.6197-1-tzimmermann@suse.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230927_084744_938947_6754628A X-CRM114-Status: GOOD ( 11.64 ) 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 Initialize the instance of struct fb_ops with fbdev initializer macros for framebuffers in I/O address space. Set the read/write, draw and mmap callbacks to the correct implementation and avoid implicit defaults. Also select the necessary I/O helpers in Kconfig. Fbdev drivers sometimes rely on the callbacks being NULL for a default implementation to be invoked; hence requiring the I/O helpers to be built in any case. Setting all callbacks in all drivers explicitly will allow to make the I/O helpers optional. This benefits systems that do not use these functions. No functional changes. Signed-off-by: Thomas Zimmermann --- drivers/video/fbdev/Kconfig | 1 + drivers/video/fbdev/vt8623fb.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig index dab0e49a66d20..20e0167bf20c9 100644 --- a/drivers/video/fbdev/Kconfig +++ b/drivers/video/fbdev/Kconfig @@ -1359,6 +1359,7 @@ config FB_VT8623 select FB_CFB_FILLRECT select FB_CFB_COPYAREA select FB_CFB_IMAGEBLIT + select FB_IOMEM_FOPS select FB_TILEBLITTING select FB_SVGALIB select VGASTATE diff --git a/drivers/video/fbdev/vt8623fb.c b/drivers/video/fbdev/vt8623fb.c index 034333ee6e455..f8d022cb61e8d 100644 --- a/drivers/video/fbdev/vt8623fb.c +++ b/drivers/video/fbdev/vt8623fb.c @@ -644,6 +644,7 @@ static const struct fb_ops vt8623fb_ops = { .owner = THIS_MODULE, .fb_open = vt8623fb_open, .fb_release = vt8623fb_release, + __FB_DEFAULT_IOMEM_OPS_RDWR, .fb_check_var = vt8623fb_check_var, .fb_set_par = vt8623fb_set_par, .fb_setcolreg = vt8623fb_setcolreg, @@ -652,6 +653,7 @@ static const struct fb_ops vt8623fb_ops = { .fb_fillrect = vt8623fb_fillrect, .fb_copyarea = cfb_copyarea, .fb_imageblit = vt8623fb_imageblit, + __FB_DEFAULT_IOMEM_OPS_MMAP, .fb_get_caps = svga_get_caps, };