[PATCH weston 0/4] Optimize pixman renderer

Pekka Paalanen ppaalanen at gmail.com
Mon May 21 13:29:02 UTC 2018


Hi,

this series was originally written by me as you can see, and Fabien
lifted the patches, reviewed, tested and submitted them. If no-one
objects, I would like to land these on Thursday.


Thanks,
pq


On Mon, 23 Apr 2018 11:44:55 +0200
Fabien Lahoudere <fabien.lahoudere at collabora.com> wrote:

> 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(-)
> 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/wayland-devel/attachments/20180521/bc93cc88/attachment.sig>


More information about the wayland-devel mailing list