diff options
author | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2012-10-10 10:56:05 +0300 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2012-12-07 17:05:55 +0200 |
commit | 74b65ec24560ab0df0e7b789fa91cde4a442f169 (patch) | |
tree | 2d322869cb9ea6d9196e6743dbb7d67138b2cd30 /drivers/video/omap2/dss/output.c | |
parent | 6abae7a18a8c9dbec96915eb924dc06288a47b02 (diff) | |
download | op-kernel-dev-74b65ec24560ab0df0e7b789fa91cde4a442f169.zip op-kernel-dev-74b65ec24560ab0df0e7b789fa91cde4a442f169.tar.gz |
OMAPDSS: add manager ops
The output drivers need some operations from the overlay managers, like
enable and set_timings. These will affect the dispc registers, and need
to be synchronized with the composition-side changes with overlays and
overlay managers.
We want to handle these calls in the apply.c in the compatibility mode,
but when in non-compat mode, the calls need to be handled by some other
component (e.g. omapdrm).
To make this possible, this patch creates a set of function pointers in
a dss_mgr_ops struct, that is used to redirect the calls into the
correct destination.
The non-compat users can install their mgr ops with
dss_install_mgr_ops() function.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/video/omap2/dss/output.c')
-rw-r--r-- | drivers/video/omap2/dss/output.c | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/drivers/video/omap2/dss/output.c b/drivers/video/omap2/dss/output.c index 1a84b79..9527ee6 100644 --- a/drivers/video/omap2/dss/output.c +++ b/drivers/video/omap2/dss/output.c @@ -113,3 +113,47 @@ struct omap_dss_output *omap_dss_get_output(enum omap_dss_output_id id) return NULL; } + +static const struct dss_mgr_ops *dss_mgr_ops; + +int dss_install_mgr_ops(const struct dss_mgr_ops *mgr_ops) +{ + if (dss_mgr_ops) + return -EBUSY; + + dss_mgr_ops = mgr_ops; + + return 0; +} + +void dss_uninstall_mgr_ops(void) +{ + dss_mgr_ops = NULL; +} + +void dss_mgr_set_timings(struct omap_overlay_manager *mgr, + const struct omap_video_timings *timings) +{ + dss_mgr_ops->set_timings(mgr, timings); +} + +void dss_mgr_set_lcd_config(struct omap_overlay_manager *mgr, + const struct dss_lcd_mgr_config *config) +{ + dss_mgr_ops->set_lcd_config(mgr, config); +} + +int dss_mgr_enable(struct omap_overlay_manager *mgr) +{ + return dss_mgr_ops->enable(mgr); +} + +void dss_mgr_disable(struct omap_overlay_manager *mgr) +{ + dss_mgr_ops->disable(mgr); +} + +void dss_mgr_start_update(struct omap_overlay_manager *mgr) +{ + dss_mgr_ops->start_update(mgr); +} |