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

fbdev/cirrusfb: 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-10-tzimmermann@suse.de

+3
+1
drivers/video/fbdev/Kconfig
··· 74 74 select FB_CFB_FILLRECT 75 75 select FB_CFB_COPYAREA 76 76 select FB_CFB_IMAGEBLIT 77 + select FB_IOMEM_FOPS 77 78 select VIDEO_NOMODESET 78 79 help 79 80 This enables support for Cirrus Logic GD542x/543x based boards on
+2
drivers/video/fbdev/cirrusfb.c
··· 1961 1961 .owner = THIS_MODULE, 1962 1962 .fb_open = cirrusfb_open, 1963 1963 .fb_release = cirrusfb_release, 1964 + __FB_DEFAULT_IOMEM_OPS_RDWR, 1964 1965 .fb_setcolreg = cirrusfb_setcolreg, 1965 1966 .fb_check_var = cirrusfb_check_var, 1966 1967 .fb_set_par = cirrusfb_set_par, ··· 1971 1970 .fb_copyarea = cirrusfb_copyarea, 1972 1971 .fb_sync = cirrusfb_sync, 1973 1972 .fb_imageblit = cirrusfb_imageblit, 1973 + __FB_DEFAULT_IOMEM_OPS_MMAP, 1974 1974 }; 1975 1975 1976 1976 static int cirrusfb_set_fbinfo(struct fb_info *info)