All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Greg Hackmann <ghackmann@google.com>
Cc: "linaro-mm-sig@lists.linaro.org" <linaro-mm-sig@lists.linaro.org>,
	Erik Gilling <konkers@google.com>,
	"dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>
Subject: Re: [RFC 0/4] Atomic Display Framework
Date: Fri, 30 Aug 2013 17:01:59 +0300	[thread overview]
Message-ID: <20130830140159.GJ11428@intel.com> (raw)
In-Reply-To: <CAJKQeMaapgSE-8QAfropVdjsXi5gY+5mraw9kZYqoyEqZNpqkA@mail.gmail.com>

On Thu, Aug 29, 2013 at 04:26:08PM -0700, Greg Hackmann wrote:
> On Thu, Aug 29, 2013 at 12:36 AM, Ville Syrjälä <
> ville.syrjala@linux.intel.com> wrote:
> 
> > On Wed, Aug 28, 2013 at 11:51:59PM -0400, Rob Clark wrote:
> > > On Wed, Aug 28, 2013 at 9:51 PM, Greg Hackmann <ghackmann@google.com>
> > wrote:
> >
> > > 1.  The API is geared toward updating one object at a time.  Android's
> > graphics stack needs the entire screen updated atomically to avoid tearing,
> > and on some SoCs to avoid wedging the display hardware.  Rob Clark's atomic
> > modeset patchset worked, but copy/update/commit design meant the driver had
> > to keep a lot more internal state.
> > > >
> > >
> > > I'm not entirely sure how to avoid that, because at least some hw we
> > > need to have the entire new-state in order to validate if it is
> > > possible.
> >
> > I guess the only reason adf is a bit different is that there can only be
> > one custom (driver specific!) blob in the ioctl, so the driver is just
> > free to dump that directly into whatever internal structure it uses to
> > store the full state. So it just frees you from the per-prop state
> > buildup process.
> >
> 
> Right, the difference is that clients send the complete state they want
> rather than deltas against the current state.  This means the driver
> doesn't have to track its current state and duplicate it at the beginning
> of the flip operation, which is a minor pain on hardware with a ton of
> knobs to twist across different hardware blocks.

You could just keep around the same big blob you would expect from the
client, and incrementally update it. Not a big problem in my mind.

> 
> Maybe the important question is whether incremental atomic updates is a
> use-case that clients need in practice.  SurfaceFlinger tells the HW
> composer each frame "here's a complete description of what I want onscreen,
> make it so" and IIRC Weston works the same way.

Complete is a big word. There can be quite a bit of (either per plane,
or per crtc) state that doesn't change all that often, like gamma
ramps/luts, color adjustemnt knobs, etc. Some user space applications
probably won't even care about most of that, but with your approach
they're anyway forced to deal with it.

> 
> I used a blob rather than property/value pairs because the composition is
> going to be inherently device specific anyway.  Display controllers have
> such different features and constraints that you'd end up with each driver
> exposing a bunch of hardware-specific properties, and I'm not convinced
> that's any better than just letting the driver dictate how the requests are
> structured (modulo a handful of hardware-agnostic properties).  I'm not
> strongly tied to blobs over properties but I think the former's easier on
> driver developers.

Sure, there's a certainly stuff that's hardware specific, but I'm sure
most of the properties can be abstracted reasonably well for "normal"
hardware.

There are of course hardware specific restrictions on which combinations
of property values are valid. I have no good solution to this problem.
ATM the plan is just return EINVAL for the whole operation, or possibly
allow the driver to adjust things a bit to make it work almost like the
user requested. We may need some knob to select between strict and
relaxed modes.

-- 
Ville Syrjälä
Intel OTC

      parent reply	other threads:[~2013-08-30 14:02 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-29  1:51 [RFC 0/4] Atomic Display Framework Greg Hackmann
2013-08-29  1:51 ` [RFC 1/4] video: Add generic display entity core Greg Hackmann
2013-08-29  1:51 ` [RFC 2/4] video: add atomic display framework Greg Hackmann
2013-08-29  1:51 ` [RFC 3/4] video: adf: add display core helper Greg Hackmann
2013-08-29  1:51 ` [RFC 4/4] video: adf: add memblock helper Greg Hackmann
2013-08-29  3:51 ` [RFC 0/4] Atomic Display Framework Rob Clark
2013-08-29  7:01   ` [Linaro-mm-sig] " Daniel Vetter
2013-08-29  7:58     ` Ville Syrjälä
2013-08-29  8:52       ` Damien Lespiau
2013-08-29 12:59       ` Rob Clark
2013-08-29 12:25     ` Rob Clark
2013-08-29  7:36   ` Ville Syrjälä
2013-08-29 12:54     ` Rob Clark
2013-08-29 23:34       ` Greg Hackmann
2013-08-30 14:00         ` Rob Clark
2013-08-30 14:11           ` Ville Syrjälä
2013-09-02  7:39           ` Daniel Vetter
2013-09-02 13:19             ` Rob Clark
2013-09-02 15:26               ` Alex Deucher
2013-08-29 23:26     ` Greg Hackmann
2013-08-30 13:55       ` Rob Clark
2013-08-30 14:01       ` Ville Syrjälä [this message]

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=20130830140159.GJ11428@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=ghackmann@google.com \
    --cc=konkers@google.com \
    --cc=linaro-mm-sig@lists.linaro.org \
    /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.