Optimizes pixman renderer by: - optimizing compositing damage in DRM/pixman
Reduce Weston's CPU usage by avoiding unnecessary compositing when updating the shadow buffer in pixman-renderer, under the DRM backend. The test was a proprietary graphical X11 application in demo mode. The effect is a drop of total system CPU usage from 0.41 to 0.33. - optimizing shadow buffer usage The shadow framebuffer is an intermediate buffer where the scene is composited and then copied from the shadow to the actual hardware buffer. This extra step costs memory bandwidth compared to compositing directly into a hardware buffer. Weston's DRM-backend with the Pixman-renderer uses a shadow framebuffer by default. Especially on systems with dedicated VRAM, read-modify-write cycles (a.k.a blending) into the scanout-capable buffer can be very slow. Also the scanout pixel format may not be optimal for compositing. Therefore Weston takes the safe default to always use a shadow framebuffer. However, in our use case, the hardware does not have dedicated VRAM behind a relatively slow bus, and the graphical load has practically no blending. We can reduce Weston's CPU usage quite a lot by not using the shadow frambuffer. We test on proprietary graphical X11 application in demo mode. Using perf we measure that this change improve weston CPU usage by 13% with dual display and 11% with clone mode. Pekka Paalanen (4): pixman,drm: do not composite previous damage pixman: make shadow buffer optional compositor-drm: expose global shadow flag for pixman main: add setting for DRM/pixman shadow framebuffer compositor/main.c | 3 ++ libweston/compositor-drm.c | 30 +++++++------ libweston/compositor-drm.h | 3 ++ libweston/compositor-fbdev.c | 3 +- libweston/compositor-headless.c | 3 +- libweston/compositor-rdp.c | 5 ++- libweston/compositor-wayland.c | 3 +- libweston/compositor-x11.c | 6 ++- libweston/pixman-renderer.c | 99 ++++++++++++++++++++++++++++------------- libweston/pixman-renderer.h | 13 +++++- man/weston-drm.man | 4 ++ 11 files changed, 118 insertions(+), 54 deletions(-) -- 1.8.3.1 _______________________________________________ wayland-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/wayland-devel
