Skip to content

backend: Copy damage rectangles to secondary GPU

Hi there,

I would like to propose another performance optimisation, this time for AMD+Displaylink specifically.

Systems with AMD GPUs do not take advantage of Mutter's zero-copy path when driving Displaylink screens. Instead they fall back on primary GPU doing a texture copy. The reason is that CPU access to rendered pixels on the zero copy path is extremely slow (see: https://github.com/DisplayLink/evdi/pull/282). I reckon it is a known problem with AMD GPUs, similar issue I believe has been reported here: !1442 (merged)). This MR accelerates that additional texture copy by working through damage regions only.

Tests on a 4K screen with windowed applications show significant reduction of GPU utilisation, see attached: before after

Many thanks,

Piotr

Edited by Piotr Łopatka

Merge request reports