Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Sean Paul <seanpaul@chromium.org>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>,
	Intel Graphics Development <intel-gfx@lists.freedesktop.org>,
	DRI Development <dri-devel@lists.freedesktop.org>,
	Daniel Vetter <daniel.vetter@intel.com>
Subject: Re: [PATCH] drm: Handle atomic state properly in kms getfoo ioctl
Date: Wed, 26 Nov 2014 18:21:09 +0100	[thread overview]
Message-ID: <20141126172109.GO32117@phenom.ffwll.local> (raw)
In-Reply-To: <CAOw6vbJhYwV3K9A=6r8CXU9j_9v-e5+6uDKgEPb3OQs+Zzf1Lw@mail.gmail.com>

On Wed, Nov 26, 2014 at 10:52:24AM -0500, Sean Paul wrote:
> On Tue, Nov 25, 2014 at 5:50 PM, Daniel Vetter <daniel.vetter@ffwll.ch> wrote:
> > So the problem with async commit (especially async modeset commit) is
> > that the legacy pointers only get updated after the point of no
> > return, in the async part of the modeset sequence. At least as
> > implemented by the current helper functions. This is done in the
> > set_routing_links function in drm_atomic_helper.c.
> >
> > Which also means that access isn't protected by locks but only
> > coordinated by synchronizing with async workers. No problem thus far,
> > until we lock at the getconnector/encoder ioctls.
> >
> > So fix this up by adding special cases for atomic drivers: For those
> > we need to look at state objects. Unfortunately digging out the
> > correct encoder->crtc link is a bit of work, so wrap this up in a
> > helper function.
> >
> > Moving the assignments of connector->encoder and encoder->crtc earlier
> > isn't a good idea because the point of the atomic helpers is that we
> > stage the state updates. That way the disable functions can still
> > inspect the links and rely upon them.
> >
> > v2: Extract full encoder->crtc lookup into helper (Rob).
> >
> > v3: Extract drm_connector_get_encoder too since - we need to always
> > return state->best_encoder when there is a state otherwise we might
> > return stale data if there's a pending async disable (and chase
> > unlocked pointers, too). Same issue with encoder_get_crtc but there
> > it's a bit more tricky to handle.
> >
> > Cc: Rob Clark <robdclark@gmail.com>
> > Cc: Sean Paul <seanpaul@chromium.org>
> > Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
> 
> 
> My canary is still alive.
> 
> Reviewed-by: Sean Paul <seanpaul@chromium.org>
> Lightly-Tested-by: Sean Paul <seanpaul@chromium.org>

Put onto my atomic fixes pile, thanks for review&testing.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

      reply	other threads:[~2014-11-26 17:20 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-25 22:50 [PATCH] drm: Handle atomic state properly in kms getfoo ioctl Daniel Vetter
2014-11-26 13:00 ` [PATCH] drm: Handle atomic state properly in kms getfoo shuang.he
2014-11-26 15:52 ` [PATCH] drm: Handle atomic state properly in kms getfoo ioctl Sean Paul
2014-11-26 17:21   ` Daniel Vetter [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=20141126172109.GO32117@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=daniel.vetter@ffwll.ch \
    --cc=daniel.vetter@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=seanpaul@chromium.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox