dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Pekka Paalanen <ppaalanen@gmail.com>
To: Thomas Hellstrom <thellstrom@vmware.com>
Cc: "dri-devel@lists.freedesktop.org" <dri-devel@lists.freedesktop.org>
Subject: Re: RFC: page-flip with damage?
Date: Thu, 12 Oct 2017 13:55:40 +0300	[thread overview]
Message-ID: <20171012135540.7c20eb2f@eldfell> (raw)
In-Reply-To: <ed4a088b-07c1-a550-af1c-ae27296e9509@vmware.com>


[-- Attachment #1.1: Type: text/plain, Size: 2222 bytes --]

On Tue, 26 Sep 2017 09:07:45 -0700
Thomas Hellstrom <thellstrom@vmware.com> 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 #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2017-10-12 10:55 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-24 17:41 RFC: page-flip with damage? Thomas Hellstrom
2017-09-24 21:32 ` Rob Clark
2017-09-25 13:18   ` Noralf Trønnes
2017-09-26  7:01 ` Michal Lukaszek
2017-10-12 17:25   ` Deepak Singh Rawat
2017-09-26  8:18 ` RFC: " Daniel Vetter
2017-09-26 16:07   ` Thomas Hellstrom
2017-10-12 10:55     ` Pekka Paalanen [this message]
2017-10-12 14:51       ` Sean Paul
2017-10-13  6:41         ` Pekka Paalanen
2017-11-27  8:03   ` Thomas Hellstrom
2017-11-27  8:25     ` Daniel Vetter
2017-11-27  9:59       ` Thomas Hellstrom
2017-11-27 10:08         ` Daniel Vetter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171012135540.7c20eb2f@eldfell \
    --to=ppaalanen@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=thellstrom@vmware.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox