All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Jesse Barnes <jbarnes@virtuousgeek.org>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [RFC][PATCH 0/10] Atomic modesetting v2
Date: Wed, 27 Jun 2012 21:37:41 +0300	[thread overview]
Message-ID: <20120627183741.GC3217@intel.com> (raw)
In-Reply-To: <20120627094826.0f27c10c@jbarnes-desktop>

On Wed, Jun 27, 2012 at 09:48:26AM -0700, Jesse Barnes wrote:
> On Wed, 27 Jun 2012 13:24:02 +0300
> ville.syrjala@linux.intel.com wrote:
> 
> > Second version of the atomic mode setting work. Still very much
> > work in progress.
> > 
> > I decided that I can't afford to fight the drm_crtc_helper
> > architecture due to the sheer amount of driver code depending on it.
> > So I changed the code to do things in way that more closely matches
> > drm_crtc_helper.
> 
> :(
> 
> > Next I'll be moving the buffer pinning to happen before any hw state
> > is clobbered. This will avoid having to do actual rollbacks when
> > pinning fails. And a similar treatment needs to be done to the PLL
> > calculations (those should be done before buffer pinning).
> > 
> > I didn't re-post all the i915 specific bits I have in my tree since those
> > didn't really change. I pushed the whole work to the drm_atomic_2 branch
> > at https://gitorious.org/vsyrjala/linux.
> 
> OTOH introducing an atomic alternative to the helper stuff and moving
> drivers over would probably end up looking a lot nicer.  But there's no
> doubt that's a huge chunk of work...

I'm thinking that it should be doable. Well, at least for all the "core"
features, but I'm not quite sure how it would handle all driver specific
properties in a nice way. Basically what I have now in intel_atomic.c
could become the new helper, but then it needs somehow to defer to the
driver for some of the props.

So either the driver needs to collect the state for those somehow, or we
have the core do it the same way as for other objects, ie. overwrite
the object state with the new values as we go on, and then roll back
later if necessary. But then we potentially need to save/restore all
properties in the beginning and end of the operation, or we could try
to do it in some lazy fashion.

> The other thing I'm worried about with atomic mode setting is handling
> the legacy case properly.  We'll still need to handle apps that want to
> change one CRTC at a time without altering the state of other CRTCs.
> In an atomic context, drivers should be able to assume they can shut
> anything off that doesn't come in as part of the atomic state, which
> means when we build a compat atomic setup, we'll need to read the
> current state of any existing objects and pass them in to the driver...

My current code collects the current state in the beginning (or rather
it saves the state of all the objects in the beginning) and starts
to modify the current state of the objects as new values are read in by
the ioctl handler. Anything not part of the atomic modeset is left
untouched.

-- 
Ville Syrjälä
Intel OTC

      parent reply	other threads:[~2012-06-27 18:37 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-27 10:24 [RFC][PATCH 0/10] Atomic modesetting v2 ville.syrjala
2012-06-27 10:24 ` [RFC][PATCH 01/10] drm: Export drm_property_create_blob() and drm_property_destroy_blob() ville.syrjala
2012-06-27 10:24 ` [RFC][PATCH 02/10] drm: Allow signed values for range properties ville.syrjala
2012-06-27 10:24 ` [RFC][PATCH 03/10] drm: Allow drm_mode_object_find() to look up an object of any type ville.syrjala
2012-06-27 10:24 ` [RFC][PATCH 04/10] drm: Export drm_encoder_crtc_ok ville.syrjala
2012-06-27 10:24 ` [RFC][PATCH 05/10] drm: Export drm_crtc_prepare_encoders() ville.syrjala
2012-06-27 10:24 ` [RFC][PATCH 06/10] drm: Refactor object property check code ville.syrjala
2012-06-27 10:24 ` [RFC][PATCH 07/10] drm: Add MODE_IDS property to connectors ville.syrjala
2012-06-27 10:24 ` [RFC][PATCH 08/10] WIP: drm: Atomic modeset ioctl ville.syrjala
2012-08-31 22:47   ` Rob Clark
2012-09-01 11:12     ` Daniel Vetter
2012-09-01 15:58       ` Rob Clark
2012-09-01 16:56         ` Daniel Vetter
2012-09-01 18:05           ` Rob Clark
2012-06-27 10:24 ` [RFC][PATCH 09/10] drm/i915: Split clipping and checking from update_plane hook ville.syrjala
2012-06-27 10:24 ` [RFC][PATCH 10/10] WIP drm/i915: "Atomic" modeset test implementation ville.syrjala
2012-06-27 16:48 ` [RFC][PATCH 0/10] Atomic modesetting v2 Jesse Barnes
2012-06-27 17:11   ` Adam Jackson
2012-06-27 17:50     ` Dave Airlie
2012-06-27 18:37   ` 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=20120627183741.GC3217@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jbarnes@virtuousgeek.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.