Skip to content
Snippets Groups Projects
Commit fcbafdfd authored by Adam Jackson's avatar Adam Jackson :headphones: Committed by Hans de Goede
Browse files

modesetting: Implement a double-buffered shadow mode


Server GPUs often have a VNC feature attached to allow remote console.
The controller implementing this feature is usually not very powerful,
and we can easily swamp it with work.  This is made somewhat worse by
damage over-reporting the size of the dirty region, and a whole lot
worse by applications (or shells) that update the screen with identical
pixel content as was already there.

Fix this by double-buffering the shadow fb, using memcmp to identify
dirty tiles on each update pass.  Since both shadows are in host memory
the memcmp is cheap, and worth it given the win in network bandwidth.
The tile size is somewhat arbitrarily chosen to be one cacheline wide at
32bpp on Intel Core.

By default we enable this behaviour for (a subset of) known server GPUs;
the heuristic could use work.

Signed-off-by: Adam Jackson's avatarAdam Jackson <ajax@redhat.com>
Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
parent 75e660e3
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment