Back to news
"Igalia's contributions"

The well oiled wheel of the Linux release cycle has just produced another kernel: Linus Torvalds announced the release of v6.17, which contains a number of contributions from Igalia. This cycle, which started immediately after the release of kernel v6.16 on the July 27 and ended on September 28 (63 days), includes 13089 new commits:

$ git log --oneline --no-merges v6.16..v6.17 | wc -l
13089

And, as usual, the list of new features and changes is huge and scattered all over the code. Here are some subjective highlights which may be worth looking into:

  • Attack vector controls reorganisation to make it easier to control which CPU mitigations (x86 Spectre) are applied.
  • Scheduler support for uniprocessor configurations has been dropped.
  • There are two new system calls, file_getattr and file_setattr, used to set/get extended file attributes.
  • The usual set of new Rust additions.

For the details on what has changed with this Linux 6.17 release, the best starting point is the awesome KernelNewbies ChangeLog.

As for the regular Igalia contributions, the full log is listed below, after a quick summary of the main changes.

GPU drivers in the Linux Kernel

In the DRM (Direct Rendering Manager) subsystem, we worked on creating and implementing the new dma-fence safe access rules and APIs which enable drivers to export fences shared via mechanisms, such as the Android sync_file framework, in a safe manner. We then converted the Intel xe driver to comply with the new rules, which fixed an existing use-after-free condition.

On the TTM (Translation Table Manager) front, we made the shrinker more responsive by making it respect the contract expected by the kernel’s memory management layer, and by also shrinking the TTM pools more effectively.

In the DRM scheduler space, we continued with the code base clean-ups both via contributing patches and by providing reviews.

Intel Xe driver

Going back to the Intel’s xe driver, and on the road of improving support for older GPUs such as Alderlake and Meteorlake, we landed some refactoring work which will in the future enable adding some missing hardware workarounds and also adding support for scanning out compressed surfaces.

GPU resets

Continuing our GPU reset efforts, we added new fields for the wedged event API: the PID and name of the task involved in the reset. This allows user-space tools, like compositors, to display to the user some information about what just happened. For instance, a message box that saying “<Game name> caused a GPU error and was terminated”. User-space may also implement strict policies if a given task is causing resets too often, like preventing it from starting for a duration of time. Prior to this work, there was no way for user-space tools to know what task was involved in the GPU reset.

In addition to providing more information about what triggered a GPU reset, we also worked to prevent GPU resets in cases of false-positive GPU hangs due to job timeout detection. We started investigating this issue after noticing BOs (buffer objects) leaks in the Raspberry Pi 4. We noticed that the DRM scheduler could inform a job timeout and trigger a GPU reset when the GPU was not hung and the timed-out job was still running. To address this, we developed mechanisms to have the timeout callback inform the DRM scheduler via return code about a false-positive GPU hang, i.e., we added a new DRM scheduling status that allows a driver to ignore the reset. This new status indicates that the job should be reinserted into the pending list, after which the driver will still signal its completion and free its resources.

Another round of bug fixes

And, as usual, there was another round of bug fixes and cleanups in the DRM drivers. Some of these involved color management in the AMD graphics driver. Others aimed to simplify the code around mutexes and remove compilation warnings. Finally, we also made minor improvements to the MSM driver and the VKMS KUnit tests.

Igalia Changelog

Authored (48)

André Almeida

Maíra Canal

Melissa Wen

Thadeu Lima de Souza Cascardo

Tvrtko Ursulin

Reviewed (41)

André Almeida

Maíra Canal

Rodrigo Siqueira

Tvrtko Ursulin

Acked (5)

Changwoo Min

Maíra Canal

Tvrtko Ursulin