From: Marcus Lorentzon <marcus.xm.lorentzon@stericsson.com>
To: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
Cc: "dri-devel@lists.freedesktop.org" <dri-devel@lists.freedesktop.org>
Subject: Re: [RFC PATCH] drm: Add plane event
Date: Wed, 18 Apr 2012 16:58:36 +0200 [thread overview]
Message-ID: <4F8ED69C.3040905@stericsson.com> (raw)
In-Reply-To: <20120418142607.GR4917@intel.com>
On 04/18/2012 04:26 PM, Ville Syrjälä wrote:
> On Wed, Apr 18, 2012 at 04:04:56PM +0200, Marcus Lorentzon wrote:
>> On 04/18/2012 02:25 PM, Rob Clark wrote:
>>> On Wed, Apr 18, 2012 at 5:11 AM, Joonyoung Shim<jy0922.shim@samsung.com> wrote:
>>>> On 04/18/2012 05:46 PM, Daniel Vetter wrote:
>>>>> On Wed, Apr 18, 2012 at 01:31:59PM +0900, Joonyoung Shim wrote:
>>>>>> DRM_MODE_PLANE_EVENT is similar to DRM_MODE_PAGE_FLIP_EVENT but it is
>>>>>> for a plane. The setplane ioctl (DRM_IOCTL_MODE_SETPLANE) needs to
>>>>>> provide the event such as DRM_MODE_PAGE_FLIP_EVENT. The setplane ioctl
>>>>>> can change the framebuffer of plane but user can't know completion of
>>>>>> changing the framebuffer of plane via event. If DRM_MODE_PLANE_EVENT is
>>>>>> added, we can also do pageflip of a plane.
>>>>>>
>>>>>> Signed-off-by: Joonyoung Shim<jy0922.shim@samsung.com>
>>>>>> Signed-off-by: Kyungmin Park<kyungmin.park@samsung.com>
>>>>> If I understand the current kms api correctly, set_plane is akin to
>>>>> set_base and should not generate an asynchronous flip completion event.
>>>>> To
>>>>> do that we need a new pageflip ioctl which changes a complete set of fb +
>>>>> planes + any crtc attributes that might be in an atomic fashion. At which
>>>>> point we can just reuse the existing page flip event mechanism.
>>>> It seems better way to add new pageflip ioctl for plane. I will try it.
>>> fwiw, an atomic mode set which can update crtc and zero or more plane
>>> layers is, I think, the way to go. Jesse Barnes had an RFC for this,
>>> although IIRC it was only the API and not the implementation. And
>>> combination w/ the plane/crtc properties patchset to allow setting
>>> properties as part of the update might not be a bad thing either.
>>>
>>> BR,
>>> -R
>> Before planes and rotation properties modeset was atomic (single ioctl).
>> Would it not be possible to define atomic modeset for planes and
>> properties like this?
>>
>> SETPROPERTY and SETPLANE (maybe more) should not be commited when set,
>> only on SETCRTC ioctl like before planes. All properties and plane
>> changes before SETCRTC should be considered staged settings for the next
>> SETCRTC.
>> If this would break API backwards compatibility, maybe a new "standard"
>> boolean property called EnableAtomicMode could be used to trigger this
>> mode in the drivers. If a driver doesn't support it, things will just
>> work as currently with modeset not being atomic across planes.
>> Maybe this could be implemented in the generic parts of KMS, but it
>> could be tried out first inside a driver.
> Multi ioctl solution can have some issues since you can't hold any
> locks around the whole operation. Also there could be issues if the
> process performing the operation dies or hangs in mid operation.
> Error handling can also be difficult since the intermediate steps
> may violate some constraints in the system.
>
> Also SETCRTC itself is a per-CRTC operation, but we actually want
> per-device atomic operations instead.
>
> So I think a single ioctl solution is a better idea. I'm currently
> pondering on what the API would look like. Ideally I would like to
> go with the "everything is a property" approach, and I'd like to get
> rid of some of the other limitations in the current API at the same
> time.
>
Yes, from previous emails I have seen that we are quite aligned on the
single-atomic-modeset-with-properties version.
Do you have any actual proposal for this? Like the API at least and some
comments on "the other limitations" you fix with it?
I only recall seeing Jesse's API proposal, but not yours, only some
ideas about a generic list of properties/values for modeset when I
proposed something similar.
I'm about to implement atomic modeset now one way or the other, so the
more proposals I have to choose from the better ;)
I found that the per-crtc modeset above covers my requirements, so I
might just take the easy route for now. But I welcome any work/proposal
on generic support for atomic modeset.
/BR
/Marcus
next prev parent reply other threads:[~2012-04-18 14:58 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
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 [this message]
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=4F8ED69C.3040905@stericsson.com \
--to=marcus.xm.lorentzon@stericsson.com \
--cc=dri-devel@lists.freedesktop.org \
--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.