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

fbdev/neofb: 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>
Link: https://patchwork.freedesktop.org/patch/msgid/20230927074722.6197-24-tzimmermann@suse.de

+4 -1
+2 -1
drivers/video/fbdev/Kconfig
··· 1268 1268 config FB_NEOMAGIC 1269 1269 tristate "NeoMagic display support" 1270 1270 depends on FB && PCI 1271 - select FB_MODE_HELPERS 1272 1271 select FB_CFB_FILLRECT 1273 1272 select FB_CFB_COPYAREA 1274 1273 select FB_CFB_IMAGEBLIT 1274 + select FB_IOMEM_FOPS 1275 + select FB_MODE_HELPERS 1275 1276 select VGASTATE 1276 1277 select VIDEO_NOMODESET 1277 1278 help
+2
drivers/video/fbdev/neofb.c
··· 1614 1614 .owner = THIS_MODULE, 1615 1615 .fb_open = neofb_open, 1616 1616 .fb_release = neofb_release, 1617 + __FB_DEFAULT_IOMEM_OPS_RDWR, 1617 1618 .fb_check_var = neofb_check_var, 1618 1619 .fb_set_par = neofb_set_par, 1619 1620 .fb_setcolreg = neofb_setcolreg, ··· 1624 1623 .fb_fillrect = neofb_fillrect, 1625 1624 .fb_copyarea = neofb_copyarea, 1626 1625 .fb_imageblit = neofb_imageblit, 1626 + __FB_DEFAULT_IOMEM_OPS_MMAP, 1627 1627 }; 1628 1628 1629 1629 /* --------------------------------------------------------------------- */