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: 13400104 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 48E53E80AAF for ; Wed, 27 Sep 2023 07:47:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230048AbjI0Hrh (ORCPT ); Wed, 27 Sep 2023 03:47:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50762 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230043AbjI0Hrb (ORCPT ); Wed, 27 Sep 2023 03:47:31 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2001:67c:2178:6::1c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 491EA1A5; Wed, 27 Sep 2023 00:47:28 -0700 (PDT) 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 Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.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: 13400100 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2C817E80AA5 for ; Wed, 27 Sep 2023 07:47:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230059AbjI0Hre (ORCPT ); Wed, 27 Sep 2023 03:47:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33184 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230061AbjI0Hr2 (ORCPT ); Wed, 27 Sep 2023 03:47:28 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A6DDB196; Wed, 27 Sep 2023 00:47:26 -0700 (PDT) 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 Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.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: 13400102 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A6F64E80AAA for ; Wed, 27 Sep 2023 07:47:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230028AbjI0Hrf (ORCPT ); Wed, 27 Sep 2023 03:47:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50718 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230075AbjI0Hr3 (ORCPT ); Wed, 27 Sep 2023 03:47:29 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0876F1B3; Wed, 27 Sep 2023 00:47:26 -0700 (PDT) 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 Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.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: 13400108 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4EE90E80ABD for ; Wed, 27 Sep 2023 07:47:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230141AbjI0Hrl (ORCPT ); Wed, 27 Sep 2023 03:47:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40406 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230077AbjI0Hrb (ORCPT ); Wed, 27 Sep 2023 03:47:31 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2001:67c:2178:6::1c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DA43019F; Wed, 27 Sep 2023 00:47:28 -0700 (PDT) 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 Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.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: 13400112 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5C28BE80A9A for ; Wed, 27 Sep 2023 07:47:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230080AbjI0Hrn (ORCPT ); Wed, 27 Sep 2023 03:47:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40436 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230081AbjI0Hrb (ORCPT ); Wed, 27 Sep 2023 03:47:31 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 495691B4; Wed, 27 Sep 2023 00:47:28 -0700 (PDT) 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 Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.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: 13400103 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9A703E80AAE for ; Wed, 27 Sep 2023 07:47:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230109AbjI0Hrg (ORCPT ); Wed, 27 Sep 2023 03:47:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50706 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230039AbjI0Hrb (ORCPT ); Wed, 27 Sep 2023 03:47:31 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2001:67c:2178:6::1c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 494B319E; Wed, 27 Sep 2023 00:47:28 -0700 (PDT) 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 Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.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: 13400107 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 41B8DE80AB6 for ; Wed, 27 Sep 2023 07:47:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230133AbjI0Hri (ORCPT ); Wed, 27 Sep 2023 03:47:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50692 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229993AbjI0Hrb (ORCPT ); Wed, 27 Sep 2023 03:47:31 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EBCC9192; Wed, 27 Sep 2023 00:47:29 -0700 (PDT) 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 Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.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: 13400111 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E9599E80AAC for ; Wed, 27 Sep 2023 07:47:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230079AbjI0Hrm (ORCPT ); Wed, 27 Sep 2023 03:47:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40432 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230080AbjI0Hrb (ORCPT ); Wed, 27 Sep 2023 03:47:31 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 493011A8; Wed, 27 Sep 2023 00:47:28 -0700 (PDT) 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 Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.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: 13400106 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B2645E80AA4 for ; Wed, 27 Sep 2023 07:47:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230049AbjI0Hrj (ORCPT ); Wed, 27 Sep 2023 03:47:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40390 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230052AbjI0Hrb (ORCPT ); Wed, 27 Sep 2023 03:47:31 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2001:67c:2178:6::1c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 06B311B7; Wed, 27 Sep 2023 00:47:29 -0700 (PDT) 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 Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.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: 13400105 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id CC418E80AB2 for ; Wed, 27 Sep 2023 07:47:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230126AbjI0Hrh (ORCPT ); Wed, 27 Sep 2023 03:47:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40354 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230046AbjI0Hrb (ORCPT ); Wed, 27 Sep 2023 03:47:31 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 496A919A; Wed, 27 Sep 2023 00:47:28 -0700 (PDT) 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 Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.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: 13400116 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2112BEED611 for ; Wed, 27 Sep 2023 07:47:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230161AbjI0Hrq (ORCPT ); Wed, 27 Sep 2023 03:47:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40468 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230086AbjI0Hrd (ORCPT ); Wed, 27 Sep 2023 03:47:33 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4DA8E1B9; Wed, 27 Sep 2023 00:47:30 -0700 (PDT) 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 Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.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: 13400109 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9C0C4E80AB9 for ; Wed, 27 Sep 2023 07:47:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230088AbjI0Hrk (ORCPT ); Wed, 27 Sep 2023 03:47:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40378 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230078AbjI0Hrb (ORCPT ); Wed, 27 Sep 2023 03:47:31 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4990A1B6; Wed, 27 Sep 2023 00:47:29 -0700 (PDT) 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 Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.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: 13400113 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2575DE7F145 for ; Wed, 27 Sep 2023 07:47:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230153AbjI0Hro (ORCPT ); Wed, 27 Sep 2023 03:47:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50770 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230084AbjI0Hrc (ORCPT ); Wed, 27 Sep 2023 03:47:32 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4DD091A6; Wed, 27 Sep 2023 00:47:30 -0700 (PDT) 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 Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.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: 13400110 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id F3824E80ABF for ; Wed, 27 Sep 2023 07:47:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230146AbjI0Hrl (ORCPT ); Wed, 27 Sep 2023 03:47:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40420 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230079AbjI0Hrb (ORCPT ); Wed, 27 Sep 2023 03:47:31 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 068441AA; Wed, 27 Sep 2023 00:47:30 -0700 (PDT) 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 Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.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: 13400114 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 743ACE81815 for ; Wed, 27 Sep 2023 07:47:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230156AbjI0Hro (ORCPT ); Wed, 27 Sep 2023 03:47:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40448 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230083AbjI0Hrb (ORCPT ); Wed, 27 Sep 2023 03:47:31 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 197701B8; Wed, 27 Sep 2023 00:47:30 -0700 (PDT) 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 Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.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: 13400119 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 62FDBE810A9 for ; Wed, 27 Sep 2023 07:47:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229993AbjI0Hrt (ORCPT ); Wed, 27 Sep 2023 03:47:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40340 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230091AbjI0Hre (ORCPT ); Wed, 27 Sep 2023 03:47:34 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A2FCC1BD; Wed, 27 Sep 2023 00:47:32 -0700 (PDT) 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 Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.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: 13400118 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 84DE8E810A3 for ; Wed, 27 Sep 2023 07:47:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230064AbjI0Hrs (ORCPT ); Wed, 27 Sep 2023 03:47:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40334 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230093AbjI0Hre (ORCPT ); Wed, 27 Sep 2023 03:47:34 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B17FC1BE; Wed, 27 Sep 2023 00:47:32 -0700 (PDT) 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 Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.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: 13400115 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5222BE80AB3 for ; Wed, 27 Sep 2023 07:47:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230121AbjI0Hrq (ORCPT ); Wed, 27 Sep 2023 03:47:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40318 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230057AbjI0Hrd (ORCPT ); Wed, 27 Sep 2023 03:47:33 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 993F51AD; Wed, 27 Sep 2023 00:47:32 -0700 (PDT) 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 Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.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: 13400122 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id DE282E810B0 for ; Wed, 27 Sep 2023 07:47:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230154AbjI0Hrv (ORCPT ); Wed, 27 Sep 2023 03:47:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50676 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230076AbjI0Hrf (ORCPT ); Wed, 27 Sep 2023 03:47:35 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E595DCC0; Wed, 27 Sep 2023 00:47:32 -0700 (PDT) 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 Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.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: 13400123 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 70395E810B3 for ; Wed, 27 Sep 2023 07:47:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230076AbjI0Hrw (ORCPT ); Wed, 27 Sep 2023 03:47:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50684 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230097AbjI0Hrf (ORCPT ); Wed, 27 Sep 2023 03:47:35 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E59C1CC1; Wed, 27 Sep 2023 00:47:32 -0700 (PDT) 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 Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.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: 13400120 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6DB71E810AA for ; Wed, 27 Sep 2023 07:47:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230031AbjI0Hru (ORCPT ); Wed, 27 Sep 2023 03:47:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50670 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230061AbjI0Hre (ORCPT ); Wed, 27 Sep 2023 03:47:34 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2001:67c:2178:6::1c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B49B61BF; Wed, 27 Sep 2023 00:47:32 -0700 (PDT) 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 Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.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: 13400128 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A1FF5E810C7 for ; Wed, 27 Sep 2023 07:47:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230180AbjI0Hrz (ORCPT ); Wed, 27 Sep 2023 03:47:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40528 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230102AbjI0Hrf (ORCPT ); Wed, 27 Sep 2023 03:47:35 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E28BA1B0; Wed, 27 Sep 2023 00:47:32 -0700 (PDT) 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 Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.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: 13400126 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 350F7E810C0 for ; Wed, 27 Sep 2023 07:47:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230176AbjI0Hrz (ORCPT ); Wed, 27 Sep 2023 03:47:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40492 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230099AbjI0Hrf (ORCPT ); Wed, 27 Sep 2023 03:47:35 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E9086CC4; Wed, 27 Sep 2023 00:47:32 -0700 (PDT) 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 Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.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: 13400117 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7B6D2E810A0 for ; Wed, 27 Sep 2023 07:47:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230135AbjI0Hrr (ORCPT ); Wed, 27 Sep 2023 03:47:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50718 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230064AbjI0Hre (ORCPT ); Wed, 27 Sep 2023 03:47:34 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D4BC0194; Wed, 27 Sep 2023 00:47:32 -0700 (PDT) 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 Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.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: 13400125 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5C172E810BC for ; Wed, 27 Sep 2023 07:47:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230168AbjI0Hry (ORCPT ); Wed, 27 Sep 2023 03:47:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40490 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230044AbjI0Hrf (ORCPT ); Wed, 27 Sep 2023 03:47:35 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2001:67c:2178:6::1c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E5A86CC2; Wed, 27 Sep 2023 00:47:32 -0700 (PDT) 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 Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.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: 13400124 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C705BE810B7 for ; Wed, 27 Sep 2023 07:47:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230061AbjI0Hrx (ORCPT ); Wed, 27 Sep 2023 03:47:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40508 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230100AbjI0Hrf (ORCPT ); Wed, 27 Sep 2023 03:47:35 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2001:67c:2178:6::1c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0767FB3; Wed, 27 Sep 2023 00:47:33 -0700 (PDT) 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 Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.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: 13400121 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3428EE810B5 for ; Wed, 27 Sep 2023 07:47:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230093AbjI0Hrx (ORCPT ); Wed, 27 Sep 2023 03:47:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50756 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230030AbjI0Hrf (ORCPT ); Wed, 27 Sep 2023 03:47:35 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 47628136; Wed, 27 Sep 2023 00:47:33 -0700 (PDT) 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 Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.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: 13400127 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8FE89E810C1 for ; Wed, 27 Sep 2023 07:47:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230099AbjI0Hrz (ORCPT ); Wed, 27 Sep 2023 03:47:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50742 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230035AbjI0Hrf (ORCPT ); Wed, 27 Sep 2023 03:47:35 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2001:67c:2178:6::1c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 80E5D196; Wed, 27 Sep 2023 00:47:33 -0700 (PDT) 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 Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.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: 13400131 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id BD92CE810CC for ; Wed, 27 Sep 2023 07:47:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230102AbjI0Hr4 (ORCPT ); Wed, 27 Sep 2023 03:47:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43730 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230103AbjI0Hrf (ORCPT ); Wed, 27 Sep 2023 03:47:35 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2001:67c:2178:6::1c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F16EE193; Wed, 27 Sep 2023 00:47:33 -0700 (PDT) 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 Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.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: 13400132 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id DB92AE810D2 for ; Wed, 27 Sep 2023 07:48:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230075AbjI0Hr7 (ORCPT ); Wed, 27 Sep 2023 03:47:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50762 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230107AbjI0Hrg (ORCPT ); Wed, 27 Sep 2023 03:47:36 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4E00A199; Wed, 27 Sep 2023 00:47:34 -0700 (PDT) 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 Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.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: 13400130 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7D9D2E810CF for ; Wed, 27 Sep 2023 07:47:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230185AbjI0Hr6 (ORCPT ); Wed, 27 Sep 2023 03:47:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50706 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230041AbjI0Hrf (ORCPT ); Wed, 27 Sep 2023 03:47:35 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 67DA612A; Wed, 27 Sep 2023 00:47:34 -0700 (PDT) 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 Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.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: 13400129 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2DDBAE810D1 for ; Wed, 27 Sep 2023 07:48:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230100AbjI0Hr7 (ORCPT ); Wed, 27 Sep 2023 03:47:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43732 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230075AbjI0Hrg (ORCPT ); Wed, 27 Sep 2023 03:47:36 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2001:67c:2178:6::1c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A85D51B1; Wed, 27 Sep 2023 00:47:34 -0700 (PDT) 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 Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.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: 13400133 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 60E0FE810D6 for ; Wed, 27 Sep 2023 07:48:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230190AbjI0HsA (ORCPT ); Wed, 27 Sep 2023 03:48:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43746 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230108AbjI0Hrg (ORCPT ); Wed, 27 Sep 2023 03:47:36 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E012D11D; Wed, 27 Sep 2023 00:47:34 -0700 (PDT) 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 Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.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: 13400135 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 020FBE810A5 for ; Wed, 27 Sep 2023 07:48:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230118AbjI0HsD (ORCPT ); Wed, 27 Sep 2023 03:48:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40364 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230115AbjI0Hrg (ORCPT ); Wed, 27 Sep 2023 03:47:36 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1B2731B2; Wed, 27 Sep 2023 00:47:35 -0700 (PDT) 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 Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.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: 13400134 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 56B4BE810A1 for ; Wed, 27 Sep 2023 07:48:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230108AbjI0HsB (ORCPT ); Wed, 27 Sep 2023 03:48:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40354 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230116AbjI0Hrg (ORCPT ); Wed, 27 Sep 2023 03:47:36 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 62A3A198; Wed, 27 Sep 2023 00:47:35 -0700 (PDT) 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 Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.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: 13400136 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 149A0E810DB for ; Wed, 27 Sep 2023 07:48:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230116AbjI0HsC (ORCPT ); Wed, 27 Sep 2023 03:48:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50692 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230118AbjI0Hrh (ORCPT ); Wed, 27 Sep 2023 03:47:37 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 94442BF; Wed, 27 Sep 2023 00:47:35 -0700 (PDT) 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 Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.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: 13400139 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4FF44E7F14E for ; Wed, 27 Sep 2023 07:48:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230195AbjI0HsG (ORCPT ); Wed, 27 Sep 2023 03:48:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40378 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230123AbjI0Hrh (ORCPT ); Wed, 27 Sep 2023 03:47:37 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2001:67c:2178:6::1c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E725F19E; Wed, 27 Sep 2023 00:47:35 -0700 (PDT) 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 Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.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: 13400137 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 891BEE810A3 for ; Wed, 27 Sep 2023 07:48:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230115AbjI0HsE (ORCPT ); Wed, 27 Sep 2023 03:48:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40390 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230117AbjI0Hrh (ORCPT ); Wed, 27 Sep 2023 03:47:37 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 25AC31B3; Wed, 27 Sep 2023 00:47:36 -0700 (PDT) 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 Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.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: 13400138 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 24603E810AF for ; Wed, 27 Sep 2023 07:48:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230196AbjI0HsF (ORCPT ); Wed, 27 Sep 2023 03:48:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43758 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230124AbjI0Hrh (ORCPT ); Wed, 27 Sep 2023 03:47:37 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2001:67c:2178:6::1c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7B06BCC7; Wed, 27 Sep 2023 00:47:36 -0700 (PDT) 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 Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.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: 13400142 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 74CAFE810B1 for ; Wed, 27 Sep 2023 07:48:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230129AbjI0HsK (ORCPT ); Wed, 27 Sep 2023 03:48:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43784 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230046AbjI0Hri (ORCPT ); Wed, 27 Sep 2023 03:47:38 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A1EC0CC8; Wed, 27 Sep 2023 00:47:36 -0700 (PDT) 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 Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.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: 13400141 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3D15CE810B5 for ; Wed, 27 Sep 2023 07:48:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230202AbjI0HsJ (ORCPT ); Wed, 27 Sep 2023 03:48:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43774 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230129AbjI0Hri (ORCPT ); Wed, 27 Sep 2023 03:47:38 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DBDE0192; Wed, 27 Sep 2023 00:47:36 -0700 (PDT) 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 Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.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: 13400143 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 454C6E810B8 for ; Wed, 27 Sep 2023 07:48:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230128AbjI0HsL (ORCPT ); Wed, 27 Sep 2023 03:48:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43792 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230131AbjI0Hri (ORCPT ); Wed, 27 Sep 2023 03:47:38 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2001:67c:2178:6::1c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4602819A; Wed, 27 Sep 2023 00:47:37 -0700 (PDT) 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 Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.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: 13400140 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5527CE80AA6 for ; Wed, 27 Sep 2023 07:48:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230123AbjI0HsI (ORCPT ); Wed, 27 Sep 2023 03:48:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40436 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230128AbjI0Hri (ORCPT ); Wed, 27 Sep 2023 03:47:38 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6822C19F; Wed, 27 Sep 2023 00:47:37 -0700 (PDT) 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 Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.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: 13400144 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 68584E810BC for ; Wed, 27 Sep 2023 07:48:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230211AbjI0HsN (ORCPT ); Wed, 27 Sep 2023 03:48:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50712 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230137AbjI0Hri (ORCPT ); Wed, 27 Sep 2023 03:47:38 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A32841B6; Wed, 27 Sep 2023 00:47:37 -0700 (PDT) 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 Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.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: 13400145 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7684FE80AA7 for ; Wed, 27 Sep 2023 07:48:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230216AbjI0HsO (ORCPT ); Wed, 27 Sep 2023 03:48:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40448 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230138AbjI0Hri (ORCPT ); Wed, 27 Sep 2023 03:47:38 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E4C341A8; Wed, 27 Sep 2023 00:47:37 -0700 (PDT) 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 Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.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: 13400146 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 80A4FE80AAA for ; Wed, 27 Sep 2023 07:48:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230213AbjI0HsQ (ORCPT ); Wed, 27 Sep 2023 03:48:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40468 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230140AbjI0Hrj (ORCPT ); Wed, 27 Sep 2023 03:47:39 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 768541B7; Wed, 27 Sep 2023 00:47:38 -0700 (PDT) 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 Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.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, };