public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: Tomi Valkeinen <tomi.valkeinen@ti.com>
To: Archit Taneja <a0393947@ti.com>
Cc: rob@ti.com, linux-omap@vger.kernel.org, linux-fbdev@vger.kernel.org
Subject: Re: [PATCH v2 09/23] OMAPDSS: Create links between managers, outputs and devices
Date: Fri, 31 Aug 2012 17:45:44 +0300	[thread overview]
Message-ID: <1346424344.16067.39.camel@deskari> (raw)
In-Reply-To: <5040C907.5090000@ti.com>

[-- Attachment #1: Type: text/plain, Size: 4671 bytes --]

On Fri, 2012-08-31 at 19:54 +0530, Archit Taneja wrote:
> On Friday 31 August 2012 07:40 PM, Tomi Valkeinen wrote:
> > On Thu, 2012-08-30 at 17:10 +0530, Archit Taneja wrote:
> >> Links between DSS entities are made in dss_recheck_connections when a new panel
> >> is probed. Rewrite the code in dss_recheck_connections to link managers to
> >> outputs, and outputs to devices.
> >>
> >> The fields in omap_dss_device struct gives information on which output and
> >> manager to connect to. The desired manager and output pointers are retrieved and
> >> prepared(existing outputs/devices unset, if default display)) to form the
> >> desired links. The output is linked to the device, and then the manager to the
> >> output. If a probed device's required manager isn't free, the required output
> >> is still connected to the device so that it's easier to use the panel in the
> >> future.
> >
> > I've been pondering this one, and I can't come to a conclusion. The
> > recheck_connections is just so ugly that I'd like to get rid of it =). I
> > guess this patch doesn't make it any more ugly, so we can include it in
> > the patch series.
> >
> > And as I mentioned earlier, I think we should get rid of the
> > OMAP_DISPLAY_TYPE_* enum, as it's kinda extra now. But doing that would
> > require changing all board files. That's not out of the question, but I
> > think we should first make sure we know what we are doing with the board
> > files so we don't go back and forth there.
> 
> Yes, I didn't remove it for the same reason.
> 
> >
> > Just gathering my thoughts:
> >
> > When we define a panel in DT/board file, we should also define the
> > output instance, because that's part of the hardware design. But there
> 
> It's a part of hardware design if the panel can't be detached. But yes, 
> even for detachable panels, we can assume that the panel would 
> eventually connect to that output.
> 
> > are no hardcoded links between mgrs and outputs, so that doesn't belong
> > to the DT/board file. For example, omap4460's DSI1 can take input from
> > LCD1 or LCD2.
> 
> Right, so we don't need an equivalent of the dssdev->channel field in DT 
> info. As you said, we need the output instance, is that why you were 

What I'm planning for DT is a direct link to the output instance.
Something like this (not correct, just to give the idea):

dss {
	dpi {
	};
};

i2c {
	/* an i2c controlled panel */
	my-panel {
		video-bus = <&dpi>;
	};
};

Then my-panel can get the handle from video-bus, and it'll get the
output device directly, without need for any IDs or such.

> sceptical about it being defined as an enum in previous patches? 
> Probably we could define output instances in DT as a pair of instance 
> number and instance type {number, type}. It would be sort of hard to 
> play around with those within OMAPDSS though.

Well, optimally we wouldn't need to know about display types or output
instances, at least in most of the cases. We'd just have a bunch of
managers, and a bunch of outputs, and rules how these can be connected.
And the panel devices would have a link to the output it's connect in HW
level.

There are probably some cases where we need some kind of ID, so that we
can handle the DSI PLL's and such. And we need to setup the rules above
somewhere, and perhaps that code needs IDs to set it up. I'm not sure.

And, well, if we don't have IDs, the rules above need to be some kind of
lists of pointers. Perhaps having a bit mask is just simpler, as we'll
never have too many output instances.

So I'm not really against having the enum. It just would've been neat to
have the output type and instance number encoded into this enum, so that
it'd be easy to extract either one. But that kinda ruins the possibility
to use it in a bit mask.

> > So who could/should make the decision which mgr to use... Well, I don't
> > know on what basis the decision can be made, but I still think omapdss
> > can't make good decisions on that, so probably the whole "chain" should
> > be configured in the omapfb/omapdrm level.
> 
> Which manager to chose could be simply picking up the next free manager 
> which can connect to that output. omapfb/drm can take care of that.

