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

fbdev/intelfb: 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: Maik Broemme <mbroemme@libmpq.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20230927074722.6197-22-tzimmermann@suse.de

+5 -2
+2 -1
drivers/video/fbdev/Kconfig
··· 861 861 config FB_INTEL 862 862 tristate "Intel 830M/845G/852GM/855GM/865G/915G/945G/945GM/965G/965GM support" 863 863 depends on FB && PCI && X86 && AGP_INTEL && EXPERT 864 - select FB_MODE_HELPERS 865 864 select FB_CFB_FILLRECT 866 865 select FB_CFB_COPYAREA 867 866 select FB_CFB_IMAGEBLIT 867 + select FB_IOMEM_FOPS 868 + select FB_MODE_HELPERS 868 869 select BOOT_VESA_SUPPORT if FB_INTEL = y 869 870 select VIDEO_NOMODESET 870 871 depends on !DRM_I915
+3 -1
drivers/video/fbdev/intelfb/intelfbdrv.c
··· 198 198 .owner = THIS_MODULE, 199 199 .fb_open = intelfb_open, 200 200 .fb_release = intelfb_release, 201 + __FB_DEFAULT_IOMEM_OPS_RDWR, 201 202 .fb_check_var = intelfb_check_var, 202 203 .fb_set_par = intelfb_set_par, 203 204 .fb_setcolreg = intelfb_setcolreg, ··· 209 208 .fb_imageblit = intelfb_imageblit, 210 209 .fb_cursor = intelfb_cursor, 211 210 .fb_sync = intelfb_sync, 212 - .fb_ioctl = intelfb_ioctl 211 + .fb_ioctl = intelfb_ioctl, 212 + __FB_DEFAULT_IOMEM_OPS_MMAP, 213 213 }; 214 214 215 215 /* PCI driver module table */