All of lore.kernel.org
 help / color / mirror / Atom feed
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
Subject: Re: [RFC 0/9] nuclear pageflip
Date: Sat, 15 Sep 2012 22:08:02 +0300	[thread overview]
Message-ID: <20120915190801.GW6512@sci.fi> (raw)
In-Reply-To: <CAF6AEGuqs-GgbTNRkmRc40GBShPKcOFZaa=g-6FBFBooWFqs5Q@mail.gmail.com>

On Sat, Sep 15, 2012 at 12:15:59PM -0500, Rob Clark wrote:
> On Sat, Sep 15, 2012 at 12:04 PM, Ville Syrjälä <syrjala@sci.fi> wrote:
> > On Sat, Sep 15, 2012 at 11:07:02AM -0500, Rob Clark wrote:
> >> On Sat, Sep 15, 2012 at 9:56 AM, Ville Syrjälä <syrjala@sci.fi> wrote:
> >> > On Fri, Sep 14, 2012 at 09:12:35PM -0500, Rob Clark wrote:
> >> >> On Thu, Sep 13, 2012 at 11:35 AM, Rob Clark <rob.clark@linaro.org> wrote:
> >> >> > note that the test phase doesn't need vblank events, and also
> >> >> > shouldn't -EBUSY if there is still a pending flip[*], so I'd propose
> >> >> > that however we go about pageflip (one super-ioctl, or one per crtc),
> >> >> > we could use the atomic-modeset ioctl for the test step
> >> >>
> >> >> actually, I think I take this back..  one thing that was discussed on
> >> >> IRC, but didn't make it to this email thread is the behavior of
> >> >> non-specified properties.  What I am thinking:
> >> >>
> >> >> modeset: unspecified properties revert to default
> >> >> pageflip: unspecified properties preserve current value
> >> >
> >> > Why on earth would you want to revert stuff to default? That's only
> >> > going to make the code more complex.
> >>
> >> well, you need to do it *somewhere*..  possibly it can be on drm file
> >> close or dropmaster.  But modeset seems like a sensible place.  I
> >> really hate the v4l2 approach of preserving settings for the next
> >> process that opens the device.
> >
> > Ah so it's the same workaround for lack of proper state management.
> > Each master should just have its own state. Or if that's too much to
> > ask, at least the reset could be done only when the master changes.
> >
> > If you do it at modeset time, which props do you reset anyway? All of
> > them for the whole device? Just the ones related to the CRTCs undergoing
> > the modeset? What if there's some conflict between the default values
> > on that CRTC and the current values on another CRTC? What about properties
> > for planes that can move across CRTCs? This kind of partial state reset
> > opens up a lot of open questions, so a full reset at master switch seems
> > a lot more sensible.
> 
> Well, if you reset *all* properties on modeset, then crtcs's that
> aren't set in the modeset go off..  atomic-modeset is userspace saying
> "here is the entire config I want.. go make it happen".  But I guess
> it does get a bit easier to implement legacy setcrtc on top of the new
> mechanism if untouched properties preserve their value.

Yeah. I don't see much point in maintaining the state stometimes,
but sometimes not. Either do or do not.

> I could live w/ just reset on master change.. that meets my minimum
> requirement of not carrying state between different processes using
> the device.

> Having a flag indicating 'reset untouched properties'
> would be useful if the default behavior is to preserve.

Perhaps. Or perhaps some way to query the default values of properties.

> I still think setcrtc and pageflip shouldn't be mashed into a single ioctl :-)

So instead of one ioctl w/ async flag, you want one sync ioctl and one
async ioctl. Sure, why not. Both would en up doing much of the same
things when collecting and verifying the state, but sharing the code is
easy anyway.

But I'm actually not sure what everyone wants from the sync ioctl,
especially when you use it for somthing that doesn't involve changing
the timings. Should it behave like the current setcrtc, setplane etc.
where the ioctl is free to execute asynchronously, but without any way
to get a completion event? Or should it always block until the operation
is truly complete?

-- 
Ville Syrjälä
syrjala@sci.fi
http://www.sci.fi/~syrjala/

  reply	other threads:[~2012-09-15 19:08 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ä [this message]
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=20120915190801.GW6512@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 \
    /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.