summaryrefslogtreecommitdiff
path: root/drivers/video/omap2/dss/dsi.c
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2012-12-10 13:13:32 +0200
committerTomi Valkeinen <tomi.valkeinen@ti.com>2012-12-10 13:13:32 +0200
commitd10ecc5887a5671f2c71752b1624549a4a48b1fe (patch)
treedf88c096edcff99241371e5338439fd3faef59aa /drivers/video/omap2/dss/dsi.c
parent6b6f1edfdb6c41e630e4a70d64a8e8817b3170c2 (diff)
parenta9ee9f08b615f746f31a41a6415712081c1a2865 (diff)
Merge omapdss compat layer work
We have two separate, exclusive, users of omapdss: 1) omapfb + omap_vout and 2) omapdrm. Because omapfb and omap_vout are independent drivers, we've built layers in omapdss to manage the two simultaneous callers. These layers are not needed for omapdrm, as omapdrm is the sole user of omapdss, and these layers in fact only create trouble for omapdrm. The simple option to improve omapdrm situation would be to copy the omapdss code for omapdrm. We are trying to avoid this, as omapdss and the panel drivers are quite a lot of code together, and most of the code would be used without change. Thus this series helps the situation by moving the omapdss code required by omapfb + omap_vout to separate files, creating a distinct layer used only by omapfb + omap_vout. We call this layer "compat layer". This compat layer then uses the core omapdss driver to operate the hardware. omapdrm will use the core omapdss directly, without any layers in between. After this series, omapfb, omap_vout and omapdrm can all be compiled at the same time. Obviously omapdrm and omapfb+omap_vout cannot be run at the same time (the first one to start will "win"), so compiling them at the same time is only sensible as modules for testing purposes. Normal users should only compile one of those. This series does not make omapdrm use the core omapdss API, that will happen in a separate series for omapdrm.
Diffstat (limited to 'drivers/video/omap2/dss/dsi.c')
-rw-r--r--drivers/video/omap2/dss/dsi.c26
1 files changed, 9 insertions, 17 deletions
diff --git a/drivers/video/omap2/dss/dsi.c b/drivers/video/omap2/dss/dsi.c
index db9663dcfbd0..28d41d16b7be 100644
--- a/drivers/video/omap2/dss/dsi.c
+++ b/drivers/video/omap2/dss/dsi.c
@@ -4535,7 +4535,7 @@ static void dsi_framedone_timeout_work_callback(struct work_struct *work)
dsi_handle_framedone(dsi->pdev, -ETIMEDOUT);
}
-static void dsi_framedone_irq_callback(void *data, u32 mask)
+static void dsi_framedone_irq_callback(void *data)
{
struct platform_device *dsidev = (struct platform_device *) data;
struct dsi_data *dsi = dsi_get_dsidrv_data(dsidev);
@@ -4609,7 +4609,6 @@ static int dsi_display_init_dispc(struct omap_dss_device *dssdev)
struct dsi_data *dsi = dsi_get_dsidrv_data(dsidev);
struct omap_overlay_manager *mgr = dssdev->output->manager;
int r;
- u32 irq = 0;
if (dsi->mode == OMAP_DSS_DSI_CMD_MODE) {
dsi->timings.hsw = 1;
@@ -4619,12 +4618,10 @@ static int dsi_display_init_dispc(struct omap_dss_device *dssdev)
dsi->timings.vfp = 0;
dsi->timings.vbp = 0;
- irq = dispc_mgr_get_framedone_irq(mgr->id);
-
- r = omap_dispc_register_isr(dsi_framedone_irq_callback,
- (void *) dsidev, irq);
+ r = dss_mgr_register_framedone_handler(mgr,
+ dsi_framedone_irq_callback, dsidev);
if (r) {
- DSSERR("can't get FRAMEDONE irq\n");
+ DSSERR("can't register FRAMEDONE handler\n");
goto err;
}
@@ -4662,8 +4659,8 @@ static int dsi_display_init_dispc(struct omap_dss_device *dssdev)
return 0;
err1:
if (dsi->mode == OMAP_DSS_DSI_CMD_MODE)
- omap_dispc_unregister_isr(dsi_framedone_irq_callback,
- (void *) dsidev, irq);
+ dss_mgr_unregister_framedone_handler(mgr,
+ dsi_framedone_irq_callback, dsidev);
err:
return r;
}
@@ -4674,14 +4671,9 @@ static void dsi_display_uninit_dispc(struct omap_dss_device *dssdev)
struct dsi_data *dsi = dsi_get_dsidrv_data(dsidev);
struct omap_overlay_manager *mgr = dssdev->output->manager;
- if (dsi->mode == OMAP_DSS_DSI_CMD_MODE) {
- u32 irq;
-
- irq = dispc_mgr_get_framedone_irq(mgr->id);
-
- omap_dispc_unregister_isr(dsi_framedone_irq_callback,
- (void *) dsidev, irq);
- }
+ if (dsi->mode == OMAP_DSS_DSI_CMD_MODE)
+ dss_mgr_unregister_framedone_handler(mgr,
+ dsi_framedone_irq_callback, dsidev);
}
static int dsi_configure_dsi_clocks(struct omap_dss_device *dssdev)