From: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
To: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Sakari Ailus <sakari.ailus@maxwell.research.nokia.com>,
Sumit Semwal <sumit.semwal@ti.com>,
Jesse Barker <jesse.barker@linaro.org>,
Jesse Barnes <jbarnes@virtuousgeek.org>, Rob Clark <rob@ti.com>,
Pawel Osciak <pawel@osciak.com>,
Marek Szyprowski <m.szyprowski@samsung.com>,
Tomasz Stanislawski <t.stanislaws@samsung.com>,
Magnus Damm <magnus.damm@gmail.com>,
Marcus Lorentzon <marcus.lorentzon@linaro.org>,
Alexander Deucher <alexander.deucher@amd.com>,
linux-media@vger.kernel.org, dri-devel@lists.freedesktop.org,
linux-fbdev@vger.kernel.org
Subject: Re: Kernel Display and Video API Consolidation mini-summit at ELC 2012 - Notes
Date: Mon, 20 Feb 2012 16:40:02 +0000 [thread overview]
Message-ID: <Pine.LNX.4.64.1202201709470.2836@axis700.grange> (raw)
In-Reply-To: <1775349.d0yvHiVdjB@avalon>
On Fri, 17 Feb 2012, Laurent Pinchart wrote:
[snip]
> *** Synchronous pipeline changes ***
>
> Goal: Create an API to apply complex changes to a video pipeline atomically.
>
> Needed for complex camera use cases. On the DRM/KMS side, the approach is to
> use one big ioctl to configure the whole pipeline.
>
> One solution is a commit ioctl, through the media controller device, that
> would be dispatched to entities internally with a prepare step and a commit
> step.
>
> Parameters to be committed need to be stored in a context. We can either use
> one cross-device context, or per-device contexts that would then need to be
> associated with the commit operation.
>
> Action points:
> - Sakari will provide a proof-of-concept and/or proposal if needed.
I actually have been toying with a related idea, namely replacing the
current ACTIVE / TRY configuration pair as not sufficiently clearly defined
and too restrictive with a more flexible concept of an arbitrary number of
configuration contexts. The idea was to allow the user to create such
contexts and use atomic commands to instruct the pipeline to switch between
them. However, as I started writing down an RFC, this was exactly the point,
where I stopped: what defines a configuration and in which order shall
configuration commands be executed when switching between them?
In short, my idea was to allow contexts to contain any configuration
options: not only geometry and pixel format as what TRY is using ATM, but
also any controls. The API would add commands like
handle = context_alloc(mode);
/*
* mode can be DEFAULT to start a new configuration, based on
* driver defaults, or CLONE to start with the currently active
* configuration
*/
context_configure(handle);
/*
* all configuration commands from now on happen in the background
* and only affect the specified context
*/
/* perform any configuration */
context_switch(handle);
/* activate one of pre-configured contexts */
The problem, however, is, how to store contexts and how to perform the
switch. We would, probably, have to define a notion of a "complete
configuration," which would consist of some generic parameters and,
optionally, driver-specific ones. Then the drivers (in the downstream
order?) would just be instructed to switch to a specific configuration
and each of them would then decide in which order they have to commit
specific parameters. This must assume, that regardless in what state a
device currently is, switching to context X always produces the same
result.
Alternative approaches, like, store each context as a sequence of
user-provided configuration commands, and play them back, when switching,
would produce unpredictable results, depending on the state, before the
switch, especially when using the CLONE context-creation mode.
Anyway, my tuppence to consider.
Thanks
Guennadi
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/
next prev parent reply other threads:[~2012-02-20 16:40 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <201201171126.42675.laurent.pinchart@ideasonboard.com>
[not found] ` <1654816.MX2JJ87BEo@avalon>
2012-02-16 23:25 ` Kernel Display and Video API Consolidation mini-summit at ELC 2012 - Notes Laurent Pinchart
2012-02-17 9:55 ` Daniel Vetter
2012-02-17 18:46 ` Laurent Pinchart
2012-02-22 16:03 ` James Simmons
2012-02-22 16:24 ` Daniel Vetter
2012-02-22 16:28 ` Rob Clark
2012-02-23 7:34 ` Michel Dänzer
2012-02-22 16:36 ` Chris Wilson
2012-02-22 16:40 ` Clark, Rob
2012-02-22 17:26 ` James Simmons
2012-02-23 0:15 ` Alan Cox
2012-02-22 17:00 ` Adam Jackson
2012-02-20 16:09 ` Guennadi Liakhovetski
2012-02-20 16:19 ` David Airlie
2012-05-17 2:46 ` Jun Nie
2012-05-17 7:53 ` Hans Verkuil
2012-02-17 11:19 ` Semwal, Sumit
2012-02-17 18:49 ` Laurent Pinchart
2012-02-17 19:42 ` Adam Jackson
2012-02-18 17:53 ` Clark, Rob
2012-02-18 0:56 ` Keith Packard
2012-02-20 16:40 ` Guennadi Liakhovetski [this message]
2012-03-02 14:23 ` Heiko Stübner
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=Pine.LNX.4.64.1202201709470.2836@axis700.grange \
--to=g.liakhovetski@gmx.de \
--cc=alexander.deucher@amd.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=jbarnes@virtuousgeek.org \
--cc=jesse.barker@linaro.org \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=m.szyprowski@samsung.com \
--cc=magnus.damm@gmail.com \
--cc=marcus.lorentzon@linaro.org \
--cc=pawel@osciak.com \
--cc=rob@ti.com \
--cc=sakari.ailus@maxwell.research.nokia.com \
--cc=sumit.semwal@ti.com \
--cc=t.stanislaws@samsung.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox