All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Rob Clark <rob.clark@linaro.org>
Cc: daniel.vetter@ffwll.ch, dri-devel@lists.freedesktop.org,
	patches@linaro.org
Subject: Re: [RFC 1/9] drm: add atomic fxns
Date: Wed, 12 Sep 2012 21:03:19 +0300	[thread overview]
Message-ID: <20120912180319.GH9227@intel.com> (raw)
In-Reply-To: <CAF6AEGvO=yywQkrQ+LfF3Zk1UcBvJeTfZo16wiFdqboHRieC_g@mail.gmail.com>

On Wed, Sep 12, 2012 at 12:35:01PM -0500, Rob Clark wrote:
> On Wed, Sep 12, 2012 at 11:57 AM, Jesse Barnes <jbarnes@virtuousgeek.org> wrote:
> > On Sun,  9 Sep 2012 22:03:14 -0500
> > Rob Clark <rob.clark@linaro.org> wrote:
> >
> >> From: Rob Clark <rob@ti.com>
> >>
> >> The 'atomic' mechanism allows for multiple properties to be updated,
> >> checked, and commited atomically.  This will be the basis of atomic-
> >> modeset and nuclear-pageflip.
> >>
> >> The basic flow is:
> >>
> >>    state = dev->atomic_begin();
> >>    for (... one or more ...)
> >>       obj->set_property(obj, state, prop, value);
> >>    if (dev->atomic_check(state))
> >>       dev->atomic_commit(state, event);
> >>    dev->atomic_end(state);
> >
> > I think the above is more suited to drm_crtc_helper code.  I think the
> > top level callback should contain the arrays and be a single "multi
> > flip" hook (or maybe a check then set double callback).  For some
> > drivers that'll end up being a lot simpler, rather than sprinkling
> > atomic handling code in all the set_property callbacks.
> 
> well, there are a few other places in drm_crtc.c where I want to use
> the new API, to avoid drivers having to support both atomic API and
> old set_plane/page_flip stuff.. the transactional API makes that a bit
> easier, I think.. or at least I don't have to construct an array on
> the stack.

Usually you would need to build up the full state anyway before you can
tell if it's good or bad. I don't see what some big array would buy here.

> > Having a transactional API just seems a little messier with both the
> > atomic state and per-property state to track and rollback in the case
> > of failure.
> 
> For the rollback, I think I'm just going to move the array of property
> values into drm_{crtc,plane,etc}_state.  That way, userspace doesn't
> see updated property values if they are not committed.  It makes the
> property value rollback automatic.

This was my original idea as well. Separate the current and future
states cleanly. At the moment it's all mixed up inside the objects
somewhere. I sort of abandoned the idea so that I could avoid touching
too much driver code while prototyping the atomic modesetting, but
that's certainly the way I would design the system.

-- 
Ville Syrjälä
Intel OTC

  reply	other threads:[~2012-09-12 18:03 UTC|newest]

Thread overview: 61+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-10  3:03 [RFC 0/9] nuclear pageflip Rob Clark
2012-09-10  3:03 ` [RFC 1/9] drm: add atomic fxns Rob Clark
2012-09-12 16:57   ` Jesse Barnes
2012-09-12 17:35     ` Rob Clark
2012-09-12 18:03       ` Ville Syrjälä [this message]
2012-09-12 18:34         ` Rob Clark
2012-09-12 19:05       ` Jesse Barnes
2012-09-12 19:57         ` Rob Clark
2012-09-10  3:03 ` [RFC 2/9] drm: add object property type Rob Clark
2012-09-10  3:03 ` [RFC 3/9] drm: add DRM_MODE_PROP_DYNAMIC property flag Rob Clark
2012-09-10  3:03 ` [RFC 4/9] drm: convert plane to properties Rob Clark
2012-09-10  3:03 ` [RFC 5/9] drm: add drm_plane_state Rob Clark
2012-09-10  3:03 ` [RFC 6/9] drm: convert page_flip to properties Rob Clark
2012-09-10  3:03 ` [RFC 7/9] drm: add drm_crtc_state Rob Clark
2012-09-10  3:03 ` [RFC 8/9] drm: nuclear pageflip Rob Clark
2012-09-10  3:03 ` [RFC 9/9] drm/omap: update for atomic age Rob Clark
2012-09-10  3:19 ` [RFC 0/9] nuclear pageflip Rob Clark
2012-09-11 21:15   ` Ben Widawsky
2012-09-11 22:07     ` Rob Clark
2012-09-12  8:59       ` Ville Syrjälä
2012-09-12 12:30         ` Rob Clark
2012-09-12 14:23           ` Ville Syrjälä
2012-09-12 14:28             ` Rob Clark
2012-09-12 14:34               ` Ville Syrjälä
2012-09-12 14:42                 ` Rob Clark
2012-09-12 15:12                   ` Ville Syrjälä
2012-09-12 15:23                     ` Rob Clark
2012-09-12 15:32                       ` Ville Syrjälä
2012-09-12 15:48                         ` Rob Clark
2012-09-12 17:27                           ` Ville Syrjälä
2012-09-12 18:00                             ` Clark, Rob
2012-09-12 18:58                               ` Ville Syrjälä
2012-09-12 19:40                                 ` Rob Clark
2012-09-13  8:40                                   ` Ville Syrjälä
2012-09-13 13:39                                     ` Rob Clark
2012-09-13 14:29                                       ` Ville Syrjälä
2012-09-13 16:35                                         ` Rob Clark
2012-09-14 12:50                                           ` Ville Syrjälä
2012-09-14 13:25                                             ` Rob Clark
2012-09-14 13:58                                               ` Ville Syrjälä
2012-09-14 14:45                                                 ` Rob Clark
2012-09-14 15:48                                                   ` Ville Syrjälä
2012-09-14 16:29                                                     ` Rob Clark
2012-09-14 17:02                                                       ` Ville Syrjälä
2012-09-14 17:34                                                         ` Rob Clark
2012-09-14 18:23                                                           ` Ville Syrjälä
2012-09-14 21:51                                                             ` Rob Clark
2012-09-15  2:12                                           ` Rob Clark
2012-09-15 14:56                                             ` Ville Syrjälä
2012-09-15 16:07                                               ` Rob Clark
2012-09-15 17:04                                                 ` Ville Syrjälä
2012-09-15 17:15                                                   ` Rob Clark
2012-09-15 19:08                                                     ` Ville Syrjälä
2012-09-15 20:16                                                       ` Rob Clark
2012-09-14 21:14                                 ` Jesse Barnes
2012-09-14 21:42                                   ` Rob Clark
2012-09-14 21:46                                   ` Kristian Høgsberg
2012-09-15 14:53                                     ` Ville Syrjälä
2012-09-15 16:05                                       ` Rob Clark
2012-09-15 18:00                                         ` Ville Syrjälä
2012-09-15 20:10                                           ` Rob Clark

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=20120912180319.GH9227@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=daniel.vetter@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=patches@linaro.org \
    --cc=rob.clark@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.