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

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

+3
+1
drivers/video/fbdev/Kconfig
··· 1404 1404 select FB_CFB_FILLRECT 1405 1405 select FB_CFB_COPYAREA 1406 1406 select FB_CFB_IMAGEBLIT 1407 + select FB_IOMEM_FOPS 1407 1408 select VIDEO_NOMODESET 1408 1409 help 1409 1410 This is the frame buffer device driver for the 3DLabs Permedia3
+2
drivers/video/fbdev/pm3fb.c
··· 1203 1203 1204 1204 static const struct fb_ops pm3fb_ops = { 1205 1205 .owner = THIS_MODULE, 1206 + __FB_DEFAULT_IOMEM_OPS_RDWR, 1206 1207 .fb_check_var = pm3fb_check_var, 1207 1208 .fb_set_par = pm3fb_set_par, 1208 1209 .fb_setcolreg = pm3fb_setcolreg, ··· 1214 1213 .fb_blank = pm3fb_blank, 1215 1214 .fb_sync = pm3fb_sync, 1216 1215 .fb_cursor = pm3fb_cursor, 1216 + __FB_DEFAULT_IOMEM_OPS_MMAP, 1217 1217 }; 1218 1218 1219 1219 /* ------------------------------------------------------------------------- */