All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pekka Paalanen <ppaalanen@gmail.com>
To: Rob Clark <robdclark@gmail.com>
Cc: dri-devel <dri-devel@lists.freedesktop.org>
Subject: Re: How to design a DRM KMS driver exposing 2D compositing?
Date: Tue, 12 Aug 2014 10:20:44 +0300	[thread overview]
Message-ID: <20140812102044.6732c8e3@gmail.com> (raw)
In-Reply-To: <CAF6AEGv=bimceHoEZFBVvkdhJjwyA5uC_WTbhVMm8u-AX56SQQ@mail.gmail.com>

On Mon, 11 Aug 2014 09:32:32 -0400
Rob Clark <robdclark@gmail.com> wrote:

> On Mon, Aug 11, 2014 at 8:06 AM, Daniel Vetter <daniel@ffwll.ch> wrote:
> > On Mon, Aug 11, 2014 at 01:38:55PM +0300, Pekka Paalanen wrote:
> >> What if I cannot even pick a maximum number of planes, but wanted to
> >> (as the hardware allows) let the 2D compositing scale up basically
> >> unlimited while becoming just slower and slower?
> >>
> >> I think at that point one would be looking at a rendering API really,
> >> rather than a KMS API, so it's probably out of scope. Where is the line
> >> between KMS 2D compositing with planes vs. 2D composite rendering?
> >
> > I think kms should still be real-time compositing - if you have to
> > internally render to a buffer and then scan that one out due to lack of
> > memory bandwidth or so that very much sounds like a rendering api. Ofc
> > stuff like writeback buffers blurry that a bit. But hw writeback is still
> > real-time.
> 
> not really sure how much of this is exposed to the cpu side, vs hidden
> on coproc..
> 
> but I tend to think it would be nice for compositors (userspace) to
> know explicitly what is going on..  ie. if some layers are blended via
> intermediate buffer, couldn't that intermediate buffer be potentially
> re-used on next frame if not damaged?

Very true, and I think that speaks for exposing the HVS explicitly to
user space to be directly used. That way I believe the user space could
track damage and composite only the minimum, rather than everything
every time which I suppose the KMS API approach would imply.

We don't have dirty regions in KMS API/props, do we? But yeah, that is
starting to feel like a stretch to push through KMS.

> >> Should I really be designing a driver-specific compositing API instead,
> >> similar to what the Mesa OpenGL implementations use? Then have user
> >> space maybe use the user space driver part via OpenWFC perhaps?
> >> And when I mention OpenWFC, you probably notice, that I am not aware of
> >> any standard user space API I could be implementing here. ;-)
> >
> > Personally I'd expose a bunch of planes with kms (enough so that you can
> > reap the usual benefits planes bring wrt video-playback and stuff like
> > that). So perhaps something in line with what current hw does in hw and
> > then double it a bit or twice - 16 planes or so. Your driver would reject
> > any requests that need intermediate buffers to store render results. I.e.
> > everything that can't be scanned out directly in real-time at about 60fps.
> > The fun with kms planes is also that right now we have 0 standards for
> > z-ordering and blending. So would need to define that first.
> >
> > Then expose everything else with a separate api. I guess you'll just end
> > up with per-compositor userspace drivers due to the lack of a widespread
> > 2d api. OpenVG is kinda dead, and cairo might not fit.
> 
> I kind of suspect someone should really just design weston2d, an api
> more explicitly for compositing.. model after OpenWFC if that fits
> nicely.  Or not if it doesn't.  Or just use the existing weston
> front-end/back-end split..
> 
> I expect other wayland compositors would want more or less the same
> thing as weston (barring pre-existing layer-cake mess..  cough, cough,
> cogl/clutter/gnome-shell..)
> 
> We could even make a gallium statetracker implementation of weston2d
> to get some usage on desktop..

Yeah. I suppose I should aim for whatever driver-specific
interface we need for the HVS to be used from user space, use that in
Weston, and get a feeling of what might be a nice, driver-agnostic 2D
compositing API.


Thanks,
pq

  parent reply	other threads:[~2014-08-12  7:20 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-11 10:38 How to design a DRM KMS driver exposing 2D compositing? Pekka Paalanen
2014-08-11 10:57 ` Damien Lespiau
2014-08-11 12:07   ` Pekka Paalanen
2014-08-11 13:14     ` Damien Lespiau
2014-08-11 13:44       ` Pekka Paalanen
2014-08-11 12:06 ` Daniel Vetter
2014-08-11 12:47   ` Pekka Paalanen
2014-08-11 15:35     ` Daniel Vetter
2014-08-11 16:09       ` Ville Syrjälä
2014-08-11 17:21         ` Daniel Vetter
2014-08-12  7:10       ` Pekka Paalanen
2014-08-11 13:32   ` Rob Clark
2014-08-11 15:24     ` Daniel Vetter
2014-08-12  7:20     ` Pekka Paalanen [this message]
2014-08-12  8:03       ` Daniel Vetter
2014-08-12 10:04         ` Ville Syrjälä
2014-08-11 17:16   ` Eric Anholt
2014-08-11 17:27     ` Daniel Vetter
2014-08-12  8:48       ` Pekka Paalanen
2014-08-12 16:10         ` Eric Anholt
2014-08-13  7:02           ` Pekka Paalanen
2014-08-11 14:37 ` Matt Roper
2014-08-12  8:42   ` Pekka Paalanen

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=20140812102044.6732c8e3@gmail.com \
    --to=ppaalanen@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=robdclark@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.