DRM page-flip with damage for weston
daniel at fooishbar.org
Fri Jul 20 11:26:22 UTC 2018
On Fri, 20 Jul 2018 at 12:21, Deepak Singh Rawat <drawat at vmware.com> wrote:
> In brief the damage is in frame-buffer coordinate of attached fb to the plane.
> Unlike plane src coordinates, damage clips are not in 16.16 fixed point. Damage
> during page flip is helpful for some drivers like vmwgfx where each framebuffer
> change needs to be transmitted over network, usb, etc.
> Now that I have some code ready and got it working for vmwgfx driver, the
> next step is to change weston to send damage during page flip. With my current
> understanding of weston I think the damage received during
> weston_output.repaint() is exactly what I am looking for ? Does this damage
> region during weston_output.repaint() is in frame-buffer coordinate ?
The damage region received during output repaint is in Weston's global
co-ordinate space. To shift to CRTC co-ordinates, you need to
translate the damage region by (-output->x, -output->y). When we are
using the renderer, there is no scaling, so CRTC co-ordinates and
framebuffer co-ordinates are guaranteed to be equal. This only
accounts for the primary plane; damage to views on other planes is
Also, if you are not already working from git master, I recommend you
do so, as the DRM backend has changed hugely since 4.0.0.
More information about the wayland-devel