diff options
author | Archit Taneja <archit@ti.com> | 2012-09-10 14:34:16 +0530 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2012-09-26 14:58:33 +0300 |
commit | 3224827630f1823c1181e562af9d36951f6cbd11 (patch) | |
tree | ff71a396a6e9b0c15bb6a8eb6ba45b3d2e9e4150 /drivers/video/omap2/dss/output.c | |
parent | 23e2aa644f39fbc8121f49dd50ce85590cc4e4b7 (diff) | |
download | op-kernel-dev-3224827630f1823c1181e562af9d36951f6cbd11.zip op-kernel-dev-3224827630f1823c1181e562af9d36951f6cbd11.tar.gz |
OMAPDSS: Create links between managers, outputs and devices
Links between DSS entities are made in dss_init_connections() when a panel
device is registered, and are removed in dss_uninit_connections() when the
device is unregistered. Modify these functions to incorporate the addition of
outputs.
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 to form the desired links. The output is linked to the device, and then
the manager to the output.
A helper function omapdss_get_output_from_device() is created to retrieve the
output from the display by checking it's type, and the module id in case of DSI.
Signed-off-by: Archit Taneja <archit@ti.com>
Diffstat (limited to 'drivers/video/omap2/dss/output.c')
-rw-r--r-- | drivers/video/omap2/dss/output.c | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/drivers/video/omap2/dss/output.c b/drivers/video/omap2/dss/output.c index 1a84b79..813f266 100644 --- a/drivers/video/omap2/dss/output.c +++ b/drivers/video/omap2/dss/output.c @@ -113,3 +113,36 @@ struct omap_dss_output *omap_dss_get_output(enum omap_dss_output_id id) return NULL; } + +struct omap_dss_output *omapdss_get_output_from_dssdev(struct omap_dss_device *dssdev) +{ + struct omap_dss_output *out = NULL; + enum omap_dss_output_id id; + + switch (dssdev->type) { + case OMAP_DISPLAY_TYPE_DPI: + out = omap_dss_get_output(OMAP_DSS_OUTPUT_DPI); + break; + case OMAP_DISPLAY_TYPE_DBI: + out = omap_dss_get_output(OMAP_DSS_OUTPUT_DBI); + break; + case OMAP_DISPLAY_TYPE_SDI: + out = omap_dss_get_output(OMAP_DSS_OUTPUT_SDI); + break; + case OMAP_DISPLAY_TYPE_VENC: + out = omap_dss_get_output(OMAP_DSS_OUTPUT_VENC); + break; + case OMAP_DISPLAY_TYPE_HDMI: + out = omap_dss_get_output(OMAP_DSS_OUTPUT_HDMI); + break; + case OMAP_DISPLAY_TYPE_DSI: + id = dssdev->phy.dsi.module == 0 ? OMAP_DSS_OUTPUT_DSI1 : + OMAP_DSS_OUTPUT_DSI2; + out = omap_dss_get_output(id); + break; + default: + break; + } + + return out; +} |