2 * Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 as published by
7 * the Free Software Foundation.
9 * This program is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
14 * You should have received a copy of the GNU General Public License along with
15 * this program. If not, see <http://www.gnu.org/licenses/>.
18 #include <linux/kernel.h>
19 #include <linux/module.h>
20 #include <linux/platform_device.h>
21 #include <linux/slab.h>
27 int omapdss_output_validate(struct omap_dss_device *out)
29 if (out->next && out->output_type != out->next->type) {
30 dev_err(out->dev, "output type and display type don't match\n");
36 EXPORT_SYMBOL(omapdss_output_validate);
38 int dss_install_mgr_ops(struct dss_device *dss,
39 const struct dss_mgr_ops *mgr_ops,
40 struct omap_drm_private *priv)
45 dss->mgr_ops = mgr_ops;
46 dss->mgr_ops_priv = priv;
50 EXPORT_SYMBOL(dss_install_mgr_ops);
52 void dss_uninstall_mgr_ops(struct dss_device *dss)
55 dss->mgr_ops_priv = NULL;
57 EXPORT_SYMBOL(dss_uninstall_mgr_ops);
59 void dss_mgr_set_timings(struct omap_dss_device *dssdev,
60 const struct videomode *vm)
62 dssdev->dss->mgr_ops->set_timings(dssdev->dss->mgr_ops_priv,
63 dssdev->dispc_channel, vm);
65 EXPORT_SYMBOL(dss_mgr_set_timings);
67 void dss_mgr_set_lcd_config(struct omap_dss_device *dssdev,
68 const struct dss_lcd_mgr_config *config)
70 dssdev->dss->mgr_ops->set_lcd_config(dssdev->dss->mgr_ops_priv,
71 dssdev->dispc_channel, config);
73 EXPORT_SYMBOL(dss_mgr_set_lcd_config);
75 int dss_mgr_enable(struct omap_dss_device *dssdev)
77 return dssdev->dss->mgr_ops->enable(dssdev->dss->mgr_ops_priv,
78 dssdev->dispc_channel);
80 EXPORT_SYMBOL(dss_mgr_enable);
82 void dss_mgr_disable(struct omap_dss_device *dssdev)
84 dssdev->dss->mgr_ops->disable(dssdev->dss->mgr_ops_priv,
85 dssdev->dispc_channel);
87 EXPORT_SYMBOL(dss_mgr_disable);
89 void dss_mgr_start_update(struct omap_dss_device *dssdev)
91 dssdev->dss->mgr_ops->start_update(dssdev->dss->mgr_ops_priv,
92 dssdev->dispc_channel);
94 EXPORT_SYMBOL(dss_mgr_start_update);
96 int dss_mgr_register_framedone_handler(struct omap_dss_device *dssdev,
97 void (*handler)(void *), void *data)
99 struct dss_device *dss = dssdev->dss;
101 return dss->mgr_ops->register_framedone_handler(dss->mgr_ops_priv,
102 dssdev->dispc_channel,
105 EXPORT_SYMBOL(dss_mgr_register_framedone_handler);
107 void dss_mgr_unregister_framedone_handler(struct omap_dss_device *dssdev,
108 void (*handler)(void *), void *data)
110 struct dss_device *dss = dssdev->dss;
112 dss->mgr_ops->unregister_framedone_handler(dss->mgr_ops_priv,
113 dssdev->dispc_channel,
116 EXPORT_SYMBOL(dss_mgr_unregister_framedone_handler);