* [PATCH 01/46] fbdev: Provide I/O-memory helpers as module
2023-09-27 7:26 [PATCH 00/46] fbdev: Init fb_ops with helpers for I/O memory Thomas Zimmermann
@ 2023-09-27 7:26 ` Thomas Zimmermann
2023-10-18 8:16 ` Javier Martinez Canillas
2023-09-27 7:26 ` [PATCH 02/46] fbdev/68328fb: Initialize fb_ops to fbdev I/O-memory helpers Thomas Zimmermann
` (45 subsequent siblings)
46 siblings, 1 reply; 49+ messages in thread
From: Thomas Zimmermann @ 2023-09-27 7:26 UTC (permalink / raw)
To: deller, javierm, sam, arnd, daniel
Cc: linux-fbdev, dri-devel, linux-arm-kernel, linux-nvidia,
linux-omap, linux-parisc, Thomas Zimmermann
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>
---
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");
--
2.42.0
^ permalink raw reply related [flat|nested] 49+ messages in thread* Re: [PATCH 01/46] fbdev: Provide I/O-memory helpers as module
2023-09-27 7:26 ` [PATCH 01/46] fbdev: Provide I/O-memory helpers as module Thomas Zimmermann
@ 2023-10-18 8:16 ` Javier Martinez Canillas
0 siblings, 0 replies; 49+ messages in thread
From: Javier Martinez Canillas @ 2023-10-18 8:16 UTC (permalink / raw)
To: Thomas Zimmermann, deller, sam, arnd, daniel
Cc: linux-fbdev, dri-devel, linux-arm-kernel, linux-nvidia,
linux-omap, linux-parisc, Thomas Zimmermann
Hello Thomas,
Thomas Zimmermann <tzimmermann@suse.de> writes:
> 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>
> ---
The patch looks good to me.
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
--
Best regards,
Javier Martinez Canillas
Core Platforms
Red Hat
^ permalink raw reply [flat|nested] 49+ messages in thread
* [PATCH 02/46] fbdev/68328fb: Initialize fb_ops to fbdev I/O-memory helpers
2023-09-27 7:26 [PATCH 00/46] fbdev: Init fb_ops with helpers for I/O memory Thomas Zimmermann
2023-09-27 7:26 ` [PATCH 01/46] fbdev: Provide I/O-memory helpers as module Thomas Zimmermann
@ 2023-09-27 7:26 ` Thomas Zimmermann
2023-09-27 7:26 ` [PATCH 03/46] fbdev/amba-clcd: " Thomas Zimmermann
` (44 subsequent siblings)
46 siblings, 0 replies; 49+ messages in thread
From: Thomas Zimmermann @ 2023-09-27 7:26 UTC (permalink / raw)
To: deller, javierm, sam, arnd, daniel
Cc: linux-fbdev, dri-devel, linux-arm-kernel, linux-nvidia,
linux-omap, linux-parisc, Thomas Zimmermann
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 <tzimmermann@suse.de>
---
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.
--
2.42.0
^ permalink raw reply related [flat|nested] 49+ messages in thread* [PATCH 03/46] fbdev/amba-clcd: Initialize fb_ops to fbdev I/O-memory helpers
2023-09-27 7:26 [PATCH 00/46] fbdev: Init fb_ops with helpers for I/O memory Thomas Zimmermann
2023-09-27 7:26 ` [PATCH 01/46] fbdev: Provide I/O-memory helpers as module Thomas Zimmermann
2023-09-27 7:26 ` [PATCH 02/46] fbdev/68328fb: Initialize fb_ops to fbdev I/O-memory helpers Thomas Zimmermann
@ 2023-09-27 7:26 ` Thomas Zimmermann
2023-09-27 7:26 ` [PATCH 04/46] fbdev/amifb: " Thomas Zimmermann
` (43 subsequent siblings)
46 siblings, 0 replies; 49+ messages in thread
From: Thomas Zimmermann @ 2023-09-27 7:26 UTC (permalink / raw)
To: deller, javierm, sam, arnd, daniel
Cc: linux-fbdev, dri-devel, linux-arm-kernel, linux-nvidia,
linux-omap, linux-parisc, Thomas Zimmermann
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 <tzimmermann@suse.de>
---
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,
};
--
2.42.0
^ permalink raw reply related [flat|nested] 49+ messages in thread* [PATCH 04/46] fbdev/amifb: Initialize fb_ops to fbdev I/O-memory helpers
2023-09-27 7:26 [PATCH 00/46] fbdev: Init fb_ops with helpers for I/O memory Thomas Zimmermann
` (2 preceding siblings ...)
2023-09-27 7:26 ` [PATCH 03/46] fbdev/amba-clcd: " Thomas Zimmermann
@ 2023-09-27 7:26 ` Thomas Zimmermann
2023-09-27 7:26 ` [PATCH 05/46] fbdev/arkfb: " Thomas Zimmermann
` (42 subsequent siblings)
46 siblings, 0 replies; 49+ messages in thread
From: Thomas Zimmermann @ 2023-09-27 7:26 UTC (permalink / raw)
To: deller, javierm, sam, arnd, daniel
Cc: linux-fbdev, dri-devel, linux-arm-kernel, linux-nvidia,
linux-omap, linux-parisc, Thomas Zimmermann
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 <tzimmermann@suse.de>
---
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,
};
--
2.42.0
^ permalink raw reply related [flat|nested] 49+ messages in thread* [PATCH 05/46] fbdev/arkfb: Initialize fb_ops to fbdev I/O-memory helpers
2023-09-27 7:26 [PATCH 00/46] fbdev: Init fb_ops with helpers for I/O memory Thomas Zimmermann
` (3 preceding siblings ...)
2023-09-27 7:26 ` [PATCH 04/46] fbdev/amifb: " Thomas Zimmermann
@ 2023-09-27 7:26 ` Thomas Zimmermann
2023-09-27 7:26 ` [PATCH 06/46] fbdev/atafb: " Thomas Zimmermann
` (41 subsequent siblings)
46 siblings, 0 replies; 49+ messages in thread
From: Thomas Zimmermann @ 2023-09-27 7:26 UTC (permalink / raw)
To: deller, javierm, sam, arnd, daniel
Cc: linux-fbdev, dri-devel, linux-arm-kernel, linux-nvidia,
linux-omap, linux-parisc, Thomas Zimmermann
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 <tzimmermann@suse.de>
---
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,
};
--
2.42.0
^ permalink raw reply related [flat|nested] 49+ messages in thread* [PATCH 06/46] fbdev/atafb: Initialize fb_ops to fbdev I/O-memory helpers
2023-09-27 7:26 [PATCH 00/46] fbdev: Init fb_ops with helpers for I/O memory Thomas Zimmermann
` (4 preceding siblings ...)
2023-09-27 7:26 ` [PATCH 05/46] fbdev/arkfb: " Thomas Zimmermann
@ 2023-09-27 7:26 ` Thomas Zimmermann
2023-09-27 7:26 ` [PATCH 07/46] fbdev/atyfb: " Thomas Zimmermann
` (40 subsequent siblings)
46 siblings, 0 replies; 49+ messages in thread
From: Thomas Zimmermann @ 2023-09-27 7:26 UTC (permalink / raw)
To: deller, javierm, sam, arnd, daniel
Cc: linux-fbdev, dri-devel, linux-arm-kernel, linux-nvidia,
linux-omap, linux-parisc, Thomas Zimmermann
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 <tzimmermann@suse.de>
---
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)
--
2.42.0
^ permalink raw reply related [flat|nested] 49+ messages in thread* [PATCH 07/46] fbdev/atyfb: Initialize fb_ops to fbdev I/O-memory helpers
2023-09-27 7:26 [PATCH 00/46] fbdev: Init fb_ops with helpers for I/O memory Thomas Zimmermann
` (5 preceding siblings ...)
2023-09-27 7:26 ` [PATCH 06/46] fbdev/atafb: " Thomas Zimmermann
@ 2023-09-27 7:26 ` Thomas Zimmermann
2023-09-27 7:26 ` [PATCH 08/46] fbdev/au1100fb: " Thomas Zimmermann
` (39 subsequent siblings)
46 siblings, 0 replies; 49+ messages in thread
From: Thomas Zimmermann @ 2023-09-27 7:26 UTC (permalink / raw)
To: deller, javierm, sam, arnd, daniel
Cc: linux-fbdev, dri-devel, linux-arm-kernel, linux-nvidia,
linux-omap, linux-parisc, Thomas Zimmermann
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 <tzimmermann@suse.de>
---
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,
};
--
2.42.0
^ permalink raw reply related [flat|nested] 49+ messages in thread* [PATCH 08/46] fbdev/au1100fb: Initialize fb_ops to fbdev I/O-memory helpers
2023-09-27 7:26 [PATCH 00/46] fbdev: Init fb_ops with helpers for I/O memory Thomas Zimmermann
` (6 preceding siblings ...)
2023-09-27 7:26 ` [PATCH 07/46] fbdev/atyfb: " Thomas Zimmermann
@ 2023-09-27 7:26 ` Thomas Zimmermann
2023-09-27 7:26 ` [PATCH 09/46] fbdev/cirrusfb: " Thomas Zimmermann
` (38 subsequent siblings)
46 siblings, 0 replies; 49+ messages in thread
From: Thomas Zimmermann @ 2023-09-27 7:26 UTC (permalink / raw)
To: deller, javierm, sam, arnd, daniel
Cc: linux-fbdev, dri-devel, linux-arm-kernel, linux-nvidia,
linux-omap, linux-parisc, Thomas Zimmermann
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 <tzimmermann@suse.de>
---
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,
};
--
2.42.0
^ permalink raw reply related [flat|nested] 49+ messages in thread* [PATCH 09/46] fbdev/cirrusfb: Initialize fb_ops to fbdev I/O-memory helpers
2023-09-27 7:26 [PATCH 00/46] fbdev: Init fb_ops with helpers for I/O memory Thomas Zimmermann
` (7 preceding siblings ...)
2023-09-27 7:26 ` [PATCH 08/46] fbdev/au1100fb: " Thomas Zimmermann
@ 2023-09-27 7:26 ` Thomas Zimmermann
2023-09-27 7:26 ` [PATCH 10/46] fbdev/cobalt-lcd: " Thomas Zimmermann
` (37 subsequent siblings)
46 siblings, 0 replies; 49+ messages in thread
From: Thomas Zimmermann @ 2023-09-27 7:26 UTC (permalink / raw)
To: deller, javierm, sam, arnd, daniel
Cc: linux-fbdev, dri-devel, linux-arm-kernel, linux-nvidia,
linux-omap, linux-parisc, Thomas Zimmermann
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 <tzimmermann@suse.de>
---
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)
--
2.42.0
^ permalink raw reply related [flat|nested] 49+ messages in thread* [PATCH 10/46] fbdev/cobalt-lcd: Initialize fb_ops to fbdev I/O-memory helpers
2023-09-27 7:26 [PATCH 00/46] fbdev: Init fb_ops with helpers for I/O memory Thomas Zimmermann
` (8 preceding siblings ...)
2023-09-27 7:26 ` [PATCH 09/46] fbdev/cirrusfb: " Thomas Zimmermann
@ 2023-09-27 7:26 ` Thomas Zimmermann
2023-09-27 7:26 ` [PATCH 11/46] fbdev/controlfb: " Thomas Zimmermann
` (36 subsequent siblings)
46 siblings, 0 replies; 49+ messages in thread
From: Thomas Zimmermann @ 2023-09-27 7:26 UTC (permalink / raw)
To: deller, javierm, sam, arnd, daniel
Cc: linux-fbdev, dri-devel, linux-arm-kernel, linux-nvidia,
linux-omap, linux-parisc, Thomas Zimmermann
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 <tzimmermann@suse.de>
---
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)
--
2.42.0
^ permalink raw reply related [flat|nested] 49+ messages in thread* [PATCH 11/46] fbdev/controlfb: Initialize fb_ops to fbdev I/O-memory helpers
2023-09-27 7:26 [PATCH 00/46] fbdev: Init fb_ops with helpers for I/O memory Thomas Zimmermann
` (9 preceding siblings ...)
2023-09-27 7:26 ` [PATCH 10/46] fbdev/cobalt-lcd: " Thomas Zimmermann
@ 2023-09-27 7:26 ` Thomas Zimmermann
2023-09-27 7:26 ` [PATCH 12/46] fbdev/cyber2000fb: " Thomas Zimmermann
` (35 subsequent siblings)
46 siblings, 0 replies; 49+ messages in thread
From: Thomas Zimmermann @ 2023-09-27 7:26 UTC (permalink / raw)
To: deller, javierm, sam, arnd, daniel
Cc: linux-fbdev, dri-devel, linux-arm-kernel, linux-nvidia,
linux-omap, linux-parisc, Thomas Zimmermann
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 <tzimmermann@suse.de>
---
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,
};
/*
--
2.42.0
^ permalink raw reply related [flat|nested] 49+ messages in thread* [PATCH 12/46] fbdev/cyber2000fb: Initialize fb_ops to fbdev I/O-memory helpers
2023-09-27 7:26 [PATCH 00/46] fbdev: Init fb_ops with helpers for I/O memory Thomas Zimmermann
` (10 preceding siblings ...)
2023-09-27 7:26 ` [PATCH 11/46] fbdev/controlfb: " Thomas Zimmermann
@ 2023-09-27 7:26 ` Thomas Zimmermann
2023-09-27 7:26 ` [PATCH 13/46] fbdev/dnfb: " Thomas Zimmermann
` (34 subsequent siblings)
46 siblings, 0 replies; 49+ messages in thread
From: Thomas Zimmermann @ 2023-09-27 7:26 UTC (permalink / raw)
To: deller, javierm, sam, arnd, daniel
Cc: linux-fbdev, dri-devel, linux-arm-kernel, linux-nvidia,
linux-omap, linux-parisc, Thomas Zimmermann
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 <tzimmermann@suse.de>
---
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,
};
/*
--
2.42.0
^ permalink raw reply related [flat|nested] 49+ messages in thread* [PATCH 13/46] fbdev/dnfb: Initialize fb_ops to fbdev I/O-memory helpers
2023-09-27 7:26 [PATCH 00/46] fbdev: Init fb_ops with helpers for I/O memory Thomas Zimmermann
` (11 preceding siblings ...)
2023-09-27 7:26 ` [PATCH 12/46] fbdev/cyber2000fb: " Thomas Zimmermann
@ 2023-09-27 7:26 ` Thomas Zimmermann
2023-09-27 7:26 ` [PATCH 14/46] fbdev/ep93xx-fb: " Thomas Zimmermann
` (33 subsequent siblings)
46 siblings, 0 replies; 49+ messages in thread
From: Thomas Zimmermann @ 2023-09-27 7:26 UTC (permalink / raw)
To: deller, javierm, sam, arnd, daniel
Cc: linux-fbdev, dri-devel, linux-arm-kernel, linux-nvidia,
linux-omap, linux-parisc, Thomas Zimmermann
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 <tzimmermann@suse.de>
---
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 = {
--
2.42.0
^ permalink raw reply related [flat|nested] 49+ messages in thread* [PATCH 14/46] fbdev/ep93xx-fb: Initialize fb_ops to fbdev I/O-memory helpers
2023-09-27 7:26 [PATCH 00/46] fbdev: Init fb_ops with helpers for I/O memory Thomas Zimmermann
` (12 preceding siblings ...)
2023-09-27 7:26 ` [PATCH 13/46] fbdev/dnfb: " Thomas Zimmermann
@ 2023-09-27 7:26 ` Thomas Zimmermann
2023-09-27 7:26 ` [PATCH 15/46] fbdev/gbefb: " Thomas Zimmermann
` (32 subsequent siblings)
46 siblings, 0 replies; 49+ messages in thread
From: Thomas Zimmermann @ 2023-09-27 7:26 UTC (permalink / raw)
To: deller, javierm, sam, arnd, daniel
Cc: linux-fbdev, dri-devel, linux-arm-kernel, linux-nvidia,
linux-omap, linux-parisc, Thomas Zimmermann
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 <tzimmermann@suse.de>
---
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,
};
--
2.42.0
^ permalink raw reply related [flat|nested] 49+ messages in thread* [PATCH 15/46] fbdev/gbefb: Initialize fb_ops to fbdev I/O-memory helpers
2023-09-27 7:26 [PATCH 00/46] fbdev: Init fb_ops with helpers for I/O memory Thomas Zimmermann
` (13 preceding siblings ...)
2023-09-27 7:26 ` [PATCH 14/46] fbdev/ep93xx-fb: " Thomas Zimmermann
@ 2023-09-27 7:26 ` Thomas Zimmermann
2023-09-27 7:26 ` [PATCH 16/46] fbdev/hgafb: " Thomas Zimmermann
` (31 subsequent siblings)
46 siblings, 0 replies; 49+ messages in thread
From: Thomas Zimmermann @ 2023-09-27 7:26 UTC (permalink / raw)
To: deller, javierm, sam, arnd, daniel
Cc: linux-fbdev, dri-devel, linux-arm-kernel, linux-nvidia,
linux-omap, linux-parisc, Thomas Zimmermann
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 <tzimmermann@suse.de>
---
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,
};
/*
--
2.42.0
^ permalink raw reply related [flat|nested] 49+ messages in thread* [PATCH 16/46] fbdev/hgafb: Initialize fb_ops to fbdev I/O-memory helpers
2023-09-27 7:26 [PATCH 00/46] fbdev: Init fb_ops with helpers for I/O memory Thomas Zimmermann
` (14 preceding siblings ...)
2023-09-27 7:26 ` [PATCH 15/46] fbdev/gbefb: " Thomas Zimmermann
@ 2023-09-27 7:26 ` Thomas Zimmermann
2023-09-27 7:26 ` [PATCH 17/46] fbdev/hitfb: " Thomas Zimmermann
` (30 subsequent siblings)
46 siblings, 0 replies; 49+ messages in thread
From: Thomas Zimmermann @ 2023-09-27 7:26 UTC (permalink / raw)
To: deller, javierm, sam, arnd, daniel
Cc: linux-fbdev, dri-devel, linux-arm-kernel, linux-nvidia,
linux-omap, linux-parisc, Thomas Zimmermann, Ferenc Bakonyi
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 <tzimmermann@suse.de>
Cc: Ferenc Bakonyi <fero@drama.obuda.kando.hu>
---
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,
};
/* ------------------------------------------------------------------------- *
--
2.42.0
^ permalink raw reply related [flat|nested] 49+ messages in thread* [PATCH 17/46] fbdev/hitfb: Initialize fb_ops to fbdev I/O-memory helpers
2023-09-27 7:26 [PATCH 00/46] fbdev: Init fb_ops with helpers for I/O memory Thomas Zimmermann
` (15 preceding siblings ...)
2023-09-27 7:26 ` [PATCH 16/46] fbdev/hgafb: " Thomas Zimmermann
@ 2023-09-27 7:26 ` Thomas Zimmermann
2023-09-27 7:26 ` [PATCH 18/46] fbdev/hpfb: " Thomas Zimmermann
` (29 subsequent siblings)
46 siblings, 0 replies; 49+ messages in thread
From: Thomas Zimmermann @ 2023-09-27 7:26 UTC (permalink / raw)
To: deller, javierm, sam, arnd, daniel
Cc: linux-fbdev, dri-devel, linux-arm-kernel, linux-nvidia,
linux-omap, linux-parisc, Thomas Zimmermann
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 <tzimmermann@suse.de>
---
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)
--
2.42.0
^ permalink raw reply related [flat|nested] 49+ messages in thread* [PATCH 18/46] fbdev/hpfb: Initialize fb_ops to fbdev I/O-memory helpers
2023-09-27 7:26 [PATCH 00/46] fbdev: Init fb_ops with helpers for I/O memory Thomas Zimmermann
` (16 preceding siblings ...)
2023-09-27 7:26 ` [PATCH 17/46] fbdev/hitfb: " Thomas Zimmermann
@ 2023-09-27 7:26 ` Thomas Zimmermann
2023-09-27 7:26 ` [PATCH 19/46] fbdev/i810fb: " Thomas Zimmermann
` (28 subsequent siblings)
46 siblings, 0 replies; 49+ messages in thread
From: Thomas Zimmermann @ 2023-09-27 7:26 UTC (permalink / raw)
To: deller, javierm, sam, arnd, daniel
Cc: linux-fbdev, dri-devel, linux-arm-kernel, linux-nvidia,
linux-omap, linux-parisc, Thomas Zimmermann
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 <tzimmermann@suse.de>
---
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 */
--
2.42.0
^ permalink raw reply related [flat|nested] 49+ messages in thread* [PATCH 19/46] fbdev/i810fb: Initialize fb_ops to fbdev I/O-memory helpers
2023-09-27 7:26 [PATCH 00/46] fbdev: Init fb_ops with helpers for I/O memory Thomas Zimmermann
` (17 preceding siblings ...)
2023-09-27 7:26 ` [PATCH 18/46] fbdev/hpfb: " Thomas Zimmermann
@ 2023-09-27 7:26 ` Thomas Zimmermann
2023-09-27 7:26 ` [PATCH 20/46] fbdev/imsttfb: " Thomas Zimmermann
` (27 subsequent siblings)
46 siblings, 0 replies; 49+ messages in thread
From: Thomas Zimmermann @ 2023-09-27 7:26 UTC (permalink / raw)
To: deller, javierm, sam, arnd, daniel
Cc: linux-fbdev, dri-devel, linux-arm-kernel, linux-nvidia,
linux-omap, linux-parisc, Thomas Zimmermann, Antonino Daplas
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 <tzimmermann@suse.de>
Cc: Antonino Daplas <adaplas@gmail.com>
---
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,
};
/***********************************************************************
--
2.42.0
^ permalink raw reply related [flat|nested] 49+ messages in thread* [PATCH 20/46] fbdev/imsttfb: Initialize fb_ops to fbdev I/O-memory helpers
2023-09-27 7:26 [PATCH 00/46] fbdev: Init fb_ops with helpers for I/O memory Thomas Zimmermann
` (18 preceding siblings ...)
2023-09-27 7:26 ` [PATCH 19/46] fbdev/i810fb: " Thomas Zimmermann
@ 2023-09-27 7:26 ` Thomas Zimmermann
2023-09-27 7:26 ` [PATCH 21/46] fbdev/intelfb: " Thomas Zimmermann
` (26 subsequent siblings)
46 siblings, 0 replies; 49+ messages in thread
From: Thomas Zimmermann @ 2023-09-27 7:26 UTC (permalink / raw)
To: deller, javierm, sam, arnd, daniel
Cc: linux-fbdev, dri-devel, linux-arm-kernel, linux-nvidia,
linux-omap, linux-parisc, Thomas Zimmermann
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 <tzimmermann@suse.de>
---
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)
--
2.42.0
^ permalink raw reply related [flat|nested] 49+ messages in thread* [PATCH 21/46] fbdev/intelfb: Initialize fb_ops to fbdev I/O-memory helpers
2023-09-27 7:26 [PATCH 00/46] fbdev: Init fb_ops with helpers for I/O memory Thomas Zimmermann
` (19 preceding siblings ...)
2023-09-27 7:26 ` [PATCH 20/46] fbdev/imsttfb: " Thomas Zimmermann
@ 2023-09-27 7:26 ` Thomas Zimmermann
2023-09-27 7:26 ` [PATCH 22/46] fbdev/matroxfb: " Thomas Zimmermann
` (25 subsequent siblings)
46 siblings, 0 replies; 49+ messages in thread
From: Thomas Zimmermann @ 2023-09-27 7:26 UTC (permalink / raw)
To: deller, javierm, sam, arnd, daniel
Cc: linux-fbdev, dri-devel, linux-arm-kernel, linux-nvidia,
linux-omap, linux-parisc, Thomas Zimmermann, Maik Broemme
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 <tzimmermann@suse.de>
Cc: Maik Broemme <mbroemme@libmpq.org>
---
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 */
--
2.42.0
^ permalink raw reply related [flat|nested] 49+ messages in thread* [PATCH 22/46] fbdev/matroxfb: Initialize fb_ops to fbdev I/O-memory helpers
2023-09-27 7:26 [PATCH 00/46] fbdev: Init fb_ops with helpers for I/O memory Thomas Zimmermann
` (20 preceding siblings ...)
2023-09-27 7:26 ` [PATCH 21/46] fbdev/intelfb: " Thomas Zimmermann
@ 2023-09-27 7:26 ` Thomas Zimmermann
2023-09-27 7:26 ` [PATCH 23/46] fbdev/neofb: " Thomas Zimmermann
` (24 subsequent siblings)
46 siblings, 0 replies; 49+ messages in thread
From: Thomas Zimmermann @ 2023-09-27 7:26 UTC (permalink / raw)
To: deller, javierm, sam, arnd, daniel
Cc: linux-fbdev, dri-devel, linux-arm-kernel, linux-nvidia,
linux-omap, linux-parisc, Thomas Zimmermann
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 <tzimmermann@suse.de>
---
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 = <set by matrox_cfbX_init>, */
/* .fb_imageblit = <set by matrox_cfbX_init>, */
/* .fb_cursor = <set by matrox_cfbX_init>, */
+ __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 = {
--
2.42.0
^ permalink raw reply related [flat|nested] 49+ messages in thread* [PATCH 23/46] fbdev/neofb: Initialize fb_ops to fbdev I/O-memory helpers
2023-09-27 7:26 [PATCH 00/46] fbdev: Init fb_ops with helpers for I/O memory Thomas Zimmermann
` (21 preceding siblings ...)
2023-09-27 7:26 ` [PATCH 22/46] fbdev/matroxfb: " Thomas Zimmermann
@ 2023-09-27 7:26 ` Thomas Zimmermann
2023-09-27 7:26 ` [PATCH 24/46] fbdev/nvidiafb: " Thomas Zimmermann
` (23 subsequent siblings)
46 siblings, 0 replies; 49+ messages in thread
From: Thomas Zimmermann @ 2023-09-27 7:26 UTC (permalink / raw)
To: deller, javierm, sam, arnd, daniel
Cc: linux-fbdev, dri-devel, linux-arm-kernel, linux-nvidia,
linux-omap, linux-parisc, Thomas Zimmermann
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 <tzimmermann@suse.de>
---
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,
};
/* --------------------------------------------------------------------- */
--
2.42.0
^ permalink raw reply related [flat|nested] 49+ messages in thread* [PATCH 24/46] fbdev/nvidiafb: Initialize fb_ops to fbdev I/O-memory helpers
2023-09-27 7:26 [PATCH 00/46] fbdev: Init fb_ops with helpers for I/O memory Thomas Zimmermann
` (22 preceding siblings ...)
2023-09-27 7:26 ` [PATCH 23/46] fbdev/neofb: " Thomas Zimmermann
@ 2023-09-27 7:26 ` Thomas Zimmermann
2023-09-27 7:26 ` [PATCH 25/46] fbdev/omapfb: " Thomas Zimmermann
` (22 subsequent siblings)
46 siblings, 0 replies; 49+ messages in thread
From: Thomas Zimmermann @ 2023-09-27 7:26 UTC (permalink / raw)
To: deller, javierm, sam, arnd, daniel
Cc: linux-fbdev, dri-devel, linux-arm-kernel, linux-nvidia,
linux-omap, linux-parisc, Thomas Zimmermann, Antonino Daplas
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 <tzimmermann@suse.de>
Cc: Antonino Daplas <adaplas@gmail.com>
---
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)
--
2.42.0
^ permalink raw reply related [flat|nested] 49+ messages in thread* [PATCH 25/46] fbdev/omapfb: Initialize fb_ops to fbdev I/O-memory helpers
2023-09-27 7:26 [PATCH 00/46] fbdev: Init fb_ops with helpers for I/O memory Thomas Zimmermann
` (23 preceding siblings ...)
2023-09-27 7:26 ` [PATCH 24/46] fbdev/nvidiafb: " Thomas Zimmermann
@ 2023-09-27 7:26 ` Thomas Zimmermann
2023-09-27 7:26 ` [PATCH 26/46] fbdev/pm2fb: " Thomas Zimmermann
` (21 subsequent siblings)
46 siblings, 0 replies; 49+ messages in thread
From: Thomas Zimmermann @ 2023-09-27 7:26 UTC (permalink / raw)
To: deller, javierm, sam, arnd, daniel
Cc: linux-fbdev, dri-devel, linux-arm-kernel, linux-nvidia,
linux-omap, linux-parisc, Thomas Zimmermann
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 <tzimmermann@suse.de>
---
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,
--
2.42.0
^ permalink raw reply related [flat|nested] 49+ messages in thread* [PATCH 26/46] fbdev/pm2fb: Initialize fb_ops to fbdev I/O-memory helpers
2023-09-27 7:26 [PATCH 00/46] fbdev: Init fb_ops with helpers for I/O memory Thomas Zimmermann
` (24 preceding siblings ...)
2023-09-27 7:26 ` [PATCH 25/46] fbdev/omapfb: " Thomas Zimmermann
@ 2023-09-27 7:26 ` Thomas Zimmermann
2023-09-27 7:27 ` [PATCH 27/46] fbdev/pm3fb: " Thomas Zimmermann
` (20 subsequent siblings)
46 siblings, 0 replies; 49+ messages in thread
From: Thomas Zimmermann @ 2023-09-27 7:26 UTC (permalink / raw)
To: deller, javierm, sam, arnd, daniel
Cc: linux-fbdev, dri-devel, linux-arm-kernel, linux-nvidia,
linux-omap, linux-parisc, Thomas Zimmermann
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 <tzimmermann@suse.de>
---
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,
};
/*
--
2.42.0
^ permalink raw reply related [flat|nested] 49+ messages in thread* [PATCH 27/46] fbdev/pm3fb: Initialize fb_ops to fbdev I/O-memory helpers
2023-09-27 7:26 [PATCH 00/46] fbdev: Init fb_ops with helpers for I/O memory Thomas Zimmermann
` (25 preceding siblings ...)
2023-09-27 7:26 ` [PATCH 26/46] fbdev/pm2fb: " Thomas Zimmermann
@ 2023-09-27 7:27 ` Thomas Zimmermann
2023-09-27 7:27 ` [PATCH 28/46] fbdev/pvr2fb: " Thomas Zimmermann
` (19 subsequent siblings)
46 siblings, 0 replies; 49+ messages in thread
From: Thomas Zimmermann @ 2023-09-27 7:27 UTC (permalink / raw)
To: deller, javierm, sam, arnd, daniel
Cc: linux-fbdev, dri-devel, linux-arm-kernel, linux-nvidia,
linux-omap, linux-parisc, Thomas Zimmermann
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 <tzimmermann@suse.de>
---
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,
};
/* ------------------------------------------------------------------------- */
--
2.42.0
^ permalink raw reply related [flat|nested] 49+ messages in thread* [PATCH 28/46] fbdev/pvr2fb: Initialize fb_ops to fbdev I/O-memory helpers
2023-09-27 7:26 [PATCH 00/46] fbdev: Init fb_ops with helpers for I/O memory Thomas Zimmermann
` (26 preceding siblings ...)
2023-09-27 7:27 ` [PATCH 27/46] fbdev/pm3fb: " Thomas Zimmermann
@ 2023-09-27 7:27 ` Thomas Zimmermann
2023-09-27 7:27 ` [PATCH 29/46] fbdev/radeon: " Thomas Zimmermann
` (18 subsequent siblings)
46 siblings, 0 replies; 49+ messages in thread
From: Thomas Zimmermann @ 2023-09-27 7:27 UTC (permalink / raw)
To: deller, javierm, sam, arnd, daniel
Cc: linux-fbdev, dri-devel, linux-arm-kernel, linux-nvidia,
linux-omap, linux-parisc, Thomas Zimmermann
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 <tzimmermann@suse.de>
---
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
--
2.42.0
^ permalink raw reply related [flat|nested] 49+ messages in thread* [PATCH 29/46] fbdev/radeon: Initialize fb_ops to fbdev I/O-memory helpers
2023-09-27 7:26 [PATCH 00/46] fbdev: Init fb_ops with helpers for I/O memory Thomas Zimmermann
` (27 preceding siblings ...)
2023-09-27 7:27 ` [PATCH 28/46] fbdev/pvr2fb: " Thomas Zimmermann
@ 2023-09-27 7:27 ` Thomas Zimmermann
2023-09-27 7:27 ` [PATCH 30/46] fbdev/rivafb: " Thomas Zimmermann
` (17 subsequent siblings)
46 siblings, 0 replies; 49+ messages in thread
From: Thomas Zimmermann @ 2023-09-27 7:27 UTC (permalink / raw)
To: deller, javierm, sam, arnd, daniel
Cc: linux-fbdev, dri-devel, linux-arm-kernel, linux-nvidia,
linux-omap, linux-parisc, Thomas Zimmermann,
Benjamin Herrenschmidt
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 <tzimmermann@suse.de>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---
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,
};
--
2.42.0
^ permalink raw reply related [flat|nested] 49+ messages in thread* [PATCH 30/46] fbdev/rivafb: Initialize fb_ops to fbdev I/O-memory helpers
2023-09-27 7:26 [PATCH 00/46] fbdev: Init fb_ops with helpers for I/O memory Thomas Zimmermann
` (28 preceding siblings ...)
2023-09-27 7:27 ` [PATCH 29/46] fbdev/radeon: " Thomas Zimmermann
@ 2023-09-27 7:27 ` Thomas Zimmermann
2023-09-27 7:27 ` [PATCH 31/46] fbdev/s1d13xxxfb: " Thomas Zimmermann
` (16 subsequent siblings)
46 siblings, 0 replies; 49+ messages in thread
From: Thomas Zimmermann @ 2023-09-27 7:27 UTC (permalink / raw)
To: deller, javierm, sam, arnd, daniel
Cc: linux-fbdev, dri-devel, linux-arm-kernel, linux-nvidia,
linux-omap, linux-parisc, Thomas Zimmermann, Antonino Daplas
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 <tzimmermann@suse.de>
Cc: Antonino Daplas <adaplas@gmail.com>
---
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)
--
2.42.0
^ permalink raw reply related [flat|nested] 49+ messages in thread* [PATCH 31/46] fbdev/s1d13xxxfb: Initialize fb_ops to fbdev I/O-memory helpers
2023-09-27 7:26 [PATCH 00/46] fbdev: Init fb_ops with helpers for I/O memory Thomas Zimmermann
` (29 preceding siblings ...)
2023-09-27 7:27 ` [PATCH 30/46] fbdev/rivafb: " Thomas Zimmermann
@ 2023-09-27 7:27 ` Thomas Zimmermann
2023-09-27 7:27 ` [PATCH 32/46] fbdev/s3fb: " Thomas Zimmermann
` (15 subsequent siblings)
46 siblings, 0 replies; 49+ messages in thread
From: Thomas Zimmermann @ 2023-09-27 7:27 UTC (permalink / raw)
To: deller, javierm, sam, arnd, daniel
Cc: linux-fbdev, dri-devel, linux-arm-kernel, linux-nvidia,
linux-omap, linux-parisc, Thomas Zimmermann, Kristoffer Ericson
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 <tzimmermann@suse.de>
Cc: Kristoffer Ericson <kristoffer.ericson@gmail.com>
---
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;
}
--
2.42.0
^ permalink raw reply related [flat|nested] 49+ messages in thread* [PATCH 32/46] fbdev/s3fb: Initialize fb_ops to fbdev I/O-memory helpers
2023-09-27 7:26 [PATCH 00/46] fbdev: Init fb_ops with helpers for I/O memory Thomas Zimmermann
` (30 preceding siblings ...)
2023-09-27 7:27 ` [PATCH 31/46] fbdev/s1d13xxxfb: " Thomas Zimmermann
@ 2023-09-27 7:27 ` Thomas Zimmermann
2023-09-27 7:27 ` [PATCH 33/46] fbdev/sa1100fb: " Thomas Zimmermann
` (14 subsequent siblings)
46 siblings, 0 replies; 49+ messages in thread
From: Thomas Zimmermann @ 2023-09-27 7:27 UTC (permalink / raw)
To: deller, javierm, sam, arnd, daniel
Cc: linux-fbdev, dri-devel, linux-arm-kernel, linux-nvidia,
linux-omap, linux-parisc, Thomas Zimmermann
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 <tzimmermann@suse.de>
---
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,
};
--
2.42.0
^ permalink raw reply related [flat|nested] 49+ messages in thread* [PATCH 33/46] fbdev/sa1100fb: Initialize fb_ops to fbdev I/O-memory helpers
2023-09-27 7:26 [PATCH 00/46] fbdev: Init fb_ops with helpers for I/O memory Thomas Zimmermann
` (31 preceding siblings ...)
2023-09-27 7:27 ` [PATCH 32/46] fbdev/s3fb: " Thomas Zimmermann
@ 2023-09-27 7:27 ` Thomas Zimmermann
2023-09-27 7:27 ` [PATCH 34/46] fbdev/savagefb: " Thomas Zimmermann
` (13 subsequent siblings)
46 siblings, 0 replies; 49+ messages in thread
From: Thomas Zimmermann @ 2023-09-27 7:27 UTC (permalink / raw)
To: deller, javierm, sam, arnd, daniel
Cc: linux-fbdev, dri-devel, linux-arm-kernel, linux-nvidia,
linux-omap, linux-parisc, Thomas Zimmermann
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 <tzimmermann@suse.de>
---
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 <http://www.linux-fbdev.org/> 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,
};
--
2.42.0
^ permalink raw reply related [flat|nested] 49+ messages in thread* [PATCH 34/46] fbdev/savagefb: Initialize fb_ops to fbdev I/O-memory helpers
2023-09-27 7:26 [PATCH 00/46] fbdev: Init fb_ops with helpers for I/O memory Thomas Zimmermann
` (32 preceding siblings ...)
2023-09-27 7:27 ` [PATCH 33/46] fbdev/sa1100fb: " Thomas Zimmermann
@ 2023-09-27 7:27 ` Thomas Zimmermann
2023-09-27 7:27 ` [PATCH 35/46] fbdev/sisfb: " Thomas Zimmermann
` (12 subsequent siblings)
46 siblings, 0 replies; 49+ messages in thread
From: Thomas Zimmermann @ 2023-09-27 7:27 UTC (permalink / raw)
To: deller, javierm, sam, arnd, daniel
Cc: linux-fbdev, dri-devel, linux-arm-kernel, linux-nvidia,
linux-omap, linux-parisc, Thomas Zimmermann, Antonino Daplas
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 <tzimmermann@suse.de>
Cc: Antonino Daplas <adaplas@gmail.com>
---
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,
};
/* --------------------------------------------------------------------- */
--
2.42.0
^ permalink raw reply related [flat|nested] 49+ messages in thread* [PATCH 35/46] fbdev/sisfb: Initialize fb_ops to fbdev I/O-memory helpers
2023-09-27 7:26 [PATCH 00/46] fbdev: Init fb_ops with helpers for I/O memory Thomas Zimmermann
` (33 preceding siblings ...)
2023-09-27 7:27 ` [PATCH 34/46] fbdev/savagefb: " Thomas Zimmermann
@ 2023-09-27 7:27 ` Thomas Zimmermann
2023-09-27 7:27 ` [PATCH 36/46] fbdev/sm501fb: " Thomas Zimmermann
` (11 subsequent siblings)
46 siblings, 0 replies; 49+ messages in thread
From: Thomas Zimmermann @ 2023-09-27 7:27 UTC (permalink / raw)
To: deller, javierm, sam, arnd, daniel
Cc: linux-fbdev, dri-devel, linux-arm-kernel, linux-nvidia,
linux-omap, linux-parisc, Thomas Zimmermann
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 <tzimmermann@suse.de>
---
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 ---------------- */
--
2.42.0
^ permalink raw reply related [flat|nested] 49+ messages in thread* [PATCH 36/46] fbdev/sm501fb: Initialize fb_ops to fbdev I/O-memory helpers
2023-09-27 7:26 [PATCH 00/46] fbdev: Init fb_ops with helpers for I/O memory Thomas Zimmermann
` (34 preceding siblings ...)
2023-09-27 7:27 ` [PATCH 35/46] fbdev/sisfb: " Thomas Zimmermann
@ 2023-09-27 7:27 ` Thomas Zimmermann
2023-09-27 7:27 ` [PATCH 37/46] fbdev/sm712fb: " Thomas Zimmermann
` (10 subsequent siblings)
46 siblings, 0 replies; 49+ messages in thread
From: Thomas Zimmermann @ 2023-09-27 7:27 UTC (permalink / raw)
To: deller, javierm, sam, arnd, daniel
Cc: linux-fbdev, dri-devel, linux-arm-kernel, linux-nvidia,
linux-omap, linux-parisc, Thomas Zimmermann
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 <tzimmermann@suse.de>
---
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
--
2.42.0
^ permalink raw reply related [flat|nested] 49+ messages in thread* [PATCH 37/46] fbdev/sm712fb: Initialize fb_ops to fbdev I/O-memory helpers
2023-09-27 7:26 [PATCH 00/46] fbdev: Init fb_ops with helpers for I/O memory Thomas Zimmermann
` (35 preceding siblings ...)
2023-09-27 7:27 ` [PATCH 36/46] fbdev/sm501fb: " Thomas Zimmermann
@ 2023-09-27 7:27 ` Thomas Zimmermann
2023-09-27 7:27 ` [PATCH 38/46] fbdev/stifb: " Thomas Zimmermann
` (9 subsequent siblings)
46 siblings, 0 replies; 49+ messages in thread
From: Thomas Zimmermann @ 2023-09-27 7:27 UTC (permalink / raw)
To: deller, javierm, sam, arnd, daniel
Cc: linux-fbdev, dri-devel, linux-arm-kernel, linux-nvidia,
linux-omap, linux-parisc, Thomas Zimmermann, Sudip Mukherjee,
Teddy Wang
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 <tzimmermann@suse.de>
Cc: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Cc: Teddy Wang <teddy.wang@siliconmotion.com>
---
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,
--
2.42.0
^ permalink raw reply related [flat|nested] 49+ messages in thread* [PATCH 38/46] fbdev/stifb: Initialize fb_ops to fbdev I/O-memory helpers
2023-09-27 7:26 [PATCH 00/46] fbdev: Init fb_ops with helpers for I/O memory Thomas Zimmermann
` (36 preceding siblings ...)
2023-09-27 7:27 ` [PATCH 37/46] fbdev/sm712fb: " Thomas Zimmermann
@ 2023-09-27 7:27 ` Thomas Zimmermann
2023-09-27 7:27 ` [PATCH 39/46] fbdev/sunxvr500: " Thomas Zimmermann
` (8 subsequent siblings)
46 siblings, 0 replies; 49+ messages in thread
From: Thomas Zimmermann @ 2023-09-27 7:27 UTC (permalink / raw)
To: deller, javierm, sam, arnd, daniel
Cc: linux-fbdev, dri-devel, linux-arm-kernel, linux-nvidia,
linux-omap, linux-parisc, Thomas Zimmermann, James E.J. Bottomley
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 <tzimmermann@suse.de>
Cc: "James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>
---
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,
};
--
2.42.0
^ permalink raw reply related [flat|nested] 49+ messages in thread* [PATCH 39/46] fbdev/sunxvr500: Initialize fb_ops to fbdev I/O-memory helpers
2023-09-27 7:26 [PATCH 00/46] fbdev: Init fb_ops with helpers for I/O memory Thomas Zimmermann
` (37 preceding siblings ...)
2023-09-27 7:27 ` [PATCH 38/46] fbdev/stifb: " Thomas Zimmermann
@ 2023-09-27 7:27 ` Thomas Zimmermann
2023-09-27 7:27 ` [PATCH 40/46] fbdev/tdfxfb: " Thomas Zimmermann
` (7 subsequent siblings)
46 siblings, 0 replies; 49+ messages in thread
From: Thomas Zimmermann @ 2023-09-27 7:27 UTC (permalink / raw)
To: deller, javierm, sam, arnd, daniel
Cc: linux-fbdev, dri-devel, linux-arm-kernel, linux-nvidia,
linux-omap, linux-parisc, Thomas Zimmermann
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 <tzimmermann@suse.de>
---
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)
--
2.42.0
^ permalink raw reply related [flat|nested] 49+ messages in thread* [PATCH 40/46] fbdev/tdfxfb: Initialize fb_ops to fbdev I/O-memory helpers
2023-09-27 7:26 [PATCH 00/46] fbdev: Init fb_ops with helpers for I/O memory Thomas Zimmermann
` (38 preceding siblings ...)
2023-09-27 7:27 ` [PATCH 39/46] fbdev/sunxvr500: " Thomas Zimmermann
@ 2023-09-27 7:27 ` Thomas Zimmermann
2023-09-27 7:27 ` [PATCH 41/46] fbdev/tgafb: " Thomas Zimmermann
` (6 subsequent siblings)
46 siblings, 0 replies; 49+ messages in thread
From: Thomas Zimmermann @ 2023-09-27 7:27 UTC (permalink / raw)
To: deller, javierm, sam, arnd, daniel
Cc: linux-fbdev, dri-devel, linux-arm-kernel, linux-nvidia,
linux-omap, linux-parisc, Thomas Zimmermann
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 <tzimmermann@suse.de>
---
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
--
2.42.0
^ permalink raw reply related [flat|nested] 49+ messages in thread* [PATCH 41/46] fbdev/tgafb: Initialize fb_ops to fbdev I/O-memory helpers
2023-09-27 7:26 [PATCH 00/46] fbdev: Init fb_ops with helpers for I/O memory Thomas Zimmermann
` (39 preceding siblings ...)
2023-09-27 7:27 ` [PATCH 40/46] fbdev/tdfxfb: " Thomas Zimmermann
@ 2023-09-27 7:27 ` Thomas Zimmermann
2023-09-27 7:27 ` [PATCH 42/46] fbdev/tridentfb: " Thomas Zimmermann
` (5 subsequent siblings)
46 siblings, 0 replies; 49+ messages in thread
From: Thomas Zimmermann @ 2023-09-27 7:27 UTC (permalink / raw)
To: deller, javierm, sam, arnd, daniel
Cc: linux-fbdev, dri-devel, linux-arm-kernel, linux-nvidia,
linux-omap, linux-parisc, Thomas Zimmermann
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 <tzimmermann@suse.de>
---
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,
};
--
2.42.0
^ permalink raw reply related [flat|nested] 49+ messages in thread* [PATCH 42/46] fbdev/tridentfb: Initialize fb_ops to fbdev I/O-memory helpers
2023-09-27 7:26 [PATCH 00/46] fbdev: Init fb_ops with helpers for I/O memory Thomas Zimmermann
` (40 preceding siblings ...)
2023-09-27 7:27 ` [PATCH 41/46] fbdev/tgafb: " Thomas Zimmermann
@ 2023-09-27 7:27 ` Thomas Zimmermann
2023-09-27 7:27 ` [PATCH 43/46] fbdev/vermilionfb: " Thomas Zimmermann
` (4 subsequent siblings)
46 siblings, 0 replies; 49+ messages in thread
From: Thomas Zimmermann @ 2023-09-27 7:27 UTC (permalink / raw)
To: deller, javierm, sam, arnd, daniel
Cc: linux-fbdev, dri-devel, linux-arm-kernel, linux-nvidia,
linux-omap, linux-parisc, Thomas Zimmermann
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 <tzimmermann@suse.de>
---
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,
--
2.42.0
^ permalink raw reply related [flat|nested] 49+ messages in thread* [PATCH 43/46] fbdev/vermilionfb: Initialize fb_ops to fbdev I/O-memory helpers
2023-09-27 7:26 [PATCH 00/46] fbdev: Init fb_ops with helpers for I/O memory Thomas Zimmermann
` (41 preceding siblings ...)
2023-09-27 7:27 ` [PATCH 42/46] fbdev/tridentfb: " Thomas Zimmermann
@ 2023-09-27 7:27 ` Thomas Zimmermann
2023-09-27 7:27 ` [PATCH 44/46] fbdev/vga16fb: " Thomas Zimmermann
` (3 subsequent siblings)
46 siblings, 0 replies; 49+ messages in thread
From: Thomas Zimmermann @ 2023-09-27 7:27 UTC (permalink / raw)
To: deller, javierm, sam, arnd, daniel
Cc: linux-fbdev, dri-devel, linux-arm-kernel, linux-nvidia,
linux-omap, linux-parisc, Thomas Zimmermann
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 <tzimmermann@suse.de>
---
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,
--
2.42.0
^ permalink raw reply related [flat|nested] 49+ messages in thread* [PATCH 44/46] fbdev/vga16fb: Initialize fb_ops to fbdev I/O-memory helpers
2023-09-27 7:26 [PATCH 00/46] fbdev: Init fb_ops with helpers for I/O memory Thomas Zimmermann
` (42 preceding siblings ...)
2023-09-27 7:27 ` [PATCH 43/46] fbdev/vermilionfb: " Thomas Zimmermann
@ 2023-09-27 7:27 ` Thomas Zimmermann
2023-09-27 7:27 ` [PATCH 45/46] fbdev/viafb: " Thomas Zimmermann
` (2 subsequent siblings)
46 siblings, 0 replies; 49+ messages in thread
From: Thomas Zimmermann @ 2023-09-27 7:27 UTC (permalink / raw)
To: deller, javierm, sam, arnd, daniel
Cc: linux-fbdev, dri-devel, linux-arm-kernel, linux-nvidia,
linux-omap, linux-parisc, Thomas Zimmermann
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 <tzimmermann@suse.de>
---
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)
--
2.42.0
^ permalink raw reply related [flat|nested] 49+ messages in thread* [PATCH 45/46] fbdev/viafb: Initialize fb_ops to fbdev I/O-memory helpers
2023-09-27 7:26 [PATCH 00/46] fbdev: Init fb_ops with helpers for I/O memory Thomas Zimmermann
` (43 preceding siblings ...)
2023-09-27 7:27 ` [PATCH 44/46] fbdev/vga16fb: " Thomas Zimmermann
@ 2023-09-27 7:27 ` Thomas Zimmermann
2023-09-27 7:27 ` [PATCH 46/46] fbdev/vt8623fb: " Thomas Zimmermann
2023-10-18 8:25 ` [PATCH 00/46] fbdev: Init fb_ops with helpers for I/O memory Javier Martinez Canillas
46 siblings, 0 replies; 49+ messages in thread
From: Thomas Zimmermann @ 2023-09-27 7:27 UTC (permalink / raw)
To: deller, javierm, sam, arnd, daniel
Cc: linux-fbdev, dri-devel, linux-arm-kernel, linux-nvidia,
linux-omap, linux-parisc, Thomas Zimmermann,
Florian Tobias Schandinat
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 <tzimmermann@suse.de>
Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
---
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,
};
--
2.42.0
^ permalink raw reply related [flat|nested] 49+ messages in thread* [PATCH 46/46] fbdev/vt8623fb: Initialize fb_ops to fbdev I/O-memory helpers
2023-09-27 7:26 [PATCH 00/46] fbdev: Init fb_ops with helpers for I/O memory Thomas Zimmermann
` (44 preceding siblings ...)
2023-09-27 7:27 ` [PATCH 45/46] fbdev/viafb: " Thomas Zimmermann
@ 2023-09-27 7:27 ` Thomas Zimmermann
2023-10-18 8:25 ` [PATCH 00/46] fbdev: Init fb_ops with helpers for I/O memory Javier Martinez Canillas
46 siblings, 0 replies; 49+ messages in thread
From: Thomas Zimmermann @ 2023-09-27 7:27 UTC (permalink / raw)
To: deller, javierm, sam, arnd, daniel
Cc: linux-fbdev, dri-devel, linux-arm-kernel, linux-nvidia,
linux-omap, linux-parisc, Thomas Zimmermann
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 <tzimmermann@suse.de>
---
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,
};
--
2.42.0
^ permalink raw reply related [flat|nested] 49+ messages in thread* Re: [PATCH 00/46] fbdev: Init fb_ops with helpers for I/O memory
2023-09-27 7:26 [PATCH 00/46] fbdev: Init fb_ops with helpers for I/O memory Thomas Zimmermann
` (45 preceding siblings ...)
2023-09-27 7:27 ` [PATCH 46/46] fbdev/vt8623fb: " Thomas Zimmermann
@ 2023-10-18 8:25 ` Javier Martinez Canillas
46 siblings, 0 replies; 49+ messages in thread
From: Javier Martinez Canillas @ 2023-10-18 8:25 UTC (permalink / raw)
To: Thomas Zimmermann, deller, sam, arnd, daniel
Cc: linux-fbdev, dri-devel, linux-arm-kernel, linux-nvidia,
linux-omap, linux-parisc, Thomas Zimmermann
Thomas Zimmermann <tzimmermann@suse.de> writes:
> Initialize struct fb_ops for drivers for hardware with framebuffers
> in I/O-memory ranges with the respective helper macros. Also select
> the appropriate Kconfig dependencies.
>
> The patchset is part of a larger effort to modularize the fbdev core
> and make it more adaptable. Most of these drivers do not initialize
> the fb_read, fb_write and fb_mmap callbacks in fb_ops. By leaving the
> callback pointers to NULL, they rely on the fbdev core to invoke the
> I/O-memory helpers by default. This default makes it impossible to
> remove the I/O-memory helpers on systems that don't need them. Setting
> the pointers explicitly will allow for the removal of the default. If
> a callback in fb_ops is unset, the operation will then be unsupported.
>
> Initializing struct fb_ops via helpers macros will also allow for a
> fine-grained setup, depending on Kconfig options. For example, it
> will be possible to leave out file I/O if FB_DEVICE has not been
> set.
>
> This patchset contains the majority of fbdev driver work. The updated
> drivers now initialize fb_ops with __FB_DEFAULT_IOMEM_OPS_RDWR,
> __FB_DEFAULT_IOMEM_OPS_DRAW and/or __FB_DEFAULT_IOMEM_OPS_MMAP if
> possible. Some drivers now use FB_DEFAULT_IOMEM_OPS, which sets all
> fields correctly. In Kconfig, each driver selects FB_IOMEM_FOPS to
> get the helpers for I/O memory. Drivers that use _RDWR, _DRAW and
> _MMAP unconditionally select FB_IOMEM_HELPERS, which selects the
> correct modules automatically.
>
I looked to all the driver changes as well and couldn't spot any issues.
For all the driver patches:
Acked-by: Javier Martinez Canillas <javierm@redhat.com>
--
Best regards,
Javier Martinez Canillas
Core Platforms
Red Hat
^ permalink raw reply [flat|nested] 49+ messages in thread