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 <ajax@redhat.com> Reviewed-by:
Alex Deucher <alexander.deucher@amd.com> Signed-off-by:
Hans de Goede <hdegoede@redhat.com>
Showing
- hw/xfree86/drivers/modesetting/driver.c 125 additions, 5 deletionshw/xfree86/drivers/modesetting/driver.c
- hw/xfree86/drivers/modesetting/driver.h 1 addition, 0 deletionshw/xfree86/drivers/modesetting/driver.h
- hw/xfree86/drivers/modesetting/drmmode_display.c 7 additions, 0 deletionshw/xfree86/drivers/modesetting/drmmode_display.c
- hw/xfree86/drivers/modesetting/drmmode_display.h 2 additions, 0 deletionshw/xfree86/drivers/modesetting/drmmode_display.h
Loading
Please register or sign in to comment