From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Rob Clark <robdclark@gmail.com>
Cc: Linux Fbdev development list <linux-fbdev@vger.kernel.org>,
Benjamin Gaignard <benjamin.gaignard@linaro.org>,
"dri-devel@lists.freedesktop.org"
<dri-devel@lists.freedesktop.org>,
Jesse Barnes <jesse.barnes@intel.com>,
Sebastien Guiriec <s-guiriec@ti.com>,
Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>,
Tom Gall <tom.gall@linaro.org>,
Ragesh Radhakrishnan <Ragesh.R@linaro.org>,
Tomi Valkeinen <tomi.valkeinen@ti.com>,
"linux-media@vger.kernel.org" <linux-media@vger.kernel.org>,
Stephen Warren <swarren@wwwdotorg.org>,
Mark Zhang <markz@nvidia.com>,
Alexandre Courbot <acourbot@nvidia.com>,
Thomas Petazzoni <thomas.petazzoni@free-electrons.com>,
Sunil Joshi <joshi@samsung.com>,
Kyungmin Park <kyungmin.park@samsung.com>,
Maxime Ripard <maxime.ripard@free-electrons.com>,
Vikas Sajjan <vikas.sajjan@linaro.org>,
Marcus Lorentzon <marcus.lorentzon@huawei.com>
Subject: Re: [PATCH/RFC v3 00/19] Common Display Framework
Date: Fri, 06 Sep 2013 18:16:26 +0200 [thread overview]
Message-ID: <1753990.mW1pj07z8s@avalon> (raw)
In-Reply-To: <CAF6AEGuRXhzmopjmsWuQ5D6jDB1QOBvvKx-WXMYSc2qHcVn2fQ@mail.gmail.com>
Hi Rob and Sascha,
On Wednesday 21 August 2013 08:22:59 Rob Clark wrote:
> On Wed, Aug 21, 2013 at 3:09 AM, Sascha Hauer wrote:
> > On Tue, Aug 20, 2013 at 02:40:55PM -0400, Rob Clark wrote:
> >> On Tue, Aug 20, 2013 at 11:24 AM, Laurent Pinchart wrote:
> >> > Hi Rob,
> >> >
> >> >> Or maybe, put another way, I still think we should still optimize for
> >> >> the common case. I mean I'm sure you *can* design hw that has an
> >> >> LVDS->DP bridge in the capture path, and if you had something like an
> >> >> FPGA where that was cheap to do maybe you even would (for fun). But if
> >> >> in the real world, there are only one or two cases of actual hw using
> >> >> the same bridge in a capture pipeline which is normally used in
> >> >> display pipelines, then duplicating some small bit of code for that
> >> >> abnormal case if it makes things easier for the common case, seems
> >> >> like a reasonable trade-off to me.
> >> >
> >> > That was my opinion as well until I started working on a Xilinx
> >> > platform. There's dozens of IP cores there that are used in both
> >> > capture and display pipelines.
> >>
> >> or maybe just some helper lib's to handling the register level
> >> programming?
Many chips and IP cores in KMS and V4L2 pipelines are pretty simple, and the
bulk of the driver is just an API implementation. Register poking is usually a
small percentage of the code (that's of course not the case for the more
complex IP cores, but those are usually not shared).
> >> Anyways, I guess you can call it a "worse is better" thing, but if you
> >> can get 90% of the desired effect for 10% of the work, take the
> >> simpler solution. I don't think we should make things more layered or
> >> more difficult for one exceptional case.
The point is I believe they will become less and less exceptional over time.
One might argue that CDF is a revolutionary approach as opposed to an
evolutionary approach, but looking at the future I believe we'll need a much
bigger disruption if we wait too long.
> >> > Furthermore, FPGA display pipelines being made of individual IP cores,
> >> > we need a way to write one driver per IP core and make them all
> >> > interact. The recently proposed drm_bridge is one possible solution to
> >> > this issue (and to a different but similar issue that trigerred the
> >> > development of drm_bridge), but it's in my opinion not generic enough.
> >> > We're facing several problems that are related, it would really be a
> >> > shame not to solve them with a good enough framework.>>
> >>
> >> well, I've been working on DSI panel support in msm drm, and also been
> >> looking at the patches to add DSI support in i915. And the panel
> >> interface ends up looking basically like the drm_bridge interface.
> >> Perhaps the only thing not generic there is the name.
Don't get me wrong, drm_bridge is an interesting idea, but I think it's a bit
limited.
> >> >> I mean, take a DSI panel driver, for example.. anything but a trivial
> >> >> panel driver, you are going to want to expose some custom properties
> >> >> on the connector for controlling non-standard features. So you end up
> >> >> with both cdf_foo for the common part, and drm_foo for gluing in the
> >> >> properties. And now these two parts which otherwise would be one, end
> >> >> up having to stay in sync merged through different trees, etc. It
> >> >> seems a lot like making my life more difficult for a fairly
> >> >> hypothetical gain ;-)
> >> >
> >> > The DSI panel driver should not be split into two parts. It should
> >> > implement a CDF entity, any glue needed for DRM will not be part of
> >> > the panel driver.
> >>
> >> right, but that glue ends up needing to be *somewhere*, which makes it
> >> the 2nd part.
> >>
> >> >> Or, take an hdmi or DP bridge. To use any of the common
> >> >> infrastructure/helpers in drm, you end up implementing a generic
> >> >> interface, where both the producer and consumer is inside drm. Which
> >> >> just seems a bit pointless and extra hoops to jump through. Especially
> >> >> when we discover that we need to extend/enhance the common interface
> >> >> outside of drm to make it work. (I'm thinking of
> >> >> display_entity_control_ops::get_modes() here, but I'm sure there are
> >> >> more examples.) And I think we'll run into similar issues with
> >> >> display_entity_control_ops::set_state(), since the on<->off sequencing
> >> >> can get hairy when the upstream/downstream entity is fed a clk by the
> >> >> downstream/upstream entity. And similarly, I think we'll go through a
> >> >> few revisions of DSI panel/bus params before we have everything that
> >> >> everyone needs.
> >> >
> >> > I don't see where needing multiple revisions of a patch set would be
> >> > bad :-)
> >>
> >> I mean over multiple kernel revisions, as people start adding support
> >> for new hw and run into limitations of the "framework".
> >
> > A framework can be changed, extended and fixed. In the end we talking
> > about a completely in-kernel framework for which we do not have to
> > maintain a stable API.
>
> oh sure, this is why I'd be absolutely against exposing this to userspace
> currently..
At least we agree on that, good :-)
> But my only point here was that an in-drm framework, all the fix-ups due to
> a framework change are sorted out before Dave sends his pull req to linus.
> We do this on a semi-regular basis already in drm already.
I understand. But DRM drivers already depend on lots of infrastructure code
that is not part of DRM (you could of course argue that it's not a valid
reason to add one more :-)).
> Anyways, not a show-stopper thing.. just (in my mind) one additional
> inconvenience (and not really the biggest one) about having the "framework"
> outside of drm. I'm more concerned about just having the "display entity"
> code at a layer below the helpers and property api's that I'd like to use in
> drm.
I very much like the KMS property API (there's of course always room for
improvements), we're actually thinking about a property API for V4L2 as well.
My concern is that we need something shareable between subsystems, and the KMS
version is a bit too tied to DRM/KMS for that purpose. For instance struct
drm_property inherits struct drm_mode_object, and thus requires a DRM device
to allocate IDs. This is the kind of really low-level issues that we will need
to sort out one way or the other. If we can't require a V4L2 driver to
implement a drm_device, or the other around (and I believe it would be
unreasonable to do so), we will need a neutral middle-ground.
> And just to be clear, part of my negative experience about this is the
> omapdss/omapdrm split. I just see cfd outside of drm as encouraging
> others to make the same mistake.
I absolutely agree that we should not repeat that mistake. We hopefully have a
bit more experience now, and we should catch this kind of issue during code
review in the worst case.
> >> We've already figured out that just having enable() and disable() is
> >> not sufficient for displayport link training. I'm not sure what else
> >> we'll discover.
> >
> > It's pretty much expected that other things will be discovered, but this
> > will also happen with all sub-drm-driver frameworks we currently have.
>
> right, which is why I want to "optimize" for this case by having everything
> effected by evolving the framework merged via drm.
>
> >> I'm not saying not to solve (most of these) problems.. I don't think
> >> chaining multiple drm_bridge's is impossible, I can think of at least
> >> two ways to implement it. But I think we should solve that as someone
> >> is adding support for hw that uses this. This (a) lets us break
> >> things up into smaller more incremental changes (drm_bridge is
> >> *considerably* smaller than the current CDF patchset), and (b) avoids
> >> us solving the wrong problems.
> >>
> >> btw, I think DT bindings is orthogonal to this discussion.
> >
> > Not really. The common display framework is about splitting the pipeline
> > into its components and adding a common view to the components. It's CDF
> > helper code that can translate a DT binding directly into a encoder
> > pipeline.
>
> yes, DT binding are orthogonal. This is something that should work
> for BIOS, ACPI, DT, fex (just kidding),
:-D
> etc. I mean there might be some DT helpers, but that should be kind of on
> the side.
>
> If DT binding are really to be OS independent, we probably need some better
> way to deal w/ collecting up DT nodes for one (userspace visible) driver (or
> cases where driver <-> DT is not 1<->1). But that is really an entirely
> different topic, or at least not applicable to where the "framework" lives.
I pretty much agree, DT bindings won't depend on whether we upstream the code
to drivers/video/, drivers/gpu/ or drivers/media/. However, it's easy to
design DT bindings with a particular framework implementation in mind and use
shortcuts that make the bindings difficult to use should a different framework
be implemented. We need to be careful about this. On the upside we now have
more experienced DT bindings reviewers than a couple of years ago, I'm thus
pretty optimistic.
--
Regards,
Laurent Pinchart
next prev parent reply other threads:[~2013-09-06 16:16 UTC|newest]
Thread overview: 63+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-09 17:14 [PATCH/RFC v3 00/19] Common Display Framework Laurent Pinchart
2013-08-09 17:14 ` [PATCH/RFC v3 01/19] OMAPDSS: panels: Rename Kconfig options to OMAP2_DISPLAY_* Laurent Pinchart
2013-08-09 17:14 ` [PATCH/RFC v3 02/19] video: Add Common Display Framework core Laurent Pinchart
2013-09-02 8:42 ` Tomi Valkeinen
2013-09-03 11:29 ` Laurent Pinchart
2013-08-09 17:14 ` [PATCH/RFC v3 03/19] video: display: Add video and stream control operations Laurent Pinchart
2013-08-09 17:14 ` [PATCH/RFC v3 04/19] video: display: Add display entity notifier Laurent Pinchart
2013-08-09 17:14 ` [PATCH/RFC v3 05/19] video: display: Graph helpers Laurent Pinchart
2013-08-09 17:14 ` [PATCH/RFC v3 06/19] video: display: OF support Laurent Pinchart
2013-08-13 14:37 ` Philipp Zabel
2013-08-21 1:02 ` Laurent Pinchart
2013-08-21 9:10 ` Philipp Zabel
2013-08-22 0:51 ` Laurent Pinchart
2013-08-09 17:14 ` [PATCH/RFC v3 07/19] video: display: Add pixel coding definitions Laurent Pinchart
2013-08-09 17:14 ` [PATCH/RFC v3 08/19] video: display: Add MIPI DBI bus support Laurent Pinchart
2013-08-14 0:52 ` Rob Clark
2013-08-20 13:26 ` Laurent Pinchart
2013-08-26 11:10 ` Tomi Valkeinen
2013-09-06 14:09 ` Laurent Pinchart
2013-09-06 15:43 ` Tomi Valkeinen
2013-09-07 9:35 ` Tomi Valkeinen
2013-09-04 10:50 ` Vikas Sajjan
2013-09-06 14:37 ` Laurent Pinchart
2013-09-18 10:59 ` Vikas Sajjan
2013-09-04 12:52 ` Vikas Sajjan
2013-09-06 14:56 ` Laurent Pinchart
2013-08-09 17:15 ` [PATCH/RFC v3 09/19] video: panel: Add DPI panel support Laurent Pinchart
2013-08-09 17:15 ` [PATCH/RFC v3 10/19] video: panel: Add R61505 " Laurent Pinchart
2013-08-09 17:15 ` [PATCH/RFC v3 11/19] video: panel: Add R61517 " Laurent Pinchart
2013-08-09 17:15 ` [PATCH/RFC v3 12/19] video: display: Add VGA Digital to Analog Converter support Laurent Pinchart
2013-08-09 17:15 ` [PATCH/RFC v3 13/19] video: display: Add VGA connector support Laurent Pinchart
2013-08-09 17:15 ` [PATCH/RFC v3 14/19] ARM: shmobile: r8a7790: Add DU clocks for DT Laurent Pinchart
2013-08-09 17:15 ` [PATCH/RFC v3 15/19] ARM: shmobile: r8a7790: Add DU device node to device tree Laurent Pinchart
2013-08-09 17:15 ` [PATCH/RFC v3 16/19] ARM: shmobile: marzen: Port DU platform data to CDF Laurent Pinchart
2013-08-09 17:15 ` [PATCH/RFC v3 17/19] ARM: shmobile: lager: " Laurent Pinchart
2013-08-09 17:15 ` [PATCH/RFC v3 18/19] ARM: shmobile: lager-reference: Add display device nodes to device tree Laurent Pinchart
2013-08-09 17:15 ` [PATCH/RFC v3 19/19] drm/rcar-du: Port to the Common Display Framework Laurent Pinchart
2013-08-14 0:43 ` [PATCH/RFC v3 00/19] " Rob Clark
2013-08-20 15:24 ` Laurent Pinchart
2013-08-20 18:40 ` Rob Clark
2013-08-21 7:09 ` Sascha Hauer
2013-08-21 12:22 ` Rob Clark
2013-09-06 16:16 ` Laurent Pinchart [this message]
2013-09-09 12:12 ` Tomi Valkeinen
2013-09-09 14:17 ` Rob Clark
2013-09-09 14:58 ` Tomi Valkeinen
2013-09-09 15:10 ` Rob Clark
2013-09-02 11:06 ` Tomi Valkeinen
2013-09-30 13:48 ` Tomi Valkeinen
2013-10-02 12:23 ` Andrzej Hajda
2013-10-02 13:24 ` Tomi Valkeinen
2013-10-09 14:08 ` Andrzej Hajda
2013-10-11 6:37 ` Tomi Valkeinen
2013-10-11 11:19 ` Andrzej Hajda
2013-10-11 12:30 ` Tomi Valkeinen
2013-10-11 14:16 ` Andrzej Hajda
2013-10-11 14:45 ` Tomi Valkeinen
2013-10-17 7:48 ` Andrzej Hajda
2013-10-17 8:18 ` Tomi Valkeinen
2013-10-17 12:26 ` Andrzej Hajda
2013-10-17 12:55 ` Tomi Valkeinen
2013-10-18 11:55 ` Andrzej Hajda
-- strict thread matches above, loose matches on Subject: below --
2013-08-09 23:02 Laurent Pinchart
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=1753990.mW1pj07z8s@avalon \
--to=laurent.pinchart@ideasonboard.com \
--cc=Ragesh.R@linaro.org \
--cc=acourbot@nvidia.com \
--cc=benjamin.gaignard@linaro.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=jesse.barnes@intel.com \
--cc=joshi@samsung.com \
--cc=kyungmin.park@samsung.com \
--cc=laurent.pinchart+renesas@ideasonboard.com \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=marcus.lorentzon@huawei.com \
--cc=markz@nvidia.com \
--cc=maxime.ripard@free-electrons.com \
--cc=robdclark@gmail.com \
--cc=s-guiriec@ti.com \
--cc=swarren@wwwdotorg.org \
--cc=thomas.petazzoni@free-electrons.com \
--cc=tom.gall@linaro.org \
--cc=tomi.valkeinen@ti.com \
--cc=vikas.sajjan@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox