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

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

+4 -8
+1 -3
drivers/video/fbdev/Kconfig
··· 1434 1434 config FB_AU1100 1435 1435 bool "Au1100 LCD Driver" 1436 1436 depends on (FB = y) && MIPS_ALCHEMY 1437 - select FB_CFB_FILLRECT 1438 - select FB_CFB_COPYAREA 1439 - select FB_CFB_IMAGEBLIT 1437 + select FB_IOMEM_HELPERS 1440 1438 help 1441 1439 This is the framebuffer driver for the AMD Au1100 SOC. It can drive 1442 1440 various panels and CRTs by passing in kernel cmd line option
+3 -5
drivers/video/fbdev/au1100fb.c
··· 348 348 fbdev->fb_len); 349 349 } 350 350 351 - static const struct fb_ops au1100fb_ops = 352 - { 351 + static const struct fb_ops au1100fb_ops = { 353 352 .owner = THIS_MODULE, 353 + __FB_DEFAULT_IOMEM_OPS_RDWR, 354 354 .fb_setcolreg = au1100fb_fb_setcolreg, 355 355 .fb_blank = au1100fb_fb_blank, 356 356 .fb_pan_display = au1100fb_fb_pan_display, 357 - .fb_fillrect = cfb_fillrect, 358 - .fb_copyarea = cfb_copyarea, 359 - .fb_imageblit = cfb_imageblit, 357 + __FB_DEFAULT_IOMEM_OPS_DRAW, 360 358 .fb_mmap = au1100fb_fb_mmap, 361 359 }; 362 360