DRM page-flip with damage for weston

Pekka Paalanen ppaalanen at gmail.com
Fri Aug 3 09:30:51 UTC 2018


On Fri, 20 Jul 2018 12:26:22 +0100
Daniel Stone <daniel at fooishbar.org> wrote:

> Hi Deepak,
> 
> 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
> considered separately.

Hi,

that explanation misses the output transform and scale, which need to be
taken into account when converting from the global damage space into
the framebuffer damage space.

To see how to get the renderer damage in framebuffer coordinates, see
gl_renderer_repaint_output() and how the path using
swap_buffers_with_damage works. Mind, that EGL damage coordinate system
might be y-flipped compared to what you need.

The pixman renderer has similar code to handle damage and might be
easier to follow: region_global_to_output().


Thanks,
pq
-------------- 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/20180803/3e5403bc/attachment.sig>


More information about the wayland-devel mailing list