From: Laurent Pinchart <laurent.pinchart@ideasonboard.com> To: Tomi Valkeinen <tomi.valkeinen@ti.com> Cc: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-media@vger.kernel.org, Archit Taneja <archit@ti.com>, Benjamin Gaignard <benjamin.gaignard@linaro.org>, Bryan Wu <bryan.wu@canonical.com>, Inki Dae <inki.dae@samsung.com>, Jesse Barker <jesse.barker@linaro.org>, Kyungmin Park <kyungmin.park@samsung.com>, Marcus Lorentzon <marcus.xm.lorentzon@stericsson.com>, Maxime Ripard <maxime.ripard@free-electrons.com>, Philipp Zabel <p.zabel@pengutronix.de>, Ragesh Radhakrishnan <ragesh.r@linaro.org>, Rob Clark <rob.clark@linaro.org>, Sascha Hauer <s.hauer@pengutronix.de>, Sebastien Guiriec <s-guiriec@ti.com>, Sumit Semwal <sumit.semwal@linaro.org>, Thomas Petazzoni <thomas.petazzoni@free-electrons.com>, Tom Gall <tom.gall@linaro.org>, Vikas Sajjan <vikas.sajjan@linaro.org> Subject: Re: [RFC v2 0/5] Common Display Framework Date: Mon, 17 Dec 2012 15:36:55 +0100 [thread overview] Message-ID: <1608840.IleINgrx5J@avalon> (raw) In-Reply-To: <50AF8D79.1070309@ti.com> [-- Attachment #1: Type: text/plain, Size: 5321 bytes --] Hi Tomi, I finally have time to work on a v3 :-) On Friday 23 November 2012 16:51:37 Tomi Valkeinen wrote: > On 2012-11-22 23:45, Laurent Pinchart wrote: > > From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> > > > > Hi everybody, > > > > Here's the second RFC of what was previously known as the Generic Panel > > Framework. > > Nice work! Thanks for working on this. > > I was doing some testing with the code, seeing how to use it in omapdss. > Here are some thoughts: > > In your model the DSS gets the panel devices connected to it from > platform data. After the DSS and the panel drivers are loaded, DSS gets > a notification and connects DSS and the panel. > > I think it's a bit limited way. First of all, it'll make the DT data a > bit more complex (although this is not a major problem). With your > model, you'll need something like: > > soc-base.dtsi: > > dss { > dpi0: dpi { > }; > }; > > board.dts: > > &dpi0 { > panel = &dpi-panel; > }; > > / { > dpi-panel: dpi-panel { > ...panel data...; > }; > }; > > Second, it'll prevent hotplug, and even if real hotplug would not be > supported, it'll prevent cases where the connected panel must be found > dynamically (like reading ID from eeprom). Hotplug definitely needs to be supported, as the common display framework also targets HDMI and DP. The notification mechanism was actually designed to support hotplug. How do you see the proposal preventing hotplug ? > Third, it kinda creates a cyclical dependency: the DSS needs to know > about the panel and calls ops in the panel, and the panel calls ops in > the DSS. I'm not sure if this is an actual problem, but I usually find > it simpler if calls are done only in one direction. I don't see any way around that. The panel is not a standalone entity that can only receive calls (as it needs to control video streams, per your request :-)) or only emit calls (as something needs to control it, userspace doesn't control the panel directly). > What I suggest is take a simpler approach, something alike to how regulators > or gpios are used, even if slightly more complex than those: the entity that > has a video output (SoC's DSS, external chips) offers that video output as > resource. It doesn't know or care who uses it. The user of the video output > (panel, external chips) will find the video output (to which it is connected > in the HW) by some means, and will use different operations on that output > to operate the device. > > This would give us something like the following DT data: > > soc-base.dtsi: > > dss { > dpi0: dpi { > }; > }; > > board.dts: > > / { > dpi-panel: dpi-panel { > source = <&dpi0>; > ...panel data...; > }; > }; > > The panel driver would do something like this in its probe: > > int dpi_panel_probe() > { > // Find the video source, increase ref > src = get_video_source_from_of("source"); > > // Reserve the video source for us. others can still get and > // observe it, but cannot use it as video data source. > // I think this should cascade upstream, so that after this call > // each video entity from the panel to the SoC's CRTC is > // reserved and locked for this video pipeline. > reserve_video_source(src); > > // set DPI HW configuration, like DPI data lines. The > // configuration would come from panel's platform data > set_dpi_config(src, config); > > // register this panel as a display. > register_display(this); > } > > > The DSS's dpi driver would do something like: > > int dss_dpi_probe() > { > // register as a DPI video source > register_video_source(this); > } > > A DSI-2-DPI chip would do something like: > > int dsi2dpi_probe() > { > // get, reserve and config the DSI bus from SoC > src = get_video_source_from_of("source"); > reserve_video_source(src); > set_dsi_config(src, config); > > // register as a DPI video source > register_video_source(this); > } > > > Here we wouldn't have similar display_entity as you have, but video sources > and displays. Video sources are elements in the video pipeline, and a video > source is used only by the next downstream element. The last element in the > pipeline would not be a video source, but a display, which would be used by > the upper layer. I don't think we should handle pure sources, pure sinks (displays) and mixed entities (transceivers) differently. I prefer having abstract entities that can have a source and a sink, and expose the corresponding operations. That would make pipeline handling much easier, as the code will only need to deal with a single type of object. Implementing support for entities with multiple sinks and/or sources would also be possible. > Video source's ops would deal with things related to the video bus in > question, like configuring data lanes, sending DSI packets, etc. The > display ops would be more high level things, like enable, update, etc. > Actually, I guess you could consider the display to represent and deal > with the whole pipeline, while video source deals with the bus between > two display entities. What is missing in your proposal is an explanation of how the panel is controlled. What does your register_display() function register the display with, and what then calls the display operations ? -- Regards, Laurent Pinchart [-- Attachment #2: This is a digitally signed message part. --] [-- Type: application/pgp-signature, Size: 490 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com> To: Tomi Valkeinen <tomi.valkeinen@ti.com> Cc: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-media@vger.kernel.org, Archit Taneja <archit@ti.com>, Benjamin Gaignard <benjamin.gaignard@linaro.org>, Bryan Wu <bryan.wu@canonical.com>, Inki Dae <inki.dae@samsung.com>, Jesse Barker <jesse.barker@linaro.org>, Kyungmin Park <kyungmin.park@samsung.com>, Marcus Lorentzon <marcus.xm.lorentzon@stericsson.com>, Maxime Ripard <maxime.ripard@free-electrons.com>, Philipp Zabel <p.zabel@pengutronix.de>, Ragesh Radhakrishnan <ragesh.r@linaro.org>, Rob Clark <rob.clark@linaro.org>, Sascha Hauer <s.hauer@pengutronix.de>, Sebastien Guiriec <s-guiriec@ti.com>, Sumit Semwal <sumit.semwal@linaro.org>, Thomas Petazzoni <thomas.petazzoni@free-electrons.com>, Tom Gall <tom.gall@linaro.org>, Vikas Sajjan <vikas.sajjan@linaro.org> Subject: Re: [RFC v2 0/5] Common Display Framework Date: Mon, 17 Dec 2012 14:36:55 +0000 [thread overview] Message-ID: <1608840.IleINgrx5J@avalon> (raw) In-Reply-To: <50AF8D79.1070309@ti.com> [-- Attachment #1: Type: text/plain, Size: 5321 bytes --] Hi Tomi, I finally have time to work on a v3 :-) On Friday 23 November 2012 16:51:37 Tomi Valkeinen wrote: > On 2012-11-22 23:45, Laurent Pinchart wrote: > > From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> > > > > Hi everybody, > > > > Here's the second RFC of what was previously known as the Generic Panel > > Framework. > > Nice work! Thanks for working on this. > > I was doing some testing with the code, seeing how to use it in omapdss. > Here are some thoughts: > > In your model the DSS gets the panel devices connected to it from > platform data. After the DSS and the panel drivers are loaded, DSS gets > a notification and connects DSS and the panel. > > I think it's a bit limited way. First of all, it'll make the DT data a > bit more complex (although this is not a major problem). With your > model, you'll need something like: > > soc-base.dtsi: > > dss { > dpi0: dpi { > }; > }; > > board.dts: > > &dpi0 { > panel = &dpi-panel; > }; > > / { > dpi-panel: dpi-panel { > ...panel data...; > }; > }; > > Second, it'll prevent hotplug, and even if real hotplug would not be > supported, it'll prevent cases where the connected panel must be found > dynamically (like reading ID from eeprom). Hotplug definitely needs to be supported, as the common display framework also targets HDMI and DP. The notification mechanism was actually designed to support hotplug. How do you see the proposal preventing hotplug ? > Third, it kinda creates a cyclical dependency: the DSS needs to know > about the panel and calls ops in the panel, and the panel calls ops in > the DSS. I'm not sure if this is an actual problem, but I usually find > it simpler if calls are done only in one direction. I don't see any way around that. The panel is not a standalone entity that can only receive calls (as it needs to control video streams, per your request :-)) or only emit calls (as something needs to control it, userspace doesn't control the panel directly). > What I suggest is take a simpler approach, something alike to how regulators > or gpios are used, even if slightly more complex than those: the entity that > has a video output (SoC's DSS, external chips) offers that video output as > resource. It doesn't know or care who uses it. The user of the video output > (panel, external chips) will find the video output (to which it is connected > in the HW) by some means, and will use different operations on that output > to operate the device. > > This would give us something like the following DT data: > > soc-base.dtsi: > > dss { > dpi0: dpi { > }; > }; > > board.dts: > > / { > dpi-panel: dpi-panel { > source = <&dpi0>; > ...panel data...; > }; > }; > > The panel driver would do something like this in its probe: > > int dpi_panel_probe() > { > // Find the video source, increase ref > src = get_video_source_from_of("source"); > > // Reserve the video source for us. others can still get and > // observe it, but cannot use it as video data source. > // I think this should cascade upstream, so that after this call > // each video entity from the panel to the SoC's CRTC is > // reserved and locked for this video pipeline. > reserve_video_source(src); > > // set DPI HW configuration, like DPI data lines. The > // configuration would come from panel's platform data > set_dpi_config(src, config); > > // register this panel as a display. > register_display(this); > } > > > The DSS's dpi driver would do something like: > > int dss_dpi_probe() > { > // register as a DPI video source > register_video_source(this); > } > > A DSI-2-DPI chip would do something like: > > int dsi2dpi_probe() > { > // get, reserve and config the DSI bus from SoC > src = get_video_source_from_of("source"); > reserve_video_source(src); > set_dsi_config(src, config); > > // register as a DPI video source > register_video_source(this); > } > > > Here we wouldn't have similar display_entity as you have, but video sources > and displays. Video sources are elements in the video pipeline, and a video > source is used only by the next downstream element. The last element in the > pipeline would not be a video source, but a display, which would be used by > the upper layer. I don't think we should handle pure sources, pure sinks (displays) and mixed entities (transceivers) differently. I prefer having abstract entities that can have a source and a sink, and expose the corresponding operations. That would make pipeline handling much easier, as the code will only need to deal with a single type of object. Implementing support for entities with multiple sinks and/or sources would also be possible. > Video source's ops would deal with things related to the video bus in > question, like configuring data lanes, sending DSI packets, etc. The > display ops would be more high level things, like enable, update, etc. > Actually, I guess you could consider the display to represent and deal > with the whole pipeline, while video source deals with the bus between > two display entities. What is missing in your proposal is an explanation of how the panel is controlled. What does your register_display() function register the display with, and what then calls the display operations ? -- Regards, Laurent Pinchart [-- Attachment #2: This is a digitally signed message part. --] [-- Type: application/pgp-signature, Size: 490 bytes --]
next prev parent reply other threads:[~2012-12-17 14:36 UTC|newest] Thread overview: 174+ messages / expand[flat|nested] mbox.gz Atom feed top 2012-11-22 21:45 [RFC v2 0/5] Common Display Framework Laurent Pinchart 2012-11-22 21:45 ` Laurent Pinchart 2012-11-22 21:45 ` [RFC v2 1/5] video: Add generic display entity core Laurent Pinchart 2012-11-22 21:45 ` Laurent Pinchart 2012-11-27 13:07 ` Tomi Valkeinen 2012-11-27 13:07 ` Tomi Valkeinen 2012-11-27 13:07 ` Tomi Valkeinen 2012-11-22 21:45 ` [RFC v2 2/5] video: panel: Add DPI panel support Laurent Pinchart 2012-11-22 21:45 ` Laurent Pinchart 2012-11-27 13:02 ` Tomi Valkeinen 2012-11-27 13:02 ` Tomi Valkeinen 2012-11-27 13:02 ` Tomi Valkeinen 2012-11-30 9:26 ` Philipp Zabel 2012-11-30 9:26 ` Philipp Zabel 2012-11-22 21:45 ` [RFC v2 3/5] video: display: Add MIPI DBI bus support Laurent Pinchart 2012-11-22 21:45 ` Laurent Pinchart 2012-11-30 12:02 ` Tomi Valkeinen 2012-11-30 12:02 ` Tomi Valkeinen 2012-11-30 12:02 ` Tomi Valkeinen 2012-11-22 21:45 ` [RFC v2 4/5] video: panel: Add R61505 panel support Laurent Pinchart 2012-11-22 21:45 ` Laurent Pinchart 2012-11-22 21:45 ` [RFC v2 5/5] video: panel: Add R61517 " Laurent Pinchart 2012-11-22 21:45 ` Laurent Pinchart 2012-11-23 14:51 ` [RFC v2 0/5] Common Display Framework Tomi Valkeinen 2012-11-23 14:51 ` Tomi Valkeinen 2012-11-23 14:51 ` Tomi Valkeinen 2012-12-17 14:36 ` Laurent Pinchart [this message] 2012-12-17 14:36 ` Laurent Pinchart 2012-12-17 15:29 ` Tomi Valkeinen 2012-12-17 15:29 ` Tomi Valkeinen 2012-12-17 15:29 ` Tomi Valkeinen 2012-12-17 23:18 ` Laurent Pinchart 2012-12-17 23:18 ` Laurent Pinchart 2012-12-17 16:53 ` Jani Nikula 2012-12-17 16:53 ` Jani Nikula 2012-12-17 22:19 ` Laurent Pinchart 2012-12-17 22:19 ` Laurent Pinchart 2012-12-19 14:57 ` Jani Nikula 2012-12-19 14:57 ` Jani Nikula 2012-12-19 15:07 ` Tomi Valkeinen 2012-12-19 15:07 ` Tomi Valkeinen 2012-12-19 15:07 ` Tomi Valkeinen 2012-12-24 17:31 ` Laurent Pinchart 2012-12-24 17:31 ` Laurent Pinchart 2012-12-19 15:26 ` Rob Clark 2012-12-19 15:26 ` Rob Clark 2012-12-19 15:37 ` Tomi Valkeinen 2012-12-19 15:37 ` Tomi Valkeinen 2012-12-19 16:05 ` Rob Clark 2012-12-19 16:05 ` Rob Clark 2012-12-19 16:05 ` Rob Clark 2012-12-24 17:40 ` Laurent Pinchart 2012-12-24 17:40 ` Laurent Pinchart 2012-12-24 17:35 ` Laurent Pinchart 2012-12-24 17:35 ` Laurent Pinchart 2012-12-27 16:10 ` Rob Clark 2012-12-27 16:10 ` Rob Clark 2012-12-24 17:27 ` Laurent Pinchart 2012-12-24 17:27 ` Laurent Pinchart 2012-12-27 16:04 ` Rob Clark 2012-12-27 16:04 ` Rob Clark 2012-12-27 19:19 ` Sascha Hauer 2012-12-27 19:19 ` Sascha Hauer 2012-11-23 19:56 ` Thierry Reding 2012-11-23 19:56 ` Thierry Reding 2012-11-24 7:15 ` Tomi Valkeinen 2012-11-24 7:15 ` Tomi Valkeinen 2012-11-24 7:15 ` Tomi Valkeinen 2012-11-26 14:47 ` Alan Cox 2012-12-17 15:15 ` Laurent Pinchart 2012-12-17 15:15 ` Laurent Pinchart 2012-11-26 7:53 ` Philipp Zabel 2012-11-26 7:53 ` Philipp Zabel 2012-12-17 14:58 ` Laurent Pinchart 2012-12-17 14:58 ` Laurent Pinchart 2012-11-23 21:41 ` Sascha Hauer 2012-11-23 21:41 ` Sascha Hauer 2012-12-17 15:02 ` Laurent Pinchart 2012-12-17 15:02 ` Laurent Pinchart [not found] ` <CAD025yS5rGMbiRBdDxv=YLP6_fsQndAkr+3t29_mNhcvow_SwA@mail.gmail.com> [not found] ` <3133576.BkqAl7V01U@avalon> 2012-12-18 3:01 ` Vikas Sajjan 2012-12-18 6:13 ` Vikas Sajjan 2012-12-18 6:25 ` Vikas Sajjan 2012-12-21 10:00 ` Tomasz Figa 2012-12-21 10:00 ` Tomasz Figa 2012-12-24 14:12 ` Laurent Pinchart 2012-12-24 14:12 ` Laurent Pinchart 2012-12-27 14:43 ` Tomasz Figa 2012-12-27 14:43 ` Tomasz Figa 2012-12-27 14:43 ` Tomasz Figa 2012-12-28 3:26 ` Vikas Sajjan 2012-12-28 3:38 ` Vikas Sajjan 2013-01-08 8:18 ` Laurent Pinchart 2013-01-08 8:18 ` Laurent Pinchart 2013-01-08 10:12 ` Marcus Lorentzon 2013-01-08 10:12 ` Marcus Lorentzon 2013-01-08 16:36 ` Tomasz Figa 2013-01-08 16:36 ` Tomasz Figa 2013-01-08 17:08 ` Marcus Lorentzon 2013-01-08 17:08 ` Marcus Lorentzon 2013-02-01 23:35 ` Laurent Pinchart 2013-02-01 23:35 ` Laurent Pinchart 2013-02-04 10:05 ` Marcus Lorentzon 2013-02-04 10:05 ` Marcus Lorentzon 2013-02-06 9:52 ` Archit Taneja 2013-02-06 9:52 ` Archit Taneja 2013-02-08 10:51 ` Tomi Valkeinen 2013-02-08 10:51 ` Tomi Valkeinen 2013-02-08 12:43 ` Marcus Lorentzon 2013-02-08 12:43 ` Marcus Lorentzon 2013-02-01 23:37 ` Laurent Pinchart 2013-02-01 23:37 ` Laurent Pinchart 2012-12-24 12:59 ` Laurent Pinchart 2012-12-24 13:00 ` Laurent Pinchart 2012-12-18 5:04 ` Dave Airlie 2012-12-18 5:04 ` Dave Airlie 2012-12-18 5:04 ` Dave Airlie 2012-12-18 6:21 ` Rob Clark 2012-12-18 6:21 ` Rob Clark 2012-12-18 8:30 ` Daniel Vetter 2012-12-18 8:30 ` Daniel Vetter 2012-12-18 9:38 ` Inki Dae 2012-12-19 20:13 ` Stéphane Marchesin 2012-12-19 20:13 ` Stéphane Marchesin 2012-12-24 14:08 ` Laurent Pinchart 2012-12-24 14:08 ` Laurent Pinchart 2012-12-24 13:39 ` Laurent Pinchart 2012-12-24 13:39 ` Laurent Pinchart 2012-12-18 10:59 ` Sylwester Nawrocki 2012-12-18 10:59 ` Sylwester Nawrocki 2012-12-24 17:19 ` Laurent Pinchart 2012-12-24 17:19 ` Laurent Pinchart 2012-12-19 20:05 ` Stéphane Marchesin 2012-12-19 20:05 ` Stéphane Marchesin 2012-12-24 13:37 ` Laurent Pinchart 2012-12-24 13:37 ` Laurent Pinchart 2012-12-27 15:54 ` Rob Clark 2012-12-27 15:54 ` Rob Clark 2012-12-27 19:18 ` Sascha Hauer 2012-12-27 19:18 ` Sascha Hauer 2012-12-27 19:57 ` Rob Clark 2012-12-27 19:57 ` Rob Clark 2012-12-28 0:04 ` Sascha Hauer 2012-12-28 0:04 ` Sascha Hauer 2013-01-08 8:33 ` Laurent Pinchart 2013-01-08 8:33 ` Laurent Pinchart 2013-01-08 8:25 ` Laurent Pinchart 2013-01-08 8:25 ` Laurent Pinchart 2013-01-08 16:13 ` Rob Clark 2013-01-08 16:13 ` Rob Clark 2013-01-09 8:23 ` Rahul Sharma 2013-01-09 8:35 ` Rahul Sharma 2013-01-09 8:23 ` Rahul Sharma 2013-02-01 23:42 ` Laurent Pinchart 2013-02-01 23:42 ` Laurent Pinchart 2013-02-02 10:08 ` Rob Clark 2013-02-02 10:08 ` Rob Clark 2012-12-18 10:39 ` Marcus Lorentzon 2012-12-18 10:39 ` Marcus Lorentzon 2012-12-18 10:39 ` Marcus Lorentzon 2012-12-24 17:09 ` Laurent Pinchart 2012-12-24 17:09 ` Laurent Pinchart 2012-12-24 17:09 ` Laurent Pinchart 2012-12-27 15:57 ` Rob Clark 2012-12-27 15:57 ` Rob Clark 2012-12-27 15:57 ` Rob Clark 2013-01-06 17:46 ` Daniel Vetter 2013-01-06 17:46 ` Daniel Vetter 2013-01-06 17:46 ` Daniel Vetter 2013-01-08 8:41 ` Laurent Pinchart 2013-01-08 8:41 ` Laurent Pinchart 2012-12-24 13:24 ` Laurent Pinchart 2012-12-24 13:24 ` Laurent Pinchart 2012-12-14 4:57 Vikas Sajjan 2012-12-17 22:00 ` 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=1608840.IleINgrx5J@avalon \ --to=laurent.pinchart@ideasonboard.com \ --cc=archit@ti.com \ --cc=benjamin.gaignard@linaro.org \ --cc=bryan.wu@canonical.com \ --cc=dri-devel@lists.freedesktop.org \ --cc=inki.dae@samsung.com \ --cc=jesse.barker@linaro.org \ --cc=kyungmin.park@samsung.com \ --cc=linux-fbdev@vger.kernel.org \ --cc=linux-media@vger.kernel.org \ --cc=marcus.xm.lorentzon@stericsson.com \ --cc=maxime.ripard@free-electrons.com \ --cc=p.zabel@pengutronix.de \ --cc=ragesh.r@linaro.org \ --cc=rob.clark@linaro.org \ --cc=s-guiriec@ti.com \ --cc=s.hauer@pengutronix.de \ --cc=sumit.semwal@linaro.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: linkBe 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.