Linux 6.18 Released
Yesterday’s release of the 6.18 kernel (Linus announcement email) marks the sixth minor Linux kernel this year, and unless something extraordinary is to happen, it will be the last of 2025.
Apart from the overall release highlights, which as usual can be read in detail at the very fine Kernelnewbies release notes summary page, the team at Igalia has once more been busy contributing fixes and improvements to the numerous areas of the code base.
Let’s go over some of the more significant contributions, while the full list of changes be found at the end of the post.
Case insensitive support for overlayfs
SteamOS, the Linux distribution that powers the Steam Deck, Steam Machine and Steam Frame, relies on container tools to run games. Those tools enable creating safe and isolated environments, allowing games to have their local libraries installed without conflicting with the system versions.
Overlayfs is a union filesystem that combines two filesystems in one mount point, with an upper layer and a lower layer filesystem. If a file (or directory) exists in both layers, the upper file is shown to the user while the lower one is hidden, and directories that exist in both layers are merged. Writes made to the upper layer do not impact the lower layer, making this a good match to containerize games! So let’s, for example, say that we have the following directories:
$ ls system/libs/
directx.dll sdl.dll
$ ls half_life/libs/
SDL.dll
In this example, Half Life wants to use a custom version of SDL. If we mount a overlayfs using system as lower layer and half_life as upper layer, the mount point will show the SDL.dll from half_life and directx.dll from system:
$ ls merged/libs/
directx.dll SDL.dll
In order to merge directories, overlayfs needs to compare their names, and since this was done with a normal strncmp() it did not support merging case-insensitive filesystems, so part of our work here was to make a casefold version of strncmp().
You can learn more about why we use case-insensitive filesystems for games in our Hackers Assemble episode.
Futex selftest cleanup
Part of our job as Linux kernel upstream experts is not only about adding new features, but also fixing, improving and refactoring code. The futex syscall is a critical point on Linux used to create userspace synchronization mechanisms like mutexes and semaphores, being called thousands of time per second by glibc’s pthread functions. Bugs in this code can therefore cause a lot of problems such as freezing applications due to deadlocks, or unexpected behaviour caused by race conditions. To help keeping futexes working correctly, we refactored all selftests to make them easier to maintain and to add new tests.
AMDGPU driver improvements
The AMDGPU kernel driver is one of the critical components enabling good gaming experiences on the Steam Deck hardware, and for this kernel release we contributed several improvements and fixes.
On the display side, we fixed the atomic commit sequence for updating the color management attributes. The issue was present since the first commit in the git history and was uncovered by a recent update of the KDE color pipeline for night light mode with HDR. The symptoms were that when the KDE screen brightness control was being modified relatively quickly, color flickering was visible on the screen. This was caused by a race condition in GAMMA LUT updates, and we have fixed it by correcting the flow of AMD DC colour state updates done during the atomic mode setting operations.
Elsewhere in the AMDGPU driver we cleaned up some unnecessary code and simplified other code, while at the same time hardened some userspace ioctl entry points. We also reduced the scope for locking issues by removing misuse of the C volatile keyword.
We have also been exploring avenues for fixing issues with the driver re-load when in a TTY mode. For example, discrete GPUs were forgetting to release some I2C resources on unload, which we have fixed by migrating that code to use device-managed resources.
Finally, we were also active in helping with code reviews on patches contributed by both AMD and the community.
Raspberry Pi GPU driver improvements
Continuing in the graphics area, but this time focusing on the Raspberry Pi v3d driver — for which we are the maintainers — we added support for the KHR_robustness extension by adding support to query the current number of GPU resets. We also improved the DRM scheduler handling of resets allowing drivers to better handle false timeout notifications. Finally, we fixed a couple of race conditions, thus making the driver more robust, and at the same time reduced the lock contention in job queues.
Intel Xe driver Alderlake support
Still in the graphics area, we continued to add missing hardware workarounds to better support Intel Alderlake GPUs in the new xe kernel driver.
Memory management improvements
Moving out of graphics into the core memory management area, we improved the Out of Memory Killer reporting capabilities by showing the amount of memory consumed by compressed memory and swap subsystems (ZRAM and ZSWAP).
We also fixed the cases when non-delayed high-order allocations were considered as atomic, reducing the available reserves that some allocations could use.
Other
Elsewhere we continued to contribute various other bug fixes, such as for the HID Multitouch driver, the UVC driver, various DRM scheduler cleanups and optimizations, as well as supporting the wider community with code reviews and testing across many more areas.
Igalia Changelog
Authored (76)
André Almeida
- selftest/futex: Make the error check more precise for futex_numa_mpol
- selftest/futex: Reintroduce “Memory out of range” numa_mpol’s subtest
- selftests: kselftest: Create ksft_print_dbg_msg()
- selftests/futex: Refactor futex_requeue_pi with kselftest_harness.h
- selftests/futex: Refactor futex_requeue_pi_mismatched_ops with kselftest_harness.h
- selftests/futex: Refactor futex_requeue_pi_signal_restart with kselftest_harness.h
- selftests/futex: Refactor futex_wait_timeout with kselftest_harness.h
- selftests/futex: Refactor futex_wait_wouldblock with kselftest_harness.h
- selftests/futex: Refactor futex_wait_unitialized_heap with kselftest_harness.h
- selftests/futex: Refactor futex_wait_private_mapped_file with kselftest_harness.h
- selftests/futex: Refactor futex_wait with kselftest_harness.h
- selftests/futex: Refactor futex_requeue with kselftest_harness.h
- selftests/futex: Refactor futex_waitv with kselftest_harness.h
- selftests/futex: Refactor futex_priv_hash with kselftest_harness.h
- selftests/futex: Refactor futex_numa_mpol with kselftest_harness.h
- selftests/futex: Drop logging.h include from futex_numa
- selftests/futex: Remove logging.h file
- fs: Create sb_encoding() helper
- fs: Create sb_same_encoding() helper
- ovl: Prepare for mounting case-insensitive enabled layers
- ovl: Create ovl_casefold() to support casefolded strncmp()
- ovl: Ensure that all layers have the same encoding
- ovl: Set case-insensitive dentry operations for ovl sb
- ovl: Add S_CASEFOLD as part of the inode flag to be copied
- ovl: Check for casefold consistency when creating new dentries
- ovl: Support mounting case-insensitive enabled layers
- tools/nolibc: add stdbool.h to nolibc includes
Luis Henriques
Maíra Canal
- drm/v3d: Add parameter to retrieve the global number of GPU resets
- drm/v3d: Add parameter to retrieve the number of GPU resets per-fd
- drm/v3d: Store a pointer to
struct v3d_file_privinside each job - drm/v3d: Store the active job inside the queue’s state
- drm/v3d: Replace a global spinlock with a per-queue spinlock
- drm/v3d: Address race-condition between per-fd GPU stats and fd release
- drm/v3d: Synchronous operations can’t timeout
- drm/v3d: Protect per-fd reset counter against fd release
- clk: bcm: rpi: Turn firmware clock on/off when preparing/unpreparing
- clk: bcm: rpi: Maximize V3D clock
Melissa Wen
- drm/amd/display: update color on atomic commit time
- drm/amd/display: change dc stream color settings only in atomic commit
- drm/amd/display: remove output_tf_change flag
- drm/v3d: create a dedicated lock for dma fence
Rodrigo Siqueira
- drm/amdgpu/vcn: Remove unnecessary check
- drm/amdgpu/vcn: Document IRQ per-instance irq behavior for VCN 4.0.3
- drm/amdgpu/vcn: Change amdgpu_vcn_sw_fini return to void
- drm/amdgpu: Remove volatile from CSB functions
- drm/amdgpu: Remove volatile from RLC files
- drm/amdgpu: Remove volatile from ring manipulation
- drm/amdgpu: Remove volatile from amdgpu and amdgpu_ih headers
- drm/amdgpu: Remove volatile references from VCN
- drm/amd/display: Use devm_i2c_add_adapter to simplify i2c cleanup logic
- drm/amdgpu/amdgpu_i2c: Use devm_i2c_add_adapter instead of i2c_add_adapter
- drm/amdgpu: Use devm_i2c_add_adapter() in SMU V11
- drm/amd/pm: Use devm_i2c_add_adapter() in the i2c init
- drm/amd/pm: Use devm_i2c_add_adapter() in the Arcturus smu
- drm/amd/pm: Use devm_i2c_add_adapter() in the Navi10 smu
- drm/amd/pm: Use devm_i2c_add_adapter() in the Sienna smu
- drm/amd/pm: Use devm_i2c_add_adapter() in the V13 smu
- drm/amd/pm: Use devm_i2c_add_adapter() in the V13_0_6 smu
- drm/amd/pm: Use devm_i2c_add_adapter() in the V14_0_2 smu
Thadeu Lima de Souza Cascardo
- media: uvcvideo: Mark invalid entities with id UVC_INVALID_ENTITY_ID
- mm/page_alloc: only set ALLOC_HIGHATOMIC for __GPF_HIGH allocations
- mm: show_mem: show number of zspages in show_free_areas
- HID: multitouch: fix name of Stylus input devices
Tvrtko Ursulin
- drm/sched: Fix a race in DRM_GPU_SCHED_STAT_NO_HANG test
- drm/sched: Avoid double re-lock on the job free path
- drm/xe: Use emit_flush_imm_ggtt helper instead of open coding
- drm/xe/xelp: Implement Wa_16010904313
- drm/xe/xelp: Add Wa_18022495364
- drm/sched: Remove mention of indirect buffers
- drm/amdgpu: Use vmemdup_array_user in amdgpu_bo_create_list_entry_array
- drm/amdgpu: Use memdup_array_user in amdgpu_cs_wait_fences_ioctl
- drm/amdgpu: Use (v)memdup_array_user in amdgpu_cs_pass1
- drm/amdgpu: Use memset32 for ring clearing
- drm/sched: Fix potential double free in drm_sched_job_add_resv_dependencies
Umang Jain
Co-developed (1)
Melissa Wen
Reviewed (51)
André Almeida
- drm: re-allow no-op changes on non-primary planes in async flips
- selftests/futex: Remove the -g parameter from futex_priv_hash
- selftests/futex: Fix typos and grammar in futex_priv_hash
- selftests/futex: Fix futex_wait() for 32bit ARM
Christian Gmeiner
Iago Toral Quiroga
- drm/v3d: Add parameter to retrieve the global number of GPU resets
- drm/v3d: Add parameter to retrieve the number of GPU resets per-fd
- drm/v3d: Store a pointer to
struct v3d_file_privinside each job - drm/v3d: Store the active job inside the queue’s state
- drm/v3d: Replace a global spinlock with a per-queue spinlock
- drm/v3d: Address race-condition between per-fd GPU stats and fd release
- drm/v3d: Synchronous operations can’t timeout
- drm/v3d: Protect per-fd reset counter against fd release
Maíra Canal
- drm/sched: Fix a race in DRM_GPU_SCHED_STAT_NO_HANG test
- drm/sched: Avoid double re-lock on the job free path
- drm/vkms: Create helpers macro to avoid code duplication in format callbacks
- drm/vkms: Add support for ARGB8888 formats
- drm/vkms: Add support for ARGB16161616 formats
- drm/vkms: Add support for RGB565 formats
- drm/vkms: Add support for RGB888 formats
- drm/vkms: Change YUV helpers to support u16 inputs for conversion
- drm/vkms: Create helper macro for YUV formats
- drm/vkms: Add P01* formats
- drm/v3d: create a dedicated lock for dma fence
Melissa Wen
- drm/v3d: Store a pointer to
struct v3d_file_privinside each job - drm/v3d: Store the active job inside the queue’s state
- drm/v3d: Replace a global spinlock with a per-queue spinlock
- drm/v3d: Synchronous operations can’t timeout
Rodrigo Siqueira
- drm/amd/display: Don’t overwrite dce60_clk_mgr
- drm/amd/display: Fix DCE 6.0 and 6.4 PLL programming.
- drm/amd/display: Don’t overclock DCE 6 by 15%
- drm/amd/display: Adjust DCE 8-10 clock, don’t overclock by 15%
- drm/amd/display: Find first CRTC and its line time in dce110_fill_display_configs
- drm/amd/display: Fill display clock and vblank time in dce110_fill_display_configs
- drm/amd/display: Don’t warn when missing DCE encoder caps
- drm/amd/display: Don’t print errors for nonexistent connectors
- drm/amd/display: Fix fractional fb divider in set_pixel_clock_v3
- drm/amd/display: Fix DP audio DTO1 clock source on DCE 6.
- drm/amd/display: Disable fastboot on DCE 6 too
- drm/amd/display: Disable VRR on DCE 6
- drm/amd/display: Don’t use non-registered VUPDATE on DCE 6
- Documentation: add initial documenation for user queues
Tvrtko Ursulin
- drm/i915: Don’t check for atomic context on PREEMPT_RT
- drm/i915/active: Use try_cmpxchg64() in __active_lookup()
- drm/sched/tests: Remove redundant header files
- drm/sched: Fix racy access to drm_sched_entity.dependency
- drm/i915: Replace kmalloc() + copy_from_user() with memdup_user()
- drm/amdgpu: Replace kzalloc + copy_from_user with memdup_user
- dma-fence: Fix safe access wrapper to call timeline name method
- drm/sched: Fix race in drm_sched_entity_select_rq()
- drm/amdgpu: jump to the correct label on failure