Re: [PATCH 00/46] fbdev: Init fb_ops with helpers for I/O memory
From: Javier Martinez Canillas <javierm@redhat.com>
Date: 2023-10-18 08:26:21
Also in:
dri-devel, linux-arm-kernel, linux-omap
Thomas Zimmermann [off-list ref] writes:
Initialize struct fb_ops for drivers for hardware with framebuffers in I/O-memory ranges with the respective helper macros. Also select the appropriate Kconfig dependencies. The patchset is part of a larger effort to modularize the fbdev core and make it more adaptable. Most of these drivers do not initialize the fb_read, fb_write and fb_mmap callbacks in fb_ops. By leaving the callback pointers to NULL, they rely on the fbdev core to invoke the I/O-memory helpers by default. This default makes it impossible to remove the I/O-memory helpers on systems that don't need them. Setting the pointers explicitly will allow for the removal of the default. If a callback in fb_ops is unset, the operation will then be unsupported. Initializing struct fb_ops via helpers macros will also allow for a fine-grained setup, depending on Kconfig options. For example, it will be possible to leave out file I/O if FB_DEVICE has not been set. This patchset contains the majority of fbdev driver work. The updated drivers now initialize fb_ops with __FB_DEFAULT_IOMEM_OPS_RDWR, __FB_DEFAULT_IOMEM_OPS_DRAW and/or __FB_DEFAULT_IOMEM_OPS_MMAP if possible. Some drivers now use FB_DEFAULT_IOMEM_OPS, which sets all fields correctly. In Kconfig, each driver selects FB_IOMEM_FOPS to get the helpers for I/O memory. Drivers that use _RDWR, _DRAW and _MMAP unconditionally select FB_IOMEM_HELPERS, which selects the correct modules automatically.
I looked to all the driver changes as well and couldn't spot any issues. For all the driver patches: Acked-by: Javier Martinez Canillas <javierm@redhat.com> -- Best regards, Javier Martinez Canillas Core Platforms Red Hat