From: "Ville Syrjälä" <syrjala@sci.fi>
To: Rob Clark <rob.clark@linaro.org>
Cc: "Ben Widawsky" <ben@bwidawsk.net>,
patches@linaro.org, daniel.vetter@ffwll.ch,
"Kristian Høgsberg" <hoegsberg@gmail.com>,
dri-devel@lists.freedesktop.org, "Clark, Rob" <rob@ti.com>
Subject: Re: [RFC 0/9] nuclear pageflip
Date: Sat, 15 Sep 2012 21:00:52 +0300 [thread overview]
Message-ID: <20120915180052.GV6512@sci.fi> (raw)
In-Reply-To: <CAF6AEGviVurOH7ACwTsXW8C44AvqDeApcSQKmKT2Z8ZRabFc=w@mail.gmail.com>
On Sat, Sep 15, 2012 at 11:05:29AM -0500, Rob Clark wrote:
> On Sat, Sep 15, 2012 at 9:53 AM, Ville Syrjälä <syrjala@sci.fi> wrote:
> > On Fri, Sep 14, 2012 at 05:46:35PM -0400, Kristian Høgsberg wrote:
> >> I think (hope) the consensus coming out of this thread is something
> >> along these lines:
> >>
> >> - We use properties for specifying what to change to be future
> >> compatible with new crtc features, but also to allow exposing
> >> hw-specific properties and tie them into the atomicity of the
> >> pageflip. The KMS overlays are a lowest-common denominator for all
> >> the various overlay types out there and it should be possible to write
> >> a piece of chipset specific compositor code to use features that can't
> >> be expressed through KMS overlays.
> >
> > Properties are good. Check.
> >
> >> - We have two types of properties: dynamic and non-dynamic ones.
> >> Dynamic properties can always be changed in the next frame (fb bos, hw
> >> cursor position, overlay position, for example), non-dynamic
> >> properties typically involve changing the way bandwidth are allocated
> >> and changing them may fail.
> >
> > There's just no way to make such a general split. The simple fact is
> > that even moving an overlay can fail due to timing/bandwith related
> > constraints.
>
> fwiw, the driver should indicate this by setting a flag on the
> property, this way userspace knows what can be changed dynamically and
> what can not.
OK maybe user space could notice that all of the properties it's
going to manipulate have that flag in the correct position. User space
could then skip the check ioctl, and proceed straight to the commit
phase with the nice feeling that it should not fail. But that's just
an optimization.
Or are you actually suggesting that changing any property with the
flag in the wrong position would require a full modeset, ie. force
you to take the blocking code path? That just won't fly.
> > So I propose that we have:
> > - One ioctl that takes an arbitrary number of obj/prop/value tuples
>
> well, to be fair, if we convert everything to properties, maybe
> drm/kms only needs one ioctl for everything :-P
Sure, why not ;) Well, we still have all the enumerations stuff and
whatnot. I see no point in changing those when they work adequately.
But actually setting the state of the hardware can be handled through
a single ioctl.
> But different ioctls are cheap.. I don't think it hurts to have two
> instead of one. I really don't see modeset and pageflip as the same
> thing. Maybe from the front-end of the video pipe, they are. But
> from encoder and back they are different. Modeset can take many
> vblank cycles to complete. And is infrequent. Introducing a
> state-machine to try to make this asynchronous is just adding a lot of
> complexity and potential fail for not really much gain.
I don't entirely agree with the infrequent part. Fullscreen video on
external displays is one case where you really may want to change the
mode quite often. Or you may not want to change the actual timings on
the display, but you still want to change the resolution of the CRTC,
and let a panel fitter handle the difference in input and output
resolutions. But thanks to the way kms is designed those two things
are both linked to the display mode of the CRTC, so you still need a
modeset to handle it.
> Even flip on multiple crtcs introduces some new edge cases, like
> moving a plane from one crtc to another. If this is split into two
> ioctl calls, then the test on the 2nd crtc can -EBUSY because the
> plane is still pending disconnect from the first. But the test on the
> 1st crtc can succeed. I can see the usefulness of flip on
> multi-crtc... but since it isn't nearly as useful/important as
> flipping multiple planes on a single crtc, I don't see the harm in
> starting simple and adding this later.
Forcing you to rewrite user space multiple times. And keeping all the
old codepaths around in both kernel and user space side to maintain
ABI compatibility both ways. Also the speed at which these things
trickle through to the actual users is very slow, so adding new ioctls
every six months to handle overlapping tasks is not sensible IMHO.
My _point_ is that there is no need to hardcode these restrictions
into the API. We already know what kind of API will handle all these
cases, so why can't we just go with that API from the very beginning?
--
Ville Syrjälä
syrjala@sci.fi
http://www.sci.fi/~syrjala/
next prev parent reply other threads:[~2012-09-15 18:00 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ä
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ä [this message]
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=20120915180052.GV6512@sci.fi \
--to=syrjala@sci.fi \
--cc=ben@bwidawsk.net \
--cc=daniel.vetter@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=hoegsberg@gmail.com \
--cc=patches@linaro.org \
--cc=rob.clark@linaro.org \
--cc=rob@ti.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.