All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
Cc: "hoegsberg@gmail.com" <hoegsberg@gmail.com>,
	"dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>
Subject: Re: [RFC PATCH] drm: Add plane event
Date: Thu, 19 Apr 2012 10:10:50 +0200	[thread overview]
Message-ID: <20120419081049.GD4256@phenom.ffwll.local> (raw)
In-Reply-To: <20120418181942.GT4917@intel.com>

On Wed, Apr 18, 2012 at 09:19:42PM +0300, Ville Syrjälä wrote:
> On Wed, Apr 18, 2012 at 07:06:10PM +0300, Ville Syrjälä wrote:
> > On Wed, Apr 18, 2012 at 05:27:57PM +0200, Daniel Vetter wrote:
> > > Also, I'm toying around with ideas to split up the big modeset lock such
> > > that operations that only touch the crtc (like pageflip, plane changes and
> > > cursor changes) do not take the big modeset lock but only a per-crtc
> > > mutex.
> > 
> > Plane operations might well involve multiple CRTCs (when moving the
> > planes between pipes for example). You have to be careful with the
> > locking order when doing stuff like that. One option would be to
> > always take the per-CRTC locks in the same order (based on the
> > object ID for example).
> 
> Multiple locks will also cause problems for the atomic mode set. The
> full device state may be needed to evaluate whether a certain change
> is allowed, which means any change happening in parallel can screw
> things up.

Imo we can simply demand that any operation which touches more than 1 crtc
needs the big modeset lock. So atomic modeset would still take this look,
but modeset is a really rare operation, so no point to optimize for it.
The only issue I see is with switching a sprite from one crtc to another,
with that design this would also require the big modeset look. But
Kristian just brought up the idea of a prepare_sprite ioctl, so we could
do the crtc switch there, and userspace could run this ioctl asynchronous
in a separate thread to avoid stalls (e.g. on the old gen2 intel overlay a
crtc switch takes 2 full vblanks to disable and 1 full vblank to set up on
the new crtc, then another vblank to show anything). The nuclear pageflip
would then only touch one single crtc, so never get stalled by other
modeset operations.
-Daniel
-- 
Daniel Vetter
Mail: daniel@ffwll.ch
Mobile: +41 (0)79 365 57 48

  reply	other threads:[~2012-04-19  8:09 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-18  4:31 [RFC PATCH] drm: Add plane event Joonyoung Shim
2012-04-18  8:46 ` Daniel Vetter
2012-04-18 10:11   ` Joonyoung Shim
2012-04-18 12:25     ` Rob Clark
2012-04-18 14:04       ` Marcus Lorentzon
2012-04-18 14:26         ` Ville Syrjälä
2012-04-18 14:36           ` Daniel Vetter
2012-04-18 15:10             ` Marcus Lorentzon
2012-04-18 15:27               ` Daniel Vetter
2012-04-18 15:55                 ` Marcus Lorentzon
2012-04-18 16:04                   ` Jesse Barnes
2012-04-18 19:08                   ` Daniel Vetter
2012-04-18 16:06                 ` Ville Syrjälä
2012-04-18 16:26                   ` Marcus Lorentzon
2012-04-18 18:19                   ` Ville Syrjälä
2012-04-19  8:10                     ` Daniel Vetter [this message]
2012-04-18 15:43               ` Luc Verhaegen
2012-04-18 16:00                 ` Marcus Lorentzon
2012-04-19  1:24             ` Kristian Høgsberg
2012-04-19  8:05               ` Daniel Vetter
2012-04-18 14:58           ` Marcus Lorentzon
2012-04-18 15:57             ` Jesse Barnes
2012-04-18 16:47 ` Luc Verhaegen

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=20120419081049.GD4256@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=hoegsberg@gmail.com \
    --cc=ville.syrjala@linux.intel.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.