Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

fbdev/i810fb: Initialize fb_ops to fbdev I/O-memory helpers

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>
Acked-by: Javier Martinez Canillas <javierm@redhat.com>
Cc: Antonino Daplas <adaplas@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230927074722.6197-20-tzimmermann@suse.de

+3 -3
+1 -3
drivers/video/fbdev/Kconfig
··· 793 793 config FB_I810 794 794 tristate "Intel 810/815 support" 795 795 depends on FB && PCI && X86_32 && AGP_INTEL 796 + select FB_IOMEM_FOPS 796 797 select FB_MODE_HELPERS 797 - select FB_CFB_FILLRECT 798 - select FB_CFB_COPYAREA 799 - select FB_CFB_IMAGEBLIT 800 798 select VGASTATE 801 799 select VIDEO_NOMODESET 802 800 help
+2
drivers/video/fbdev/i810/i810_main.c
··· 1547 1547 .owner = THIS_MODULE, 1548 1548 .fb_open = i810fb_open, 1549 1549 .fb_release = i810fb_release, 1550 + __FB_DEFAULT_IOMEM_OPS_RDWR, 1550 1551 .fb_check_var = i810fb_check_var, 1551 1552 .fb_set_par = i810fb_set_par, 1552 1553 .fb_setcolreg = i810fb_setcolreg, ··· 1558 1557 .fb_imageblit = i810fb_imageblit, 1559 1558 .fb_cursor = i810fb_cursor, 1560 1559 .fb_sync = i810fb_sync, 1560 + __FB_DEFAULT_IOMEM_OPS_MMAP, 1561 1561 }; 1562 1562 1563 1563 /***********************************************************************