On Tue, 26 Sep 2017 09:07:45 -0700 Thomas Hellstrom <thellstrom@xxxxxxxxxx> wrote: > On 09/26/2017 01:18 AM, Daniel Vetter wrote: > > On Sun, Sep 24, 2017 at 07:41:45PM +0200, Thomas Hellstrom wrote: > >> Hi, list! > >> > >> Page flips, while efficient on real hardware, aren't that efficient in other > >> situations, like for virtual devices with local, or even worse, remote > >> desktops. > >> We might ending up forwarding or encoding a couple of full frames worth of > >> data instead of a small region at a cursor blink. > >> > >> Now there is this extension EGL_KHR_swap_buffers_with_damage, and > >> gnome-shell/wayland on KMS also has a damage region that it forwards all the > >> way down to the function where page-flip is called. > > Wrt single dirty rect vs. rectlist: I'd opt for a single rect since that > > makes the interface easier. Currently most drivers collapes the list > > passed to fb_funcs->dirty to a single rect, so that seems good enough, and > > a nice simplification of the interface (both uapi and driver). > > I think multiple cliprects had its benefits for old X type rendering: > Frontbuffer-type diagonal > lines benchmarked with x11perf and similar. Now that everybody's > compositing that use-case is mostly gone, and as you say > most driver coalesce anyway. Even we to some extent, at least on newer > "hardware" versions. Hi, it still is awfully easy to create a pathological use case where collapsing into a single rect adds a thousand-fold more pixels to the damage than having more than one rectangle would allow: two tiny animations at the opposite corners of a screen. I'm thinking Wayland compositors here. Simplifying damage regions while not crashing down to just one rectangle is quite possible I believe. Let userspace do simplification from hundreds down to a few rectangles, and then collapse into one rectangle in the driver if absolutely necessary. That's what I'd hope. It is totally fine to require non-overlapping rectangles. You could even demand a specific layout of rectangles, e.g. the form Pixman regions use. You can also put an arbitrary cap on how many rectangles are allowed. Thanks, pq
Attachment:
pgpVf5T7dnk3q.pgp
Description: OpenPGP digital signature
_______________________________________________ dri-devel mailing list dri-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/dri-devel