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: Mon, 03 Sep 2012 09:35:31 +0000 [thread overview]
Message-ID: <1346664931.12645.5.camel@lappyti> (raw)
In-Reply-To: <504477CD.10901@ti.com>
[-- Attachment #1: Type: text/plain, Size: 3090 bytes --]
On Mon, 2012-09-03 at 14:56 +0530, Archit Taneja wrote:
> On Friday 31 August 2012 08:38 PM, Tomi Valkeinen wrote:
> > On Fri, 2012-08-31 at 17:45 +0300, Tomi Valkeinen wrote:
> >
> >> 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.
> >
> > Hmm, this is just a non-finished idea (and it's late Friday... =) that
> > came to my mind:
> >
> > I had a brief look at TRMs for different OMAPs (omap4/5/6), and it looks
> > like the maximum output options for one manager is 4 (LCD2 on omap4460).
> > Usually there are just 2 or 3.
> >
> > So, we could trust that the above holds and do this so that we use a u32
> > field to hold four 8 bit output options. In 8 bits we can combine two
> > values from 0 to 15. 15 should be more than enough for output display
> > types and output instances.
> >
> > Then with helpers like these:
> >
> > /* second DSI instance */
> > #define DSI1 ((1 << 4) | DISPLAY_TYPE_DSI)
> > /* first DPI instance */
> > #define DPI0 ((0 << 4) | DISPLAY_TYPE_DPI)
>
> Okay, so DISPLAY_TYPE_DSI / DPI can't be a number left shifted any
> more(that would limit us to have only 4 types of output display types),
> like we have right now, they would need to be 0, 1, 2, 3 and so on. So
> with this approach, we could extract the instance number quickly, but we
> may not be able to check if the manager supports the output display type
> in constant time.
True, it wouldn't be constant. But it'd be checking between one to four
bytes, so I think it's quite fast =).
> > an example output options for a manager that can be connected to DSI1
> > and DPI0 could be:
> >
> > (DSI1 << 8) | (DPI0)
> >
> > This could be parsed with a for loop, going though the 4 bytes of the
> > u32 value. This would allow us to avoid managing a real list, and we
> > could extract the instance and the type from the value. Of course we
> > could also extend the field to u64 to hold 8 outputs if need be.
>
> Probably we could have a u64, and 2 bytes for each output, and a bit
> mask for both output instance and output display type. We could have
> display type enums as:
>
> DISPLAY_TYPE_DPI 1 << 5
> DISPLAY_TYPE_DSI 1 << 6
> DISPLAY_TYPE_VENC 1 << 7
> DISPLAY_TYPE_HDMI 1 << 8
> DISPLAY_TYPE_SDI 1 << 9
> DISPLAY_TYPE_RFBI 1 << 10
> ...
>
> >
> > Whether this would be worth it compared to simple bitmask, I'm not sure
> > =). Depends how much we need to extract the ID and type.
>
> Anyway, I don't think I'll try to implement this in this series. I'll
> stick to the output instance enums for now.
Sure. And as I said, I'm not sure if it's worth it. We currently have
multiple instances only for DSI, and only two instances there. And I
think we need to handle the instance number only in a few places. It's
not too much to do:
if (type == DSI1) ... else if (type == DSI2) ...
Tomi
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
next prev parent reply other threads:[~2012-09-03 9:35 UTC|newest]
Thread overview: 74+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-21 6:10 [PATCH 00/23] OMAPDSS: Create output entities Archit Taneja
2012-08-21 6:10 ` [PATCH 01/23] OMAPDSS: outputs: Create a new entity called outputs Archit Taneja
2012-08-24 12:41 ` Tomi Valkeinen
2012-08-24 12:53 ` Archit Taneja
2012-08-29 10:32 ` Tomi Valkeinen
2012-08-29 10:58 ` Archit Taneja
2012-08-21 6:10 ` [PATCH 02/23] OMAPDSS: outputs: Create and initialize output instances Archit Taneja
2012-08-24 13:14 ` Tomi Valkeinen
2012-08-27 6:31 ` Archit Taneja
2012-08-27 6:44 ` Tomi Valkeinen
2012-08-21 6:10 ` [PATCH 03/23] OMAPDSS: output: Add set/unset device ops for omap_dss_output Archit Taneja
2012-08-21 6:10 ` [PATCH 04/23] OMAPDSS: APPLY: Add manager set/unset output ops for omap_overlay_manager Archit Taneja
2012-08-21 6:10 ` [PATCH 05/23] OMAPDSS: Remove manager->device references Archit Taneja
2012-08-21 6:10 ` [PATCH 06/23] OMAP_VOUT: " Archit Taneja
2012-08-21 6:10 ` [PATCH 07/23] OMAPFB: remove " Archit Taneja
2012-08-21 6:10 ` [PATCH 08/23] OMAPDRM: Remove " Archit Taneja
2012-08-21 6:10 ` [PATCH 09/23] OMAPDSS: Create links between managers, outputs and devices Archit Taneja
2012-08-21 6:10 ` [PATCH 10/23] OMAPDSS: DPI: Pass outputs from panel driver to DPI interface driver Archit Taneja
2012-08-21 6:10 ` [PATCH 11/23] OMAPDSS: DSI: Remove dsi_pdev_map global struct Archit Taneja
2012-08-21 6:10 ` [PATCH 12/23] OMAPDSS: DSI: Pass outputs from panel driver to DSI interface driver Archit Taneja
2012-08-21 6:10 ` [PATCH 13/23] OMAPDSS: SDI: Pass outputs from panel driver to SDI " Archit Taneja
2012-08-21 6:10 ` [PATCH 14/23] OMAPDSS: RFBI: Pass outputs from panel driver to RFBI " Archit Taneja
2012-08-21 6:10 ` [PATCH 15/23] OMAPDSS: RFBI: Add output pointers as arguments to all exported functions Archit Taneja
2012-08-21 6:10 ` [PATCH 16/23] OMAPDSS: VENC: Pass outputs from panel driver to VENC interface driver Archit Taneja
2012-08-21 6:10 ` [PATCH 17/23] OMAPDSS: HDMI: Pass outputs from panel driver to HDMI " Archit Taneja
2012-08-21 6:10 ` [PATCH 18/23] OMAPDSS: HDMI: Add output pointers as arguments to all functions used by hdmi panel dr Archit Taneja
2012-08-21 6:10 ` [PATCH 19/23] OMAPDSS/OMAPFB: Change dssdev->manager references Archit Taneja
2012-08-21 6:10 ` [PATCH 20/23] OMAPDSS: MANAGER: Update display sysfs store Archit Taneja
2012-08-21 6:10 ` [PATCH 21/23] OMAPDSS: MANAGER: Get device via output Archit Taneja
2012-08-21 6:10 ` [PATCH 22/23] OMAPDSS: APPLY: Remove omap_dss_device references from dss_ovl_enable/disable Archit Taneja
2012-08-21 6:10 ` [PATCH 23/23] OMAPDSS: Remove old way of setting manager and device links Archit Taneja
2012-08-30 11:52 ` [PATCH v2 00/23] OMAPDSS: Create output entities Archit Taneja
2012-08-30 11:52 ` [PATCH v2 01/23] OMAPDSS: outputs: Create a new entity called outputs Archit Taneja
2012-08-30 11:52 ` [PATCH v2 02/23] OMAPDSS: outputs: Create and register output instances Archit Taneja
2012-08-31 11:57 ` Tomi Valkeinen
2012-08-31 12:15 ` Archit Taneja
2012-08-30 11:52 ` [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:36 ` Archit Taneja
2012-08-31 12:28 ` Tomi Valkeinen
2012-08-30 11:52 ` [PATCH v2 04/23] OMAPDSS: APPLY: Add manager set/unset output ops for omap_overlay_manager Archit Taneja
2012-08-30 11:52 ` [PATCH v2 05/23] OMAPDSS: Remove manager->device references Archit Taneja
2012-08-30 11:52 ` [PATCH v2 06/23] OMAP_VOUT: " Archit Taneja
2012-08-31 12:11 ` Tomi Valkeinen
2012-08-31 12:46 ` Archit Taneja
2012-08-30 11:52 ` [PATCH v2 07/23] OMAPFB: remove " Archit Taneja
2012-08-30 11:52 ` [PATCH v2 08/23] OMAPDRM: Remove " Archit Taneja
2012-08-30 11:52 ` [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:36 ` Archit Taneja
2012-08-31 14:45 ` Tomi Valkeinen
2012-08-31 15:08 ` Tomi Valkeinen
2012-09-03 9:38 ` Archit Taneja
2012-09-03 9:35 ` Tomi Valkeinen [this message]
2012-08-30 11:52 ` [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 13:59 ` Archit Taneja
2012-08-30 11:52 ` [PATCH v2 11/23] OMAPDSS: DSI: Remove dsi_pdev_map global struct Archit Taneja
2012-08-30 11:52 ` [PATCH v2 12/23] OMAPDSS: DSI: Pass omap_dss_output within the driver Archit Taneja
2012-08-30 11:52 ` [PATCH v2 13/23] OMAPDSS: SDI: " Archit Taneja
2012-08-30 11:52 ` [PATCH v2 14/23] OMAPDSS: RFBI: " Archit Taneja
2012-08-30 11:52 ` [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:42 ` Archit Taneja
2012-08-30 11:52 ` [PATCH v2 16/23] OMAPDSS: VENC: Pass omap_dss_output within the driver Archit Taneja
2012-08-30 11:52 ` [PATCH v2 17/23] OMAPDSS: HDMI: " Archit Taneja
2012-08-30 11:52 ` [PATCH v2 18/23] OMAPDSS: HDMI: Add dssdev pointer as an argument to all functions used by hdmi pane Archit Taneja
2012-08-30 11:52 ` [PATCH v2 19/23] OMAPDSS/OMAPFB: Change dssdev->manager references Archit Taneja
2012-08-30 11:52 ` [PATCH v2 20/23] OMAPDSS: MANAGER: Update display sysfs store Archit Taneja
2012-08-31 14:30 ` Tomi Valkeinen
2012-08-31 14:53 ` Archit Taneja
2012-08-30 11:52 ` [PATCH v2 21/23] OMAPDSS: MANAGER: Get device via output Archit Taneja
2012-08-30 11:52 ` [PATCH v2 22/23] OMAPDSS: APPLY: Remove omap_dss_device references from dss_ovl_enable/disable Archit Taneja
2012-08-30 11:52 ` [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=1346664931.12645.5.camel@lappyti \
--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;
as well as URLs for NNTP newsgroup(s).