That's a good default implementation, but not quite perfect. If there
are two displays, often the other display (well, output) can only be
connected to one particular manager, whereas the other one could use two
managers. And if both try to use the same manager, especially if the one
with two options is selected first, the other one is left without a mgr.

 Tomi


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

  reply	other threads:[~2012-08-31 14:45 UTC|newest]

Thread overview: 74+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-21  5:58 [PATCH 00/23] OMAPDSS: Create output entities Archit Taneja
2012-08-21  5:58 ` [PATCH 01/23] OMAPDSS: outputs: Create a new entity called outputs Archit Taneja
2012-08-24 12:41   ` Tomi Valkeinen
2012-08-24 12:51     ` Archit Taneja
2012-08-29 10:32       ` Tomi Valkeinen
2012-08-29 10:57         ` Archit Taneja
2012-08-21  5:58 ` [PATCH 02/23] OMAPDSS: outputs: Create and initialize output instances Archit Taneja
2012-08-24 13:14   ` Tomi Valkeinen
2012-08-27  6:19     ` Archit Taneja
2012-08-27  6:44       ` Tomi Valkeinen
2012-08-21  5:58 ` [PATCH 03/23] OMAPDSS: output: Add set/unset device ops for omap_dss_output Archit Taneja
2012-08-21  5:58 ` [PATCH 04/23] OMAPDSS: APPLY: Add manager set/unset output ops for omap_overlay_manager Archit Taneja
2012-08-21  5:58 ` [PATCH 05/23] OMAPDSS: Remove manager->device references Archit Taneja
2012-08-21  5:58 ` [PATCH 06/23] OMAP_VOUT: " Archit Taneja
2012-08-21  5:58 ` [PATCH 07/23] OMAPFB: remove " Archit Taneja
2012-08-21  5:58 ` [PATCH 08/23] OMAPDRM: Remove " Archit Taneja
2012-08-21  5:58 ` [PATCH 09/23] OMAPDSS: Create links between managers, outputs and devices Archit Taneja
2012-08-21  5:58 ` [PATCH 10/23] OMAPDSS: DPI: Pass outputs from panel driver to DPI interface driver Archit Taneja
2012-08-21  5:58 ` [PATCH 11/23] OMAPDSS: DSI: Remove dsi_pdev_map global struct Archit Taneja
2012-08-21  5:58 ` [PATCH 12/23] OMAPDSS: DSI: Pass outputs from panel driver to DSI interface driver Archit Taneja
2012-08-21  5:58 ` [PATCH 13/23] OMAPDSS: SDI: Pass outputs from panel driver to SDI " Archit Taneja
2012-08-21  5:58 ` [PATCH 14/23] OMAPDSS: RFBI: Pass outputs from panel driver to RFBI " Archit Taneja
2012-08-21  5:58 ` [PATCH 15/23] OMAPDSS: RFBI: Add output pointers as arguments to all exported functions Archit Taneja
2012-08-21  5:58 ` [PATCH 16/23] OMAPDSS: VENC: Pass outputs from panel driver to VENC interface driver Archit Taneja
2012-08-21  5:58 ` [PATCH 17/23] OMAPDSS: HDMI: Pass outputs from panel driver to HDMI " Archit Taneja
2012-08-21  5:58 ` [PATCH 18/23] OMAPDSS: HDMI: Add output pointers as arguments to all functions used by hdmi panel driver Archit Taneja
2012-08-21  5:58 ` [PATCH 19/23] OMAPDSS/OMAPFB: Change dssdev->manager references Archit Taneja
2012-08-21  5:58 ` [PATCH 20/23] OMAPDSS: MANAGER: Update display sysfs store Archit Taneja
2012-08-21  5:58 ` [PATCH 21/23] OMAPDSS: MANAGER: Get device via output Archit Taneja
2012-08-21  5:58 ` [PATCH 22/23] OMAPDSS: APPLY: Remove omap_dss_device references from dss_ovl_enable/disable Archit Taneja
2012-08-21  5:58 ` [PATCH 23/23] OMAPDSS: Remove old way of setting manager and device links Archit Taneja
2012-08-30 11:40 ` [PATCH v2 00/23] OMAPDSS: Create output entities Archit Taneja
2012-08-30 11:40   ` [PATCH v2 01/23] OMAPDSS: outputs: Create a new entity called outputs Archit Taneja
2012-08-30 11:40   ` [PATCH v2 02/23] OMAPDSS: outputs: Create and register output instances Archit Taneja
2012-08-31 11:57     ` Tomi Valkeinen
2012-08-31 12:03       ` Archit Taneja
2012-08-30 11:40   ` [PATCH v2 03/23] OMAPDSS: output: Add set/unset device ops for omap_dss_output Archit Taneja
2012-08-31 12:03     ` Tomi Valkeinen
2012-08-31 12:24       ` Archit Taneja
2012-08-31 12:28         ` Tomi Valkeinen
2012-08-30 11:40   ` [PATCH v2 04/23] OMAPDSS: APPLY: Add manager set/unset output ops for omap_overlay_manager Archit Taneja
2012-08-30 11:40   ` [PATCH v2 05/23] OMAPDSS: Remove manager->device references Archit Taneja
2012-08-30 11:40   ` [PATCH v2 06/23] OMAP_VOUT: " Archit Taneja
2012-08-31 12:11     ` Tomi Valkeinen
2012-08-31 12:34       ` Archit Taneja
2012-08-30 11:40   ` [PATCH v2 07/23] OMAPFB: remove " Archit Taneja
2012-08-30 11:40   ` [PATCH v2 08/23] OMAPDRM: Remove " Archit Taneja
2012-08-30 11:40   ` [PATCH v2 09/23] OMAPDSS: Create links between managers, outputs and devices Archit Taneja
2012-08-31 14:10     ` Tomi Valkeinen
2012-08-31 14:24       ` Archit Taneja
2012-08-31 14:45         ` Tomi Valkeinen [this message]
2012-08-31 15:08           ` Tomi Valkeinen
2012-09-03  9:26             ` Archit Taneja
2012-09-03  9:35               ` Tomi Valkeinen
2012-08-30 11:40   ` [PATCH v2 10/23] OMAPDSS: DPI: Pass omap_dss_output within the driver Archit Taneja
2012-08-31 13:48     ` Tomi Valkeinen
2012-08-31 14:00       ` Archit Taneja
2012-08-30 11:40   ` [PATCH v2 11/23] OMAPDSS: DSI: Remove dsi_pdev_map global struct Archit Taneja
2012-08-30 11:40   ` [PATCH v2 12/23] OMAPDSS: DSI: Pass omap_dss_output within the driver Archit Taneja
2012-08-30 11:40   ` [PATCH v2 13/23] OMAPDSS: SDI: " Archit Taneja
2012-08-30 11:40   ` [PATCH v2 14/23] OMAPDSS: RFBI: " Archit Taneja
2012-08-30 11:40   ` [PATCH v2 15/23] OMAPDSS: RFBI: Add dssdev pointers as arguments to all exported functions Archit Taneja
2012-08-31 14:20     ` Tomi Valkeinen
2012-08-31 14:30       ` Archit Taneja
2012-08-30 11:40   ` [PATCH v2 16/23] OMAPDSS: VENC: Pass omap_dss_output within the driver Archit Taneja
2012-08-30 11:40   ` [PATCH v2 17/23] OMAPDSS: HDMI: " Archit Taneja
2012-08-30 11:40   ` [PATCH v2 18/23] OMAPDSS: HDMI: Add dssdev pointer as an argument to all functions used by hdmi panel driver Archit Taneja
2012-08-30 11:40   ` [PATCH v2 19/23] OMAPDSS/OMAPFB: Change dssdev->manager references Archit Taneja
2012-08-30 11:40   ` [PATCH v2 20/23] OMAPDSS: MANAGER: Update display sysfs store Archit Taneja
2012-08-31 14:30     ` Tomi Valkeinen
2012-08-31 14:41       ` Archit Taneja
2012-08-30 11:40   ` [PATCH v2 21/23] OMAPDSS: MANAGER: Get device via output Archit Taneja
2012-08-30 11:40   ` [PATCH v2 22/23] OMAPDSS: APPLY: Remove omap_dss_device references from dss_ovl_enable/disable Archit Taneja
2012-08-30 11:40   ` [PATCH v2 23/23] OMAPDSS: Remove old way of setting manager and device links Archit Taneja

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=1346424344.16067.39.camel@deskari \
    --to=tomi.valkeinen@ti.com \
    --cc=a0393947@ti.com \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=rob@ti.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