fbdev: Provide I/O-memory helpers as module
authorThomas Zimmermann <tzimmermann@suse.de>
Wed, 27 Sep 2023 07:26:34 +0000 (09:26 +0200)
committerThomas Zimmermann <tzimmermann@suse.de>
Thu, 19 Oct 2023 07:47:54 +0000 (09:47 +0200)
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 <tzimmermann@suse.de>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230927074722.6197-2-tzimmermann@suse.de
drivers/video/fbdev/core/Kconfig
drivers/video/fbdev/core/Makefile
drivers/video/fbdev/core/fb_io_fops.c

index e80d6429f76ab9505ba0d5500dd418ed04580dc4..6017b7e54ede95574ecb2d569a8ff07b4b988187 100644 (file)
@@ -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
index 36d3156dc759c7cc68daaf1fe36833fd05087ddd..c1d657601b2bec531bee7be4c8c58e16117947d2 100644 (file)
@@ -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
index 5985e5e1b040c186d37a8601725221ffe5de493f..871b829521af356cbb2f203d766e8275ecf7e750 100644 (file)
@@ -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");