From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Sean Paul <seanpaul@chromium.org>
Cc: dri-devel <dri-devel@lists.freedesktop.org>,
"Grant Likely" <grant.likely@secretlab.ca>,
"Sylwester Nawrocki" <s.nawrocki@samsung.com>,
"Stéphane Marchesin" <marcheu@chromium.org>
Subject: Re: [PATCH v2 12/26] drm/exynos: Split manager/display/subdrv
Date: Mon, 04 Nov 2013 11:12:53 +0100 [thread overview]
Message-ID: <1475853.Il1IdNZ95T@avalon> (raw)
In-Reply-To: <CAOw6vbJ96O3x_vMTn36DX2CON-FM5wGZZ9GSbU6Jh-RSyq6JLw@mail.gmail.com>
Hi Sean,
Sorry for the late reply.
On Wednesday 30 October 2013 11:56:18 Sean Paul wrote:
> On Wed, Oct 30, 2013 at 11:45 AM, Laurent Pinchart wrote:
> > On Wednesday 30 October 2013 11:32:24 Sean Paul wrote:
> >> On Tue, Oct 29, 2013 at 4:50 PM, Tomasz Figa wrote:
> >> > On Tuesday 29 of October 2013 16:36:47 Sean Paul wrote:
> > [snip]
> >
> >> >> An example: exynos_drm_drv would be a platform_driver which implements
> >> >> drm_driver. On drm_load, it would enumerate the various dt nodes for
> >> >> its IP blocks and initialize them with direct calls (like
> >> >> exynos_drm_fimd_initialize). If the board uses a bridge (say for
> >> >> eDP->LVDS), that bridge driver would be a real driver with its own
> >> >> probe.
> >> >>
> >> >> I think the ideal situation would be for the drm layer to manage the
> >> >> standalone drivers in a way that is transparent to the main driver,
> >> >> such that it doesn't need to know which type of hardware can hang off
> >> >> it. It will need to know if one exists since it might need to forego
> >> >> creating a connector, but it need not know anything else about it.
> >> >>
> >> >> To accomplish this, I think we need:
> >> >> (1) Some way for drm to enumerate the standalone drivers, so it can
> >> >> know when all of them have been probed
> >> >>
> >> >> (2) A drm registration function that's called by the standalone
> >> >> drivers once they're probed, and a hook with drm_device pointer called
> >> >> during drm_load for them to register their drm_* implementations
> >> >>
> >> >> (3) Something that will allow for deferred probe if the main driver
> >> >> kicks off before the standalones are in, it would need to be called
> >> >> before drm_platform/pci_init
> >> >>
> >> >> I think we'll need to expand on the media bindings to achieve (1).
> >> >
> >> > Could you elaborate on why you think so?
> >> >
> >> > I believe the video interface bindings contain everything needed for
> >> > this
> >> > case, except, of course, some device/bus specific parts, but those are
> >> > to
> >> > be defined by separate device/bus specific bindings.
> >>
> >> AFAICT, there is no way for drm to enumerate all of the pieces that
> >> need probing before it loads (ie: how do you enumerate all device
> >> nodes with pipe {} subnode[s]). I've given this more thought, and I
> >> think the following could work without forcing unified/split drivers
> >> (ie: it can be left to the driver author to choose).
> >>
> >> If there was some way for drm to know all of the pieces that need to
> >> be probed/initialized before calling drm_load, it could provide an API
> >> for various drivers to "claim" nodes. This API would accept the
> >> device_node being claimed as well as an initialize hook that will be
> >> called back to give the standalone driver a pointer to the drm_device.
> >>
> >> The main drm driver, which is responsible for calling
> >> drm_platform/pci_init, would claim the nodes it plans on implementing
> >> in the probe. It would then check drm to see if all requred nodes had
> >> been claimed. If they have not been claimed, that probe would defer
> >> and try again later.
> >>
> >> Once all required nodes have been "claimed", the main driver's probe
> >> would call drm_platform/pci_init to kick off load(). After load() has
> >> finished, the drm layer would then call the various standalone driver
> >> hooks that were previously registered when it claimed its node. These
> >> hooks would allow the driver to register its
> >> crtc/encoder/bridge/connector.
> >>
> >> Multi-driver solutions could work within this framework, as could
> >> integrated ones. This would also allow things like bridge drivers to
> >> be completely transparent.
> >
> > Have you all configured your spam filters to reject anything that is or
> > has
> > been related to CDF ?
> >
> > Split in two patches, the first one adding the infrastructure, the second
> > one adding OF support.
> >
> > http://git.linuxtv.org/pinchartl/fbdev.git/commitdiff/2d19e74ab8d86aaf5d54
> > c34c6bc940508f793512
> > http://git.linuxtv.org/pinchartl/fbdev.git/commitdiff/e8c4380ca4a6a62fa9d
> > 8bc340a6dcbd123b4f674
> >
> > The code can be extracted as a stand-alone solution, either specific to
> > DRM, or at the struct device level. As the problem is not DRM-specific,
> > the later would probably make more sense (if I'm not mistaken Grant
> > Likely - CCed- mentioned during the kernel summit was in favor of adding
> > the code in the device core).
> >
> > We've solved the exact same problem in V4L, do we *really* need to adopt
> > the NIH approach and reinvent the wheel ?
>
> Laurent,
> I really don't care how the functionality gets in, or what form it takes.
> This isn't NIH, I just want something that can be merged.
Great :-)
> When we talked about CDF at plumbers, I thought the plan was to split it up
> into the logical pieces and integrate it into drm. I haven't seen any
> movement on this front, is that still your intention? If so, I look forward
> to the patch.
Yes, it's still my intention, and the DT bindings + notifier code will be the
first piece. I hope to post a first version at the end of the week(end). Sorry
for the delay.
--
Regards,
Laurent Pinchart
next prev parent reply other threads:[~2013-11-04 10:12 UTC|newest]
Thread overview: 93+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-16 19:26 [PATCH v2 00/26] drm/exynos: Refactor parts of the exynos driver Sean Paul
2013-10-16 19:26 ` [PATCH v2 01/26] drm/exynos: Remove useless slab.h include Sean Paul
2013-10-16 19:26 ` [PATCH v2 02/26] drm/exynos: Merge overlay_ops into manager_ops Sean Paul
2013-10-16 19:26 ` [PATCH v2 03/26] drm/exynos: Add an initialize function to manager and display Sean Paul
2013-10-16 19:26 ` [PATCH v2 04/26] drm/exynos: Use manager_op initialize in fimd Sean Paul
2013-10-16 19:26 ` [PATCH v2 05/26] drm/exynos: hdmi: Implement initialize op for hdmi Sean Paul
2013-10-16 19:26 ` [PATCH v2 06/26] drm/exynos: Pass exynos_drm_manager in manager ops instead of dev Sean Paul
2013-10-16 19:26 ` [PATCH v2 07/26] drm/exynos: Remove apply manager callback Sean Paul
2013-10-16 19:26 ` [PATCH v2 08/26] drm/exynos: Remove dpms link between encoder/connector Sean Paul
2013-10-16 19:26 ` [PATCH v2 09/26] drm/exynos: Rename display_op power_on to dpms Sean Paul
2013-10-16 19:26 ` [PATCH v2 10/26] drm/exynos: Don't keep dpms state in encoder Sean Paul
2013-10-16 19:26 ` [PATCH v2 11/26] drm/exynos: Use unsigned long for possible_crtcs Sean Paul
2013-10-16 19:26 ` [PATCH v2 12/26] drm/exynos: Split manager/display/subdrv Sean Paul
2013-10-17 8:21 ` Inki Dae
2013-10-17 14:37 ` Sean Paul
2013-10-18 2:31 ` Inki Dae
2013-10-21 14:46 ` Sean Paul
2013-10-21 21:17 ` Sean Paul
2013-10-22 5:30 ` Inki Dae
2013-10-22 13:45 ` Sean Paul
2013-10-23 2:28 ` Inki Dae
2013-10-23 2:40 ` Stéphane Marchesin
2013-10-23 3:38 ` Inki Dae
2013-10-23 4:03 ` Stéphane Marchesin
2013-10-23 4:15 ` Inki Dae
2013-10-23 4:28 ` Stéphane Marchesin
2013-10-23 4:48 ` Inki Dae
2013-10-23 5:19 ` Sean Paul
2013-10-23 5:42 ` Inki Dae
2013-10-23 12:20 ` Sean Paul
2013-10-23 13:18 ` Inki Dae
2013-10-23 14:29 ` Dave Airlie
2013-10-23 14:45 ` Sean Paul
2013-10-23 15:22 ` Dave Airlie
2013-10-23 15:27 ` Rob Clark
2013-10-23 15:27 ` Sean Paul
2013-10-23 15:28 ` Sean Paul
2013-10-23 15:53 ` Dave Airlie
2013-10-23 16:09 ` Sean Paul
2013-10-28 16:49 ` Olof Johansson
2013-10-28 17:39 ` Sean Paul
2013-10-28 23:13 ` Tomasz Figa
2013-10-29 19:19 ` Olof Johansson
2013-10-29 19:23 ` Tomasz Figa
2013-10-29 19:47 ` Sylwester Nawrocki
2013-10-29 23:08 ` Laurent Pinchart
2013-10-29 20:36 ` Sean Paul
2013-10-29 20:50 ` Tomasz Figa
2013-10-29 21:29 ` Rob Clark
2013-10-29 23:32 ` Laurent Pinchart
2013-11-04 10:21 ` Thierry Reding
2013-11-04 10:10 ` Thierry Reding
2013-11-04 12:14 ` Rob Clark
2013-11-04 12:52 ` Thierry Reding
2013-11-04 16:12 ` Daniel Vetter
2013-10-30 3:46 ` Stéphane Marchesin
2013-11-04 10:25 ` Thierry Reding
2013-11-04 11:30 ` Inki Dae
2013-11-04 15:44 ` Sean Paul
2013-11-05 7:38 ` Inki Dae
2013-10-30 15:32 ` Sean Paul
2013-10-30 15:45 ` Laurent Pinchart
2013-10-30 15:56 ` Sean Paul
2013-11-04 10:12 ` Laurent Pinchart [this message]
2013-10-30 15:53 ` Daniel Vetter
2013-11-04 10:13 ` Laurent Pinchart
2013-11-04 10:36 ` Thierry Reding
2013-11-04 10:08 ` Thierry Reding
2013-10-24 6:47 ` Inki Dae
2013-10-23 14:51 ` Rob Clark
2013-10-24 7:46 ` Inki Dae
2013-10-25 5:15 ` Inki Dae
2013-10-28 20:43 ` Rob Clark
2013-10-23 3:39 ` Sean Paul
2013-10-22 4:55 ` Inki Dae
2013-10-22 10:30 ` Inki Dae
2013-10-23 5:18 ` Inki Dae
2013-10-16 19:26 ` [PATCH v2 13/26] drm/exynos: hdmi: remove the i2c drivers and use devtree Sean Paul
2013-10-16 19:26 ` [PATCH v2 14/26] drm/exynos: Remove exynos_drm_hdmi shim Sean Paul
2013-10-16 19:26 ` [PATCH v2 15/26] drm/exynos: Use drm_mode_copy to copy modes Sean Paul
2013-10-16 19:26 ` [PATCH v2 16/26] drm/exynos: Disable unused crtc planes from crtc Sean Paul
2013-10-16 19:26 ` [PATCH v2 17/26] drm/exynos: Add mode_set manager operation Sean Paul
2013-10-16 19:26 ` [PATCH v2 18/26] drm/exynos: Implement mode_fixup " Sean Paul
2013-10-16 19:26 ` [PATCH v2 19/26] drm/exynos: Use mode_set to configure fimd Sean Paul
2013-10-16 19:26 ` [PATCH v2 20/26] drm/exynos: Remove unused/useless fimd_context members Sean Paul
2013-10-16 19:26 ` [PATCH v2 21/26] drm/exynos: Move dp driver from video/ to drm/ Sean Paul
2013-10-16 19:26 ` [PATCH v2 22/26] drm/exynos: Move display implementation into dp Sean Paul
2013-10-16 19:26 ` [PATCH v2 23/26] ARM: dts: Move display-timings node from fimd to dp Sean Paul
2013-10-16 19:26 ` [PATCH v2 24/26] drm/exynos: Implement dpms display callback in DP Sean Paul
2013-10-16 19:26 ` [PATCH v2 25/26] drm/exynos: Clean up FIMD power on/off routines Sean Paul
2013-10-16 19:26 ` [PATCH v2 26/26] drm/exynos: Consolidate suspend/resume in drm_drv Sean Paul
2013-10-16 20:40 ` Sean Paul
2013-10-17 5:10 ` Inki Dae
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=1475853.Il1IdNZ95T@avalon \
--to=laurent.pinchart@ideasonboard.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=grant.likely@secretlab.ca \
--cc=marcheu@chromium.org \
--cc=s.nawrocki@samsung.com \
--cc=seanpaul@chromium.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.