summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Zimmermann <tzimmermann@suse.de>2023-09-27 10:26:34 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-06-12 12:11:56 +0300
commitc00e8fd749502c02085534c60b1edca4fc479c91 (patch)
tree1c601cc31b75811aee69d43512e9c576d3a0ef19
parente79f933ad162925143f49847ec4ac3a624df3e7d (diff)
downloadlinux-c00e8fd749502c02085534c60b1edca4fc479c91.tar.xz
fbdev: Provide I/O-memory helpers as module
[ Upstream commit 6b180f66c0dd6266eeb2f74b59ee79a9f14fe430 ] 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 Stable-dep-of: 01c0cce88c54 ("drm/omapdrm: Fix console with deferred ops") Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r--drivers/video/fbdev/core/Kconfig6
-rw-r--r--drivers/video/fbdev/core/Makefile3
-rw-r--r--drivers/video/fbdev/core/fb_io_fops.c3
3 files changed, 11 insertions, 1 deletions
diff --git a/drivers/video/fbdev/core/Kconfig b/drivers/video/fbdev/core/Kconfig
index 5ac1b0637531..56f721ebcff0 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_SYSMEM_HELPERS
bool
diff --git a/drivers/video/fbdev/core/Makefile b/drivers/video/fbdev/core/Makefile
index edfde2948e5c..d165055ec3fc 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
@@ -26,6 +26,7 @@ endif
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 5985e5e1b040..871b829521af 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");