|
Revision tags: v6.15, v6.15-rc7, v6.15-rc6, v6.15-rc5, v6.15-rc4, v6.15-rc3, v6.15-rc2, v6.15-rc1, v6.14, v6.14-rc7, v6.14-rc6 |
|
| #
eabb0329 |
| 09-Mar-2025 |
Zsolt Kajtar <[email protected]> |
fbdev: Refactoring the fbcon packed pixel drawing routines
The original version duplicated more or less the same algorithms for both system and i/o memory.
In this version the drawing algorithms (c
fbdev: Refactoring the fbcon packed pixel drawing routines
The original version duplicated more or less the same algorithms for both system and i/o memory.
In this version the drawing algorithms (copy/fill/blit) are separate from the memory access (system and i/o). The two parts are getting combined in the loadable module sources. This also makes it more robust against wrong memory access type or alignment mistakes as there's no direct pointer access or arithmetic in the algorithm sources anymore.
Due to liberal use of inlining the compiled result is a single function in all 6 cases, without unnecessary function calls. Unlike earlier the use of macros could be minimized as apparently both gcc and clang is capable now to do the same with inline functions just as well.
What wasn't quite the same in the two variants is the support for pixel order reversing. This version is capable to do that for both system and I/O memory, and not only for the latter. As demand for low bits per pixel modes isn't high there's a configuration option to enable this separately for the CFB and SYS modules.
The pixel reversing algorithm is different than earlier and was designed so that it can take advantage of bit order reversing instructions on architectures which have them. And even for higher bits per pixel modes like four bpp.
One of the shortcomings of the earlier version was the incomplete support for foreign endian framebuffers. Now all three drawing algorithms produce correct output on both endians with native and foreign framebuffers. This is one of the important differences even if otherwise the algorithms don't look too different than before.
All three routines work now with aligned native word accesses. As a consequence blitting isn't limited to 32 bits on 64 bit architectures as it was before.
The old routines silently assumed that rows are a multiple of the word size. Due to how the new routines function this isn't a requirement any more and access will be done aligned regardless. However if the framebuffer is configured like that then some of the fast paths won't be available.
As this code is supposed to be running on all supported architectures it wasn't optimized for a particular one. That doesn't mean I haven't looked at the disassembly. That's where I noticed that it isn't a good idea to use the fallback bitreversing code for example.
The low bits per pixel modes should be faster than before as the new routines can blit 4 pixels at a time.
On the higher bits per pixel modes I retained the specialized aligned routines so it should be more or less the same, except on 64 bit architectures. There the blitting word size is double now which means 32 BPP isn't done a single pixel a time now.
The code was tested on x86, amd64, mips32 and mips64. The latter two in big endian configuration. Originally thought I can get away with the first two, but with such bit twisting code byte ordering is tricky and not really possible to get right without actually verifying it.
While writing such routines isn't rocket science a lot of time was spent on making sure that pixel ordering, foreign byte order, various bits per pixels, cpu endianness and word size will give the expected result in all sorts of combinations without making it overly complicated or full with special cases.
Signed-off-by: Zsolt Kajtar <[email protected]> Signed-off-by: Helge Deller <[email protected]>
show more ...
|
|
Revision tags: v6.14-rc5, v6.14-rc4, v6.14-rc3, v6.14-rc2, v6.14-rc1, v6.13, v6.13-rc7, v6.13-rc6, v6.13-rc5, v6.13-rc4 |
|
| #
8fc38062 |
| 16-Dec-2024 |
Thomas Zimmermann <[email protected]> |
fbdev: Fix recursive dependencies wrt BACKLIGHT_CLASS_DEVICE
Do not select BACKLIGHT_CLASS_DEVICE from FB_BACKLIGHT. The latter only controls backlight support within fbdev core code and data struct
fbdev: Fix recursive dependencies wrt BACKLIGHT_CLASS_DEVICE
Do not select BACKLIGHT_CLASS_DEVICE from FB_BACKLIGHT. The latter only controls backlight support within fbdev core code and data structures.
Make fbdev drivers depend on BACKLIGHT_CLASS_DEVICE and let users select it explicitly. Fixes warnings about recursive dependencies, such as
error: recursive dependency detected! symbol BACKLIGHT_CLASS_DEVICE is selected by FB_BACKLIGHT symbol FB_BACKLIGHT is selected by FB_SH_MOBILE_LCDC symbol FB_SH_MOBILE_LCDC depends on FB_DEVICE symbol FB_DEVICE depends on FB_CORE symbol FB_CORE is selected by DRM_GEM_DMA_HELPER symbol DRM_GEM_DMA_HELPER is selected by DRM_PANEL_ILITEK_ILI9341 symbol DRM_PANEL_ILITEK_ILI9341 depends on BACKLIGHT_CLASS_DEVICE
BACKLIGHT_CLASS_DEVICE is user-selectable, so making drivers adapt to it is the correct approach in any case. For most drivers, backlight support is also configurable separately.
v3: - Select BACKLIGHT_CLASS_DEVICE in PowerMac defconfigs (Christophe) - Fix PMAC_BACKLIGHT module dependency corner cases (Christophe) v2: - s/BACKLIGHT_DEVICE_CLASS/BACKLIGHT_CLASS_DEVICE (Helge) - Fix fbdev driver-dependency corner case (Arnd)
Signed-off-by: Thomas Zimmermann <[email protected]> Reviewed-by: Arnd Bergmann <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
show more ...
|
|
Revision tags: v6.13-rc3, v6.13-rc2, v6.13-rc1, v6.12, v6.12-rc7, v6.12-rc6, v6.12-rc5, v6.12-rc4, v6.12-rc3, v6.12-rc2, v6.12-rc1, v6.11, v6.11-rc7, v6.11-rc6, v6.11-rc5, v6.11-rc4, v6.11-rc3, v6.11-rc2, v6.11-rc1, v6.10, v6.10-rc7, v6.10-rc6, v6.10-rc5, v6.10-rc4, v6.10-rc3, v6.10-rc2, v6.10-rc1, v6.9, v6.9-rc7, v6.9-rc6, v6.9-rc5, v6.9-rc4, v6.9-rc3, v6.9-rc2, v6.9-rc1, v6.8, v6.8-rc7 |
|
| #
01c0cce8 |
| 28-Feb-2024 |
Tony Lindgren <[email protected]> |
drm/omapdrm: Fix console with deferred ops
Commit 95da53d63dcf ("drm/omapdrm: Use regular fbdev I/O helpers") stopped console from updating for command mode displays because there is no damage handl
drm/omapdrm: Fix console with deferred ops
Commit 95da53d63dcf ("drm/omapdrm: Use regular fbdev I/O helpers") stopped console from updating for command mode displays because there is no damage handling in fb_sys_write() unlike we had earlier in drm_fb_helper_sys_write().
Let's fix the issue by adding FB_GEN_DEFAULT_DEFERRED_DMAMEM_OPS and FB_DMAMEM_HELPERS_DEFERRED as suggested by Thomas. We cannot use the FB_DEFAULT_DEFERRED_OPS as fb_deferred_io_mmap() won't work properly for write-combine.
Fixes: 95da53d63dcf ("drm/omapdrm: Use regular fbdev I/O helpers") Suggested-by: Thomas Zimmermann <[email protected]> Reviewed-by: Thomas Zimmermann <[email protected]> Signed-off-by: Tony Lindgren <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
show more ...
|
|
Revision tags: v6.8-rc6, v6.8-rc5, v6.8-rc4, v6.8-rc3, v6.8-rc2, v6.8-rc1 |
|
| #
a3b6792e |
| 18-Jan-2024 |
Thomas Zimmermann <[email protected]> |
video/cmdline: Introduce CONFIG_VIDEO for video= parameter
Add CONFIG_VIDEO for common code in drivers/video/. Use the option to select helpers for the video= parameter. Replaces CONFIG_VIDEO_CMDLIN
video/cmdline: Introduce CONFIG_VIDEO for video= parameter
Add CONFIG_VIDEO for common code in drivers/video/. Use the option to select helpers for the video= parameter. Replaces CONFIG_VIDEO_CMDLINE.
Other common code in drivers/video/ can be moved behind CONFIG_VIDEO, which will simplify the Kconfig rules.
Signed-off-by: Thomas Zimmermann <[email protected]> Reviewed-by: Daniel Vetter <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
show more ...
|
|
Revision tags: v6.7, v6.7-rc8, v6.7-rc7, v6.7-rc6, v6.7-rc5, v6.7-rc4 |
|
| #
8813e86f |
| 27-Nov-2023 |
Thomas Zimmermann <[email protected]> |
fbdev: Remove default file-I/O implementations
Drop the default implementations for file read, write and mmap operations. Each fbdev driver must now provide an implementation and select any necessar
fbdev: Remove default file-I/O implementations
Drop the default implementations for file read, write and mmap operations. Each fbdev driver must now provide an implementation and select any necessary helpers. If no implementation has been set, fbdev returns an errno code to user space. The code is the same as if the operation had not been set in the file_operations struct.
This change makes the fbdev helpers for I/O memory optional. Most systems only use system-memory framebuffers via DRM's fbdev emulation.
v2: * warn once if I/O callbacks are missing (Javier)
Signed-off-by: Thomas Zimmermann <[email protected]> Reviewed-by: Javier Martinez Canillas <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
show more ...
|
| #
27ad64ea |
| 27-Nov-2023 |
Thomas Zimmermann <[email protected]> |
fbdev: Rename FB_SYS_FOPS token to FB_SYSMEM_FOPS
Rename the token to harmonize naming among various helpers. For example, I/O-memory helpers use FB_IOMEM_FOPS.
Signed-off-by: Thomas Zimmermann <tz
fbdev: Rename FB_SYS_FOPS token to FB_SYSMEM_FOPS
Rename the token to harmonize naming among various helpers. For example, I/O-memory helpers use FB_IOMEM_FOPS.
Signed-off-by: Thomas Zimmermann <[email protected]> Reviewed-by: Javier Martinez Canillas <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
show more ...
|
|
Revision tags: v6.7-rc3, v6.7-rc2, v6.7-rc1, v6.6, v6.6-rc7, v6.6-rc6, v6.6-rc5, v6.6-rc4 |
|
| #
6b180f66 |
| 27-Sep-2023 |
Thomas Zimmermann <[email protected]> |
fbdev: Provide I/O-memory helpers as module
Provide helpers for accessing I/O memory in a helper module. The fbdev core uses these helpers, so select the module unconditionally for fbdev. Drivers wi
fbdev: Provide I/O-memory helpers as module
Provide helpers for accessing I/O memory in a helper module. The fbdev core uses these helpers, so select the module unconditionally for fbdev. Drivers will later be able to select the module individually and the helpers will become optional.
Signed-off-by: Thomas Zimmermann <[email protected]> Reviewed-by: Javier Martinez Canillas <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
show more ...
|
|
Revision tags: v6.6-rc3, v6.6-rc2 |
|
| #
bb6c4507 |
| 11-Sep-2023 |
Arnd Bergmann <[email protected]> |
drm: fix up fbdev Kconfig defaults
As a result of the recent Kconfig reworks, the default settings for the framebuffer interfaces changed in unexpected ways:
Configurations that leave CONFIG_FB dis
drm: fix up fbdev Kconfig defaults
As a result of the recent Kconfig reworks, the default settings for the framebuffer interfaces changed in unexpected ways:
Configurations that leave CONFIG_FB disabled but use DRM now get DRM_FBDEV_EMULATION by default. This also turns on the deprecated /dev/fb device nodes for machines that don't actually want it.
In turn, configurations that previously had DRM_FBDEV_EMULATION enabled now only get the /dev/fb front-end but not the more useful framebuffer console, which is not selected any more.
We had previously decided that any combination of the three frontends (FB_DEVICE, FRAMEBUFFER_CONSOLE and LOGO) should be selectable, but the new default settings mean that a lot of defconfig files would have to get adapted.
Change the defaults back to what they were in Linux 6.5:
- Leave DRM_FBDEV_EMULATION turned off unless CONFIG_FB is enabled. Previously this was a hard dependency but now the two are independent. However, configurations that enable CONFIG_FB probably also want to keep the emulation for DRM, while those without FB presumably did that intentionally in the past.
- Leave FB_DEVICE turned off for FB=n. Following the same logic, the deprecated option should not automatically get enabled here, most users that had FB turned off in the past do not want it, even if they want the console
- Turn the FRAMEBUFFER_CONSOLE option on if DRM_FBDEV_EMULATION is set to avoid having to change defconfig files that relied on it being selected unconditionally in the past. This also makes sense since both LOGO and FB_DEVICE are now disabled by default for builds without CONFIG_FB, but DRM_FBDEV_EMULATION would make no sense if all three are disabled.
Fixes: a5ae331edb02b ("drm: Drop select FRAMEBUFFER_CONSOLE for DRM_FBDEV_EMULATION") Fixes: 701d2054fa317 ("fbdev: Make support for userspace interfaces configurable") Reported-by: Geert Uytterhoeven <[email protected]> Signed-off-by: Arnd Bergmann <[email protected]> Reviewed-by: Javier Martinez Canillas <[email protected]> Reviewed-by: Geert Uytterhoeven <[email protected]> Acked-by: Thomas Zimmermann <[email protected]> Signed-off-by: Javier Martinez Canillas <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
show more ...
|
|
Revision tags: v6.6-rc1 |
|
| #
ee057f97 |
| 28-Aug-2023 |
Thomas Zimmermann <[email protected]> |
fbdev: Add Kconfig macro FB_IOMEM_HELPERS_DEFERRED
The new Kconfig macro FB_IOMEM_HELPERS_DEFERRED selects fbdev's helpers for device I/O memory and deferred I/O. Drivers should use it if they perfo
fbdev: Add Kconfig macro FB_IOMEM_HELPERS_DEFERRED
The new Kconfig macro FB_IOMEM_HELPERS_DEFERRED selects fbdev's helpers for device I/O memory and deferred I/O. Drivers should use it if they perform damage updates on device I/O memory.
Signed-off-by: Thomas Zimmermann <[email protected]> Acked-by: Javier Martinez Canillas <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
show more ...
|
|
Revision tags: v6.5, v6.5-rc7, v6.5-rc6, v6.5-rc5, v6.5-rc4 |
|
| #
b21f187f |
| 29-Jul-2023 |
Thomas Zimmermann <[email protected]> |
fbdev: Use _DMAMEM_ infix for DMA-memory helpers
Change the infix for fbdev's DMA-memory helpers from _DMA_ to _DMAMEM_. The helpers perform operations within DMA-able memory, but they don't perform
fbdev: Use _DMAMEM_ infix for DMA-memory helpers
Change the infix for fbdev's DMA-memory helpers from _DMA_ to _DMAMEM_. The helpers perform operations within DMA-able memory, but they don't perform DMA operations. Naming should make this clear. Adapt all users. No functional changes.
Signed-off-by: Thomas Zimmermann <[email protected]> Reviewed-by: Sam Ravnborg <[email protected]> Acked-by: Helge Deller <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
show more ...
|
| #
cd8a064f |
| 29-Jul-2023 |
Thomas Zimmermann <[email protected]> |
fbdev: Use _SYSMEM_ infix for system-memory helpers
Change the infix for fbdev's system-memory helpers from _SYS_ to _SYSMEM_. The helpers perform operations within system memory, but not on the sta
fbdev: Use _SYSMEM_ infix for system-memory helpers
Change the infix for fbdev's system-memory helpers from _SYS_ to _SYSMEM_. The helpers perform operations within system memory, but not on the state of the operating system itself. Naming should make this clear. Adapt all users. No functional changes.
Suggested-by: Helge Deller <[email protected]> Signed-off-by: Thomas Zimmermann <[email protected]> Reviewed-by: Sam Ravnborg <[email protected]> Acked-by: Helge Deller <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
show more ...
|
| #
4520844b |
| 29-Jul-2023 |
Thomas Zimmermann <[email protected]> |
fbdev: Use _IOMEM_ infix for I/O-memory helpers
Change the infix for fbdev's I/O-memory helpers from _IO_ to _IOMEM_ to distiguish them from other types of I/O, such as file operations. The helpers
fbdev: Use _IOMEM_ infix for I/O-memory helpers
Change the infix for fbdev's I/O-memory helpers from _IO_ to _IOMEM_ to distiguish them from other types of I/O, such as file operations. The helpers operate on memory ranges in the I/O address space and the naming should make this clear. Adapt all users. No functional changes.
Suggested-by: Helge Deller <[email protected]> Signed-off-by: Thomas Zimmermann <[email protected]> Reviewed-by: Sam Ravnborg <[email protected]> Acked-by: Helge Deller <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
show more ...
|
|
Revision tags: v6.5-rc3, v6.5-rc2, v6.5-rc1 |
|
| #
6f0f6941 |
| 07-Jul-2023 |
Thomas Zimmermann <[email protected]> |
fbdev: Add fb_ops init macros for framebuffers in DMA-able memory
Add initializer macros for struct fb_ops for framebuffers in DMA-able memory areas. Also add a corresponding Kconfig token. As of no
fbdev: Add fb_ops init macros for framebuffers in DMA-able memory
Add initializer macros for struct fb_ops for framebuffers in DMA-able memory areas. Also add a corresponding Kconfig token. As of now, this is equivalent to system framebuffers and mostly useful for labeling drivers correctly.
A later patch may add a generic DMA-specific mmap operation. Linux offers a number of dma_mmap_*() helpers for different use cases.
Signed-off-by: Thomas Zimmermann <[email protected]> Reviewed-by: Javier Martinez Canillas <[email protected]> Acked-by: Maxime Ripard <[email protected]> Cc: Helge Deller <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
show more ...
|
| #
55bffc81 |
| 19-Jul-2023 |
Javier Martinez Canillas <[email protected]> |
fbdev: Split frame buffer support in FB and FB_CORE symbols
Currently the CONFIG_FB option has to be enabled even if no legacy fbdev drivers are needed (e.g: only to have support for framebuffer con
fbdev: Split frame buffer support in FB and FB_CORE symbols
Currently the CONFIG_FB option has to be enabled even if no legacy fbdev drivers are needed (e.g: only to have support for framebuffer consoles).
The DRM subsystem has a fbdev emulation layer, but depends on CONFIG_FB and so it can only be enabled if that dependency is enabled as well.
That means fbdev drivers have to be explicitly disabled if users want to enable CONFIG_FB, only to use fbcon and/or the DRM fbdev emulation layer.
This patch introduces a non-visible CONFIG_FB_CORE symbol that could be enabled just to have core support needed for CONFIG_DRM_FBDEV_EMULATION, allowing CONFIG_FB to be disabled (and automatically disabling all the fbdev drivers).
Nothing from fb_backlight.o and fbmon.o is used by the DRM fbdev emulation layer so these two objects can be compiled out when CONFIG_FB is disabled.
Signed-off-by: Javier Martinez Canillas <[email protected]> Reviewed-by: Arnd Bergmann <[email protected]> Tested-by: Arnd Bergmann <[email protected]> Acked-by: Helge Deller <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
show more ...
|
| #
df791524 |
| 19-Jul-2023 |
Javier Martinez Canillas <[email protected]> |
fbdev: Move core fbdev symbols to a separate Kconfig file
The drivers/video/fbdev/Kconfig defines both symbols for fbdev drivers and core fbdev symbols, that can be enabled independently of the fbde
fbdev: Move core fbdev symbols to a separate Kconfig file
The drivers/video/fbdev/Kconfig defines both symbols for fbdev drivers and core fbdev symbols, that can be enabled independently of the fbdev drivers.
Split the Kconfig in two, one that only has the symbols for fbdev drivers and another one that contains the fbdev core symbols.
Suggested-by: Arnd Bergmann <[email protected]> Signed-off-by: Javier Martinez Canillas <[email protected]> Reviewed-by: Arnd Bergmann <[email protected]> Tested-by: Arnd Bergmann <[email protected]> Acked-by: Helge Deller <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
show more ...
|