Tomi Valkeinen | 559d670 | 2009-11-03 11:23:50 +0200 | [diff] [blame] | 1 | /* |
| 2 | * linux/drivers/video/omap2/dss/dss.h |
| 3 | * |
| 4 | * Copyright (C) 2009 Nokia Corporation |
| 5 | * Author: Tomi Valkeinen <tomi.valkeinen@nokia.com> |
| 6 | * |
| 7 | * Some code and ideas taken from drivers/video/omap/ driver |
| 8 | * by Imre Deak. |
| 9 | * |
| 10 | * This program is free software; you can redistribute it and/or modify it |
| 11 | * under the terms of the GNU General Public License version 2 as published by |
| 12 | * the Free Software Foundation. |
| 13 | * |
| 14 | * This program is distributed in the hope that it will be useful, but WITHOUT |
| 15 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
| 16 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for |
| 17 | * more details. |
| 18 | * |
| 19 | * You should have received a copy of the GNU General Public License along with |
| 20 | * this program. If not, see <http://www.gnu.org/licenses/>. |
| 21 | */ |
| 22 | |
| 23 | #ifndef __OMAP2_DSS_H |
| 24 | #define __OMAP2_DSS_H |
| 25 | |
Tomi Valkeinen | 559d670 | 2009-11-03 11:23:50 +0200 | [diff] [blame] | 26 | #ifdef DEBUG |
Rusty Russell | 90ab5ee | 2012-01-13 09:32:20 +1030 | [diff] [blame] | 27 | extern bool dss_debug; |
Tomi Valkeinen | 559d670 | 2009-11-03 11:23:50 +0200 | [diff] [blame] | 28 | #ifdef DSS_SUBSYS_NAME |
| 29 | #define DSSDBG(format, ...) \ |
| 30 | if (dss_debug) \ |
| 31 | printk(KERN_DEBUG "omapdss " DSS_SUBSYS_NAME ": " format, \ |
| 32 | ## __VA_ARGS__) |
| 33 | #else |
| 34 | #define DSSDBG(format, ...) \ |
| 35 | if (dss_debug) \ |
| 36 | printk(KERN_DEBUG "omapdss: " format, ## __VA_ARGS__) |
| 37 | #endif |
| 38 | |
| 39 | #ifdef DSS_SUBSYS_NAME |
| 40 | #define DSSDBGF(format, ...) \ |
| 41 | if (dss_debug) \ |
| 42 | printk(KERN_DEBUG "omapdss " DSS_SUBSYS_NAME \ |
| 43 | ": %s(" format ")\n", \ |
| 44 | __func__, \ |
| 45 | ## __VA_ARGS__) |
| 46 | #else |
| 47 | #define DSSDBGF(format, ...) \ |
| 48 | if (dss_debug) \ |
| 49 | printk(KERN_DEBUG "omapdss: " \ |
| 50 | ": %s(" format ")\n", \ |
| 51 | __func__, \ |
| 52 | ## __VA_ARGS__) |
| 53 | #endif |
| 54 | |
| 55 | #else /* DEBUG */ |
| 56 | #define DSSDBG(format, ...) |
| 57 | #define DSSDBGF(format, ...) |
| 58 | #endif |
| 59 | |
| 60 | |
| 61 | #ifdef DSS_SUBSYS_NAME |
| 62 | #define DSSERR(format, ...) \ |
| 63 | printk(KERN_ERR "omapdss " DSS_SUBSYS_NAME " error: " format, \ |
| 64 | ## __VA_ARGS__) |
| 65 | #else |
| 66 | #define DSSERR(format, ...) \ |
| 67 | printk(KERN_ERR "omapdss error: " format, ## __VA_ARGS__) |
| 68 | #endif |
| 69 | |
| 70 | #ifdef DSS_SUBSYS_NAME |
| 71 | #define DSSINFO(format, ...) \ |
| 72 | printk(KERN_INFO "omapdss " DSS_SUBSYS_NAME ": " format, \ |
| 73 | ## __VA_ARGS__) |
| 74 | #else |
| 75 | #define DSSINFO(format, ...) \ |
| 76 | printk(KERN_INFO "omapdss: " format, ## __VA_ARGS__) |
| 77 | #endif |
| 78 | |
| 79 | #ifdef DSS_SUBSYS_NAME |
| 80 | #define DSSWARN(format, ...) \ |
| 81 | printk(KERN_WARNING "omapdss " DSS_SUBSYS_NAME ": " format, \ |
| 82 | ## __VA_ARGS__) |
| 83 | #else |
| 84 | #define DSSWARN(format, ...) \ |
| 85 | printk(KERN_WARNING "omapdss: " format, ## __VA_ARGS__) |
| 86 | #endif |
| 87 | |
| 88 | /* OMAP TRM gives bitfields as start:end, where start is the higher bit |
| 89 | number. For example 7:0 */ |
| 90 | #define FLD_MASK(start, end) (((1 << ((start) - (end) + 1)) - 1) << (end)) |
| 91 | #define FLD_VAL(val, start, end) (((val) << (end)) & FLD_MASK(start, end)) |
| 92 | #define FLD_GET(val, start, end) (((val) & FLD_MASK(start, end)) >> (end)) |
| 93 | #define FLD_MOD(orig, val, start, end) \ |
| 94 | (((orig) & ~FLD_MASK(start, end)) | FLD_VAL(val, start, end)) |
| 95 | |
Archit Taneja | 569969d | 2011-08-22 17:41:57 +0530 | [diff] [blame] | 96 | enum dss_io_pad_mode { |
| 97 | DSS_IO_PAD_MODE_RESET, |
| 98 | DSS_IO_PAD_MODE_RFBI, |
| 99 | DSS_IO_PAD_MODE_BYPASS, |
Tomi Valkeinen | 559d670 | 2009-11-03 11:23:50 +0200 | [diff] [blame] | 100 | }; |
| 101 | |
Mythri P K | 7ed024a | 2011-03-09 16:31:38 +0530 | [diff] [blame] | 102 | enum dss_hdmi_venc_clk_source_select { |
| 103 | DSS_VENC_TV_CLK = 0, |
| 104 | DSS_HDMI_M_PCLK = 1, |
| 105 | }; |
| 106 | |
Archit Taneja | 6ff8aa3 | 2011-08-25 18:35:58 +0530 | [diff] [blame] | 107 | enum dss_dsi_content_type { |
| 108 | DSS_DSI_CONTENT_DCS, |
| 109 | DSS_DSI_CONTENT_GENERIC, |
| 110 | }; |
| 111 | |
Archit Taneja | d9ac773 | 2012-09-22 12:38:19 +0530 | [diff] [blame] | 112 | enum dss_writeback_channel { |
| 113 | DSS_WB_LCD1_MGR = 0, |
| 114 | DSS_WB_LCD2_MGR = 1, |
| 115 | DSS_WB_TV_MGR = 2, |
| 116 | DSS_WB_OVL0 = 3, |
| 117 | DSS_WB_OVL1 = 4, |
| 118 | DSS_WB_OVL2 = 5, |
| 119 | DSS_WB_OVL3 = 6, |
| 120 | DSS_WB_LCD3_MGR = 7, |
| 121 | }; |
| 122 | |
Tomi Valkeinen | 559d670 | 2009-11-03 11:23:50 +0200 | [diff] [blame] | 123 | struct dss_clock_info { |
| 124 | /* rates that we get with dividers below */ |
| 125 | unsigned long fck; |
| 126 | |
| 127 | /* dividers */ |
| 128 | u16 fck_div; |
| 129 | }; |
| 130 | |
| 131 | struct dispc_clock_info { |
| 132 | /* rates that we get with dividers below */ |
| 133 | unsigned long lck; |
| 134 | unsigned long pck; |
| 135 | |
| 136 | /* dividers */ |
| 137 | u16 lck_div; |
| 138 | u16 pck_div; |
| 139 | }; |
| 140 | |
| 141 | struct dsi_clock_info { |
| 142 | /* rates that we get with dividers below */ |
| 143 | unsigned long fint; |
| 144 | unsigned long clkin4ddr; |
| 145 | unsigned long clkin; |
Taneja, Archit | ea75159 | 2011-03-08 05:50:35 -0600 | [diff] [blame] | 146 | unsigned long dsi_pll_hsdiv_dispc_clk; /* OMAP3: DSI1_PLL_CLK |
| 147 | * OMAP4: PLLx_CLK1 */ |
| 148 | unsigned long dsi_pll_hsdiv_dsi_clk; /* OMAP3: DSI2_PLL_CLK |
| 149 | * OMAP4: PLLx_CLK2 */ |
Tomi Valkeinen | 559d670 | 2009-11-03 11:23:50 +0200 | [diff] [blame] | 150 | unsigned long lp_clk; |
| 151 | |
| 152 | /* dividers */ |
| 153 | u16 regn; |
| 154 | u16 regm; |
Taneja, Archit | ea75159 | 2011-03-08 05:50:35 -0600 | [diff] [blame] | 155 | u16 regm_dispc; /* OMAP3: REGM3 |
| 156 | * OMAP4: REGM4 */ |
| 157 | u16 regm_dsi; /* OMAP3: REGM4 |
| 158 | * OMAP4: REGM5 */ |
Tomi Valkeinen | 559d670 | 2009-11-03 11:23:50 +0200 | [diff] [blame] | 159 | u16 lp_clk_div; |
Tomi Valkeinen | 559d670 | 2009-11-03 11:23:50 +0200 | [diff] [blame] | 160 | }; |
| 161 | |
Chandrabhanu Mahapatra | efa70b3 | 2012-06-21 11:07:44 +0530 | [diff] [blame] | 162 | struct reg_field { |
| 163 | u16 reg; |
| 164 | u8 high; |
| 165 | u8 low; |
| 166 | }; |
| 167 | |
Archit Taneja | c56fb3e | 2012-06-29 14:03:48 +0530 | [diff] [blame] | 168 | struct dss_lcd_mgr_config { |
| 169 | enum dss_io_pad_mode io_pad_mode; |
| 170 | |
| 171 | bool stallmode; |
| 172 | bool fifohandcheck; |
| 173 | |
| 174 | struct dispc_clock_info clock_info; |
| 175 | |
| 176 | int video_port_width; |
| 177 | |
| 178 | int lcden_sig_polarity; |
| 179 | }; |
| 180 | |
Tomi Valkeinen | 559d670 | 2009-11-03 11:23:50 +0200 | [diff] [blame] | 181 | struct seq_file; |
| 182 | struct platform_device; |
| 183 | |
| 184 | /* core */ |
Tomi Valkeinen | 1521653 | 2012-09-06 14:29:31 +0300 | [diff] [blame] | 185 | const char *dss_get_default_display_name(void); |
Tomi Valkeinen | 559d670 | 2009-11-03 11:23:50 +0200 | [diff] [blame] | 186 | struct bus_type *dss_get_bus(void); |
Tomi Valkeinen | 8a2cfea | 2010-02-04 17:03:41 +0200 | [diff] [blame] | 187 | struct regulator *dss_get_vdds_dsi(void); |
| 188 | struct regulator *dss_get_vdds_sdi(void); |
Tomi Valkeinen | 00928ea | 2012-02-20 11:50:06 +0200 | [diff] [blame] | 189 | int dss_get_ctx_loss_count(struct device *dev); |
| 190 | int dss_dsi_enable_pads(int dsi_id, unsigned lane_mask); |
| 191 | void dss_dsi_disable_pads(int dsi_id, unsigned lane_mask); |
Tomi Valkeinen | a8081d3 | 2012-03-08 12:52:38 +0200 | [diff] [blame] | 192 | int dss_set_min_bus_tput(struct device *dev, unsigned long tput); |
Tomi Valkeinen | e40402c | 2012-03-02 18:01:07 +0200 | [diff] [blame] | 193 | int dss_debugfs_create_file(const char *name, void (*write)(struct seq_file *)); |
Tomi Valkeinen | 559d670 | 2009-11-03 11:23:50 +0200 | [diff] [blame] | 194 | |
Tomi Valkeinen | 5274484 | 2012-09-10 13:58:29 +0300 | [diff] [blame] | 195 | struct omap_dss_device *dss_alloc_and_init_device(struct device *parent); |
| 196 | int dss_add_device(struct omap_dss_device *dssdev); |
| 197 | void dss_unregister_device(struct omap_dss_device *dssdev); |
| 198 | void dss_unregister_child_devices(struct device *parent); |
| 199 | void dss_put_device(struct omap_dss_device *dssdev); |
| 200 | void dss_copy_device_pdata(struct omap_dss_device *dst, |
| 201 | const struct omap_dss_device *src); |
Tomi Valkeinen | 35deca3 | 2012-03-01 15:45:53 +0200 | [diff] [blame] | 202 | |
Tomi Valkeinen | 58f25548 | 2011-11-04 09:48:54 +0200 | [diff] [blame] | 203 | /* apply */ |
| 204 | void dss_apply_init(void); |
| 205 | int dss_mgr_wait_for_go(struct omap_overlay_manager *mgr); |
| 206 | int dss_mgr_wait_for_go_ovl(struct omap_overlay *ovl); |
| 207 | void dss_mgr_start_update(struct omap_overlay_manager *mgr); |
| 208 | int omap_dss_mgr_apply(struct omap_overlay_manager *mgr); |
Tomi Valkeinen | eb70d73 | 2011-11-15 12:15:18 +0200 | [diff] [blame] | 209 | |
Tomi Valkeinen | 2a4ee7e | 2011-11-21 13:34:48 +0200 | [diff] [blame] | 210 | int dss_mgr_enable(struct omap_overlay_manager *mgr); |
Tomi Valkeinen | 7797c6d | 2011-11-04 10:22:46 +0200 | [diff] [blame] | 211 | void dss_mgr_disable(struct omap_overlay_manager *mgr); |
Tomi Valkeinen | eb70d73 | 2011-11-15 12:15:18 +0200 | [diff] [blame] | 212 | int dss_mgr_set_info(struct omap_overlay_manager *mgr, |
| 213 | struct omap_overlay_manager_info *info); |
| 214 | void dss_mgr_get_info(struct omap_overlay_manager *mgr, |
| 215 | struct omap_overlay_manager_info *info); |
| 216 | int dss_mgr_set_device(struct omap_overlay_manager *mgr, |
| 217 | struct omap_dss_device *dssdev); |
| 218 | int dss_mgr_unset_device(struct omap_overlay_manager *mgr); |
Archit Taneja | 97f01b3 | 2012-09-26 16:42:39 +0530 | [diff] [blame] | 219 | int dss_mgr_set_output(struct omap_overlay_manager *mgr, |
| 220 | struct omap_dss_output *output); |
| 221 | int dss_mgr_unset_output(struct omap_overlay_manager *mgr); |
Archit Taneja | 45324a2 | 2012-04-26 19:31:22 +0530 | [diff] [blame] | 222 | void dss_mgr_set_timings(struct omap_overlay_manager *mgr, |
Archit Taneja | 27dfddc | 2012-07-19 13:51:14 +0530 | [diff] [blame] | 223 | const struct omap_video_timings *timings); |
Archit Taneja | f476ae9 | 2012-06-29 14:37:03 +0530 | [diff] [blame] | 224 | void dss_mgr_set_lcd_config(struct omap_overlay_manager *mgr, |
| 225 | const struct dss_lcd_mgr_config *config); |
Archit Taneja | 228b213 | 2012-04-27 01:22:28 +0530 | [diff] [blame] | 226 | const struct omap_video_timings *dss_mgr_get_timings(struct omap_overlay_manager *mgr); |
Tomi Valkeinen | 58f25548 | 2011-11-04 09:48:54 +0200 | [diff] [blame] | 227 | |
Tomi Valkeinen | aaa874a | 2011-11-15 16:37:53 +0200 | [diff] [blame] | 228 | bool dss_ovl_is_enabled(struct omap_overlay *ovl); |
| 229 | int dss_ovl_enable(struct omap_overlay *ovl); |
| 230 | int dss_ovl_disable(struct omap_overlay *ovl); |
Tomi Valkeinen | f77b307 | 2011-11-15 12:11:11 +0200 | [diff] [blame] | 231 | int dss_ovl_set_info(struct omap_overlay *ovl, |
| 232 | struct omap_overlay_info *info); |
| 233 | void dss_ovl_get_info(struct omap_overlay *ovl, |
| 234 | struct omap_overlay_info *info); |
| 235 | int dss_ovl_set_manager(struct omap_overlay *ovl, |
| 236 | struct omap_overlay_manager *mgr); |
| 237 | int dss_ovl_unset_manager(struct omap_overlay *ovl); |
| 238 | |
Archit Taneja | 484dc40 | 2012-09-07 17:38:00 +0530 | [diff] [blame] | 239 | /* output */ |
| 240 | void dss_register_output(struct omap_dss_output *out); |
| 241 | void dss_unregister_output(struct omap_dss_output *out); |
Archit Taneja | 3224827 | 2012-09-10 14:34:16 +0530 | [diff] [blame] | 242 | struct omap_dss_output *omapdss_get_output_from_dssdev(struct omap_dss_device *dssdev); |
Archit Taneja | 484dc40 | 2012-09-07 17:38:00 +0530 | [diff] [blame] | 243 | |
Tomi Valkeinen | 559d670 | 2009-11-03 11:23:50 +0200 | [diff] [blame] | 244 | /* display */ |
| 245 | int dss_suspend_all_devices(void); |
| 246 | int dss_resume_all_devices(void); |
| 247 | void dss_disable_all_devices(void); |
| 248 | |
Tomi Valkeinen | 47eb676 | 2012-09-07 15:44:30 +0300 | [diff] [blame] | 249 | int dss_init_device(struct platform_device *pdev, |
Tomi Valkeinen | 559d670 | 2009-11-03 11:23:50 +0200 | [diff] [blame] | 250 | struct omap_dss_device *dssdev); |
| 251 | void dss_uninit_device(struct platform_device *pdev, |
| 252 | struct omap_dss_device *dssdev); |
Tomi Valkeinen | 559d670 | 2009-11-03 11:23:50 +0200 | [diff] [blame] | 253 | |
| 254 | /* manager */ |
| 255 | int dss_init_overlay_managers(struct platform_device *pdev); |
| 256 | void dss_uninit_overlay_managers(struct platform_device *pdev); |
Tomi Valkeinen | 54540d4 | 2011-12-13 13:18:52 +0200 | [diff] [blame] | 257 | int dss_mgr_simple_check(struct omap_overlay_manager *mgr, |
| 258 | const struct omap_overlay_manager_info *info); |
Archit Taneja | b917fa3 | 2012-04-27 01:07:28 +0530 | [diff] [blame] | 259 | int dss_mgr_check_timings(struct omap_overlay_manager *mgr, |
| 260 | const struct omap_video_timings *timings); |
Tomi Valkeinen | 6ac48d1 | 2011-12-08 10:32:37 +0200 | [diff] [blame] | 261 | int dss_mgr_check(struct omap_overlay_manager *mgr, |
Tomi Valkeinen | 6ac48d1 | 2011-12-08 10:32:37 +0200 | [diff] [blame] | 262 | struct omap_overlay_manager_info *info, |
Archit Taneja | 228b213 | 2012-04-27 01:22:28 +0530 | [diff] [blame] | 263 | const struct omap_video_timings *mgr_timings, |
Archit Taneja | 6e54359 | 2012-05-23 17:01:35 +0530 | [diff] [blame] | 264 | const struct dss_lcd_mgr_config *config, |
Tomi Valkeinen | 6ac48d1 | 2011-12-08 10:32:37 +0200 | [diff] [blame] | 265 | struct omap_overlay_info **overlay_infos); |
Tomi Valkeinen | 559d670 | 2009-11-03 11:23:50 +0200 | [diff] [blame] | 266 | |
Archit Taneja | f476ae9 | 2012-06-29 14:37:03 +0530 | [diff] [blame] | 267 | static inline bool dss_mgr_is_lcd(enum omap_channel id) |
| 268 | { |
| 269 | if (id == OMAP_DSS_CHANNEL_LCD || id == OMAP_DSS_CHANNEL_LCD2 || |
| 270 | id == OMAP_DSS_CHANNEL_LCD3) |
| 271 | return true; |
| 272 | else |
| 273 | return false; |
| 274 | } |
| 275 | |
Tomi Valkeinen | f6a0492 | 2012-08-06 14:44:09 +0300 | [diff] [blame] | 276 | int dss_manager_kobj_init(struct omap_overlay_manager *mgr, |
| 277 | struct platform_device *pdev); |
| 278 | void dss_manager_kobj_uninit(struct omap_overlay_manager *mgr); |
| 279 | |
Tomi Valkeinen | 559d670 | 2009-11-03 11:23:50 +0200 | [diff] [blame] | 280 | /* overlay */ |
| 281 | void dss_init_overlays(struct platform_device *pdev); |
| 282 | void dss_uninit_overlays(struct platform_device *pdev); |
Tomi Valkeinen | 559d670 | 2009-11-03 11:23:50 +0200 | [diff] [blame] | 283 | void dss_overlay_setup_dispc_manager(struct omap_overlay_manager *mgr); |
Tomi Valkeinen | 54540d4 | 2011-12-13 13:18:52 +0200 | [diff] [blame] | 284 | int dss_ovl_simple_check(struct omap_overlay *ovl, |
| 285 | const struct omap_overlay_info *info); |
Archit Taneja | 228b213 | 2012-04-27 01:22:28 +0530 | [diff] [blame] | 286 | int dss_ovl_check(struct omap_overlay *ovl, struct omap_overlay_info *info, |
| 287 | const struct omap_video_timings *mgr_timings); |
Archit Taneja | 6c6f510 | 2012-06-25 14:58:48 +0530 | [diff] [blame] | 288 | bool dss_ovl_use_replication(struct dss_lcd_mgr_config config, |
| 289 | enum omap_color_mode mode); |
Tomi Valkeinen | 9169151 | 2012-08-06 14:40:00 +0300 | [diff] [blame] | 290 | int dss_overlay_kobj_init(struct omap_overlay *ovl, |
| 291 | struct platform_device *pdev); |
| 292 | void dss_overlay_kobj_uninit(struct omap_overlay *ovl); |
Tomi Valkeinen | 559d670 | 2009-11-03 11:23:50 +0200 | [diff] [blame] | 293 | |
| 294 | /* DSS */ |
Tomi Valkeinen | 6e7e8f0 | 2012-02-17 17:41:13 +0200 | [diff] [blame] | 295 | int dss_init_platform_driver(void) __init; |
Senthilvadivu Guruswamy | 96c401b | 2011-01-24 06:21:57 +0000 | [diff] [blame] | 296 | void dss_uninit_platform_driver(void); |
Tomi Valkeinen | 559d670 | 2009-11-03 11:23:50 +0200 | [diff] [blame] | 297 | |
Tomi Valkeinen | de09e45 | 2012-09-21 12:09:54 +0300 | [diff] [blame] | 298 | int dss_dpi_select_source(enum omap_channel channel); |
Mythri P K | 7ed024a | 2011-03-09 16:31:38 +0530 | [diff] [blame] | 299 | void dss_select_hdmi_venc_clk_source(enum dss_hdmi_venc_clk_source_select); |
Tomi Valkeinen | 4a61e26 | 2011-08-31 14:33:31 +0300 | [diff] [blame] | 300 | enum dss_hdmi_venc_clk_source_select dss_get_hdmi_venc_clk_source(void); |
Archit Taneja | 89a35e5 | 2011-04-12 13:52:23 +0530 | [diff] [blame] | 301 | const char *dss_get_generic_clk_source_name(enum omap_dss_clk_source clk_src); |
Senthilvadivu Guruswamy | 8b9cb3a | 2011-01-24 06:21:58 +0000 | [diff] [blame] | 302 | void dss_dump_clocks(struct seq_file *s); |
Tomi Valkeinen | 559d670 | 2009-11-03 11:23:50 +0200 | [diff] [blame] | 303 | |
Chandrabhanu Mahapatra | 1b3bcb3 | 2012-09-29 11:25:42 +0530 | [diff] [blame^] | 304 | #if defined(CONFIG_OMAP2_DSS_DEBUGFS) |
Senthilvadivu Guruswamy | 8b9cb3a | 2011-01-24 06:21:58 +0000 | [diff] [blame] | 305 | void dss_debug_dump_clocks(struct seq_file *s); |
| 306 | #endif |
Tomi Valkeinen | 559d670 | 2009-11-03 11:23:50 +0200 | [diff] [blame] | 307 | |
Archit Taneja | 889b4fd | 2012-07-20 17:18:49 +0530 | [diff] [blame] | 308 | void dss_sdi_init(int datapairs); |
Tomi Valkeinen | 559d670 | 2009-11-03 11:23:50 +0200 | [diff] [blame] | 309 | int dss_sdi_enable(void); |
| 310 | void dss_sdi_disable(void); |
| 311 | |
Archit Taneja | 89a35e5 | 2011-04-12 13:52:23 +0530 | [diff] [blame] | 312 | void dss_select_dispc_clk_source(enum omap_dss_clk_source clk_src); |
Archit Taneja | 5a8b572 | 2011-05-12 17:26:29 +0530 | [diff] [blame] | 313 | void dss_select_dsi_clk_source(int dsi_module, |
| 314 | enum omap_dss_clk_source clk_src); |
Taneja, Archit | ea75159 | 2011-03-08 05:50:35 -0600 | [diff] [blame] | 315 | void dss_select_lcd_clk_source(enum omap_channel channel, |
Archit Taneja | 89a35e5 | 2011-04-12 13:52:23 +0530 | [diff] [blame] | 316 | enum omap_dss_clk_source clk_src); |
| 317 | enum omap_dss_clk_source dss_get_dispc_clk_source(void); |
Archit Taneja | 5a8b572 | 2011-05-12 17:26:29 +0530 | [diff] [blame] | 318 | enum omap_dss_clk_source dss_get_dsi_clk_source(int dsi_module); |
Archit Taneja | 89a35e5 | 2011-04-12 13:52:23 +0530 | [diff] [blame] | 319 | enum omap_dss_clk_source dss_get_lcd_clk_source(enum omap_channel channel); |
Tomi Valkeinen | 2f18c4d | 2010-01-08 18:00:36 +0200 | [diff] [blame] | 320 | |
Tomi Valkeinen | 559d670 | 2009-11-03 11:23:50 +0200 | [diff] [blame] | 321 | void dss_set_venc_output(enum omap_dss_venc_type type); |
| 322 | void dss_set_dac_pwrdn_bgz(bool enable); |
| 323 | |
| 324 | unsigned long dss_get_dpll4_rate(void); |
Tomi Valkeinen | 559d670 | 2009-11-03 11:23:50 +0200 | [diff] [blame] | 325 | int dss_set_clock_div(struct dss_clock_info *cinfo); |
Archit Taneja | 6d523e7 | 2012-06-21 09:33:55 +0530 | [diff] [blame] | 326 | int dss_calc_clock_div(unsigned long req_pck, struct dss_clock_info *dss_cinfo, |
Tomi Valkeinen | 559d670 | 2009-11-03 11:23:50 +0200 | [diff] [blame] | 327 | struct dispc_clock_info *dispc_cinfo); |
| 328 | |
| 329 | /* SDI */ |
Tomi Valkeinen | 6e7e8f0 | 2012-02-17 17:41:13 +0200 | [diff] [blame] | 330 | int sdi_init_platform_driver(void) __init; |
| 331 | void sdi_uninit_platform_driver(void) __exit; |
Tomi Valkeinen | 559d670 | 2009-11-03 11:23:50 +0200 | [diff] [blame] | 332 | |
| 333 | /* DSI */ |
Jani Nikula | 368a148 | 2010-05-07 11:58:41 +0200 | [diff] [blame] | 334 | #ifdef CONFIG_OMAP2_DSS_DSI |
Archit Taneja | 5a8b572 | 2011-05-12 17:26:29 +0530 | [diff] [blame] | 335 | |
| 336 | struct dentry; |
| 337 | struct file_operations; |
| 338 | |
Tomi Valkeinen | 6e7e8f0 | 2012-02-17 17:41:13 +0200 | [diff] [blame] | 339 | int dsi_init_platform_driver(void) __init; |
| 340 | void dsi_uninit_platform_driver(void) __exit; |
Tomi Valkeinen | 559d670 | 2009-11-03 11:23:50 +0200 | [diff] [blame] | 341 | |
Tomi Valkeinen | 4fbafaf | 2011-05-27 10:52:19 +0300 | [diff] [blame] | 342 | int dsi_runtime_get(struct platform_device *dsidev); |
| 343 | void dsi_runtime_put(struct platform_device *dsidev); |
| 344 | |
Tomi Valkeinen | 559d670 | 2009-11-03 11:23:50 +0200 | [diff] [blame] | 345 | void dsi_dump_clocks(struct seq_file *s); |
Tomi Valkeinen | 559d670 | 2009-11-03 11:23:50 +0200 | [diff] [blame] | 346 | |
Tomi Valkeinen | 559d670 | 2009-11-03 11:23:50 +0200 | [diff] [blame] | 347 | void dsi_irq_handler(void); |
Archit Taneja | a3b3cc2 | 2011-09-08 18:42:16 +0530 | [diff] [blame] | 348 | u8 dsi_get_pixel_size(enum omap_dss_dsi_pixel_format fmt); |
| 349 | |
Archit Taneja | a72b64b | 2011-05-12 17:26:26 +0530 | [diff] [blame] | 350 | unsigned long dsi_get_pll_hsdiv_dispc_rate(struct platform_device *dsidev); |
| 351 | int dsi_pll_set_clock_div(struct platform_device *dsidev, |
| 352 | struct dsi_clock_info *cinfo); |
Archit Taneja | 6d523e7 | 2012-06-21 09:33:55 +0530 | [diff] [blame] | 353 | int dsi_pll_calc_clock_div_pck(struct platform_device *dsidev, |
Archit Taneja | a72b64b | 2011-05-12 17:26:26 +0530 | [diff] [blame] | 354 | unsigned long req_pck, struct dsi_clock_info *cinfo, |
Tomi Valkeinen | 559d670 | 2009-11-03 11:23:50 +0200 | [diff] [blame] | 355 | struct dispc_clock_info *dispc_cinfo); |
Archit Taneja | a72b64b | 2011-05-12 17:26:26 +0530 | [diff] [blame] | 356 | int dsi_pll_init(struct platform_device *dsidev, bool enable_hsclk, |
| 357 | bool enable_hsdiv); |
| 358 | void dsi_pll_uninit(struct platform_device *dsidev, bool disconnect_lanes); |
Archit Taneja | a72b64b | 2011-05-12 17:26:26 +0530 | [diff] [blame] | 359 | void dsi_wait_pll_hsdiv_dispc_active(struct platform_device *dsidev); |
| 360 | void dsi_wait_pll_hsdiv_dsi_active(struct platform_device *dsidev); |
| 361 | struct platform_device *dsi_get_dsidev_from_id(int module); |
Jani Nikula | 368a148 | 2010-05-07 11:58:41 +0200 | [diff] [blame] | 362 | #else |
Tomi Valkeinen | 4fbafaf | 2011-05-27 10:52:19 +0300 | [diff] [blame] | 363 | static inline int dsi_runtime_get(struct platform_device *dsidev) |
| 364 | { |
| 365 | return 0; |
| 366 | } |
| 367 | static inline void dsi_runtime_put(struct platform_device *dsidev) |
| 368 | { |
| 369 | } |
Archit Taneja | a3b3cc2 | 2011-09-08 18:42:16 +0530 | [diff] [blame] | 370 | static inline u8 dsi_get_pixel_size(enum omap_dss_dsi_pixel_format fmt) |
| 371 | { |
| 372 | WARN("%s: DSI not compiled in, returning pixel_size as 0\n", __func__); |
| 373 | return 0; |
| 374 | } |
Archit Taneja | a72b64b | 2011-05-12 17:26:26 +0530 | [diff] [blame] | 375 | static inline unsigned long dsi_get_pll_hsdiv_dispc_rate(struct platform_device *dsidev) |
Taneja, Archit | 66534e8 | 2011-03-08 05:50:34 -0600 | [diff] [blame] | 376 | { |
| 377 | WARN("%s: DSI not compiled in, returning rate as 0\n", __func__); |
| 378 | return 0; |
| 379 | } |
Tomi Valkeinen | 943e445 | 2011-04-30 15:38:15 +0300 | [diff] [blame] | 380 | static inline int dsi_pll_set_clock_div(struct platform_device *dsidev, |
| 381 | struct dsi_clock_info *cinfo) |
| 382 | { |
| 383 | WARN("%s: DSI not compiled in\n", __func__); |
| 384 | return -ENODEV; |
| 385 | } |
| 386 | static inline int dsi_pll_calc_clock_div_pck(struct platform_device *dsidev, |
Archit Taneja | 6d523e7 | 2012-06-21 09:33:55 +0530 | [diff] [blame] | 387 | unsigned long req_pck, |
Tomi Valkeinen | 943e445 | 2011-04-30 15:38:15 +0300 | [diff] [blame] | 388 | struct dsi_clock_info *dsi_cinfo, |
| 389 | struct dispc_clock_info *dispc_cinfo) |
| 390 | { |
| 391 | WARN("%s: DSI not compiled in\n", __func__); |
| 392 | return -ENODEV; |
| 393 | } |
| 394 | static inline int dsi_pll_init(struct platform_device *dsidev, |
| 395 | bool enable_hsclk, bool enable_hsdiv) |
| 396 | { |
| 397 | WARN("%s: DSI not compiled in\n", __func__); |
| 398 | return -ENODEV; |
| 399 | } |
| 400 | static inline void dsi_pll_uninit(struct platform_device *dsidev, |
| 401 | bool disconnect_lanes) |
| 402 | { |
| 403 | } |
Archit Taneja | a72b64b | 2011-05-12 17:26:26 +0530 | [diff] [blame] | 404 | static inline void dsi_wait_pll_hsdiv_dispc_active(struct platform_device *dsidev) |
Tomi Valkeinen | e406f90 | 2010-06-09 15:28:12 +0300 | [diff] [blame] | 405 | { |
| 406 | } |
Archit Taneja | a72b64b | 2011-05-12 17:26:26 +0530 | [diff] [blame] | 407 | static inline void dsi_wait_pll_hsdiv_dsi_active(struct platform_device *dsidev) |
Tomi Valkeinen | e406f90 | 2010-06-09 15:28:12 +0300 | [diff] [blame] | 408 | { |
| 409 | } |
Archit Taneja | a72b64b | 2011-05-12 17:26:26 +0530 | [diff] [blame] | 410 | static inline struct platform_device *dsi_get_dsidev_from_id(int module) |
| 411 | { |
| 412 | WARN("%s: DSI not compiled in, returning platform device as NULL\n", |
| 413 | __func__); |
| 414 | return NULL; |
| 415 | } |
Jani Nikula | 368a148 | 2010-05-07 11:58:41 +0200 | [diff] [blame] | 416 | #endif |
Tomi Valkeinen | 559d670 | 2009-11-03 11:23:50 +0200 | [diff] [blame] | 417 | |
| 418 | /* DPI */ |
Tomi Valkeinen | 6e7e8f0 | 2012-02-17 17:41:13 +0200 | [diff] [blame] | 419 | int dpi_init_platform_driver(void) __init; |
| 420 | void dpi_uninit_platform_driver(void) __exit; |
Tomi Valkeinen | 559d670 | 2009-11-03 11:23:50 +0200 | [diff] [blame] | 421 | |
| 422 | /* DISPC */ |
Tomi Valkeinen | 6e7e8f0 | 2012-02-17 17:41:13 +0200 | [diff] [blame] | 423 | int dispc_init_platform_driver(void) __init; |
| 424 | void dispc_uninit_platform_driver(void) __exit; |
Tomi Valkeinen | 559d670 | 2009-11-03 11:23:50 +0200 | [diff] [blame] | 425 | void dispc_dump_clocks(struct seq_file *s); |
Tomi Valkeinen | 559d670 | 2009-11-03 11:23:50 +0200 | [diff] [blame] | 426 | void dispc_irq_handler(void); |
Tomi Valkeinen | 559d670 | 2009-11-03 11:23:50 +0200 | [diff] [blame] | 427 | |
Tomi Valkeinen | 4fbafaf | 2011-05-27 10:52:19 +0300 | [diff] [blame] | 428 | int dispc_runtime_get(void); |
| 429 | void dispc_runtime_put(void); |
Tomi Valkeinen | 559d670 | 2009-11-03 11:23:50 +0200 | [diff] [blame] | 430 | |
| 431 | void dispc_enable_sidle(void); |
| 432 | void dispc_disable_sidle(void); |
| 433 | |
| 434 | void dispc_lcd_enable_signal_polarity(bool act_high); |
| 435 | void dispc_lcd_enable_signal(bool enable); |
| 436 | void dispc_pck_free_enable(bool enable); |
Tomi Valkeinen | cd295ae | 2011-08-16 13:49:15 +0300 | [diff] [blame] | 437 | void dispc_enable_fifomerge(bool enable); |
| 438 | void dispc_enable_gamma_table(bool enable); |
| 439 | void dispc_set_loadmode(enum omap_dss_load_mode mode); |
| 440 | |
Archit Taneja | 8f36616 | 2012-04-16 12:53:44 +0530 | [diff] [blame] | 441 | bool dispc_mgr_timings_ok(enum omap_channel channel, |
Archit Taneja | b917fa3 | 2012-04-27 01:07:28 +0530 | [diff] [blame] | 442 | const struct omap_video_timings *timings); |
Tomi Valkeinen | cd295ae | 2011-08-16 13:49:15 +0300 | [diff] [blame] | 443 | unsigned long dispc_fclk_rate(void); |
Archit Taneja | 6d523e7 | 2012-06-21 09:33:55 +0530 | [diff] [blame] | 444 | void dispc_find_clk_divs(unsigned long req_pck, unsigned long fck, |
Tomi Valkeinen | cd295ae | 2011-08-16 13:49:15 +0300 | [diff] [blame] | 445 | struct dispc_clock_info *cinfo); |
| 446 | int dispc_calc_clock_rates(unsigned long dispc_fclk_rate, |
| 447 | struct dispc_clock_info *cinfo); |
| 448 | |
| 449 | |
Tomi Valkeinen | 6f04e1b | 2011-10-31 08:58:52 +0200 | [diff] [blame] | 450 | void dispc_ovl_set_fifo_threshold(enum omap_plane plane, u32 low, u32 high); |
Tomi Valkeinen | 83fa2f2 | 2012-01-13 13:17:01 +0200 | [diff] [blame] | 451 | void dispc_ovl_compute_fifo_thresholds(enum omap_plane plane, |
Tomi Valkeinen | 3568f2a | 2012-05-15 15:31:01 +0300 | [diff] [blame] | 452 | u32 *fifo_low, u32 *fifo_high, bool use_fifomerge, |
| 453 | bool manual_update); |
Archit Taneja | 8eeb701 | 2012-08-22 12:33:49 +0530 | [diff] [blame] | 454 | int dispc_ovl_setup(enum omap_plane plane, const struct omap_overlay_info *oi, |
Archit Taneja | 8ba8530 | 2012-09-26 17:00:37 +0530 | [diff] [blame] | 455 | bool replication, const struct omap_video_timings *mgr_timings, |
| 456 | bool mem_to_mem); |
Tomi Valkeinen | cd295ae | 2011-08-16 13:49:15 +0300 | [diff] [blame] | 457 | int dispc_ovl_enable(enum omap_plane plane, bool enable); |
Tomi Valkeinen | f427984 | 2011-10-28 15:26:26 +0300 | [diff] [blame] | 458 | void dispc_ovl_set_channel_out(enum omap_plane plane, |
| 459 | enum omap_channel channel); |
Tomi Valkeinen | cd295ae | 2011-08-16 13:49:15 +0300 | [diff] [blame] | 460 | |
| 461 | void dispc_mgr_enable_fifohandcheck(enum omap_channel channel, bool enable); |
Tomi Valkeinen | 3dcec4d | 2011-11-07 15:50:09 +0200 | [diff] [blame] | 462 | u32 dispc_mgr_get_vsync_irq(enum omap_channel channel); |
Tomi Valkeinen | 7d1365c | 2011-11-18 15:39:52 +0200 | [diff] [blame] | 463 | u32 dispc_mgr_get_framedone_irq(enum omap_channel channel); |
Tomi Valkeinen | 26d9dd0 | 2011-08-16 13:45:15 +0300 | [diff] [blame] | 464 | bool dispc_mgr_go_busy(enum omap_channel channel); |
| 465 | void dispc_mgr_go(enum omap_channel channel); |
Tomi Valkeinen | 87545957 | 2011-11-15 10:56:11 +0200 | [diff] [blame] | 466 | bool dispc_mgr_is_enabled(enum omap_channel channel); |
Tomi Valkeinen | 26d9dd0 | 2011-08-16 13:45:15 +0300 | [diff] [blame] | 467 | void dispc_mgr_enable(enum omap_channel channel, bool enable); |
| 468 | bool dispc_mgr_is_channel_enabled(enum omap_channel channel); |
Archit Taneja | 569969d | 2011-08-22 17:41:57 +0530 | [diff] [blame] | 469 | void dispc_mgr_set_io_pad_mode(enum dss_io_pad_mode mode); |
| 470 | void dispc_mgr_enable_stallmode(enum omap_channel channel, bool enable); |
Tomi Valkeinen | 26d9dd0 | 2011-08-16 13:45:15 +0300 | [diff] [blame] | 471 | void dispc_mgr_set_tft_data_lines(enum omap_channel channel, u8 data_lines); |
Archit Taneja | d21f43b | 2012-06-21 09:45:11 +0530 | [diff] [blame] | 472 | void dispc_mgr_set_lcd_type_tft(enum omap_channel channel); |
Archit Taneja | c51d921 | 2012-04-16 12:53:43 +0530 | [diff] [blame] | 473 | void dispc_mgr_set_timings(enum omap_channel channel, |
Sumit Semwal | 64ba4f7 | 2010-12-02 11:27:10 +0000 | [diff] [blame] | 474 | struct omap_video_timings *timings); |
Tomi Valkeinen | cd295ae | 2011-08-16 13:49:15 +0300 | [diff] [blame] | 475 | unsigned long dispc_mgr_lclk_rate(enum omap_channel channel); |
| 476 | unsigned long dispc_mgr_pclk_rate(enum omap_channel channel); |
Chandrabhanu Mahapatra | 8b53d99 | 2012-04-23 12:16:50 +0530 | [diff] [blame] | 477 | unsigned long dispc_core_clk_rate(void); |
Archit Taneja | f0d08f8 | 2012-06-29 14:00:54 +0530 | [diff] [blame] | 478 | void dispc_mgr_set_clock_div(enum omap_channel channel, |
Sumit Semwal | ff1b2cd | 2010-12-02 11:27:11 +0000 | [diff] [blame] | 479 | struct dispc_clock_info *cinfo); |
Tomi Valkeinen | 26d9dd0 | 2011-08-16 13:45:15 +0300 | [diff] [blame] | 480 | int dispc_mgr_get_clock_div(enum omap_channel channel, |
Sumit Semwal | ff1b2cd | 2010-12-02 11:27:11 +0000 | [diff] [blame] | 481 | struct dispc_clock_info *cinfo); |
Tomi Valkeinen | c64dca4 | 2011-11-04 18:14:20 +0200 | [diff] [blame] | 482 | void dispc_mgr_setup(enum omap_channel channel, |
| 483 | struct omap_overlay_manager_info *info); |
Tomi Valkeinen | 559d670 | 2009-11-03 11:23:50 +0200 | [diff] [blame] | 484 | |
Archit Taneja | 0b23e5b | 2012-09-22 12:39:33 +0530 | [diff] [blame] | 485 | u32 dispc_wb_get_framedone_irq(void); |
| 486 | bool dispc_wb_go_busy(void); |
| 487 | void dispc_wb_go(void); |
| 488 | void dispc_wb_enable(bool enable); |
| 489 | bool dispc_wb_is_enabled(void); |
Archit Taneja | d9ac773 | 2012-09-22 12:38:19 +0530 | [diff] [blame] | 490 | void dispc_wb_set_channel_in(enum dss_writeback_channel channel); |
Archit Taneja | 749feff | 2012-08-31 12:32:52 +0530 | [diff] [blame] | 491 | int dispc_wb_setup(const struct omap_dss_writeback_info *wi, |
Archit Taneja | 9e4a0fc | 2012-08-24 16:59:26 +0530 | [diff] [blame] | 492 | bool mem_to_mem, const struct omap_video_timings *timings); |
Archit Taneja | d9ac773 | 2012-09-22 12:38:19 +0530 | [diff] [blame] | 493 | |
Tomi Valkeinen | 559d670 | 2009-11-03 11:23:50 +0200 | [diff] [blame] | 494 | /* VENC */ |
Jani Nikula | 368a148 | 2010-05-07 11:58:41 +0200 | [diff] [blame] | 495 | #ifdef CONFIG_OMAP2_DSS_VENC |
Tomi Valkeinen | 6e7e8f0 | 2012-02-17 17:41:13 +0200 | [diff] [blame] | 496 | int venc_init_platform_driver(void) __init; |
| 497 | void venc_uninit_platform_driver(void) __exit; |
Archit Taneja | c3dc6a7 | 2011-09-13 18:28:41 +0530 | [diff] [blame] | 498 | unsigned long venc_get_pixel_clock(void); |
Jani Nikula | 368a148 | 2010-05-07 11:58:41 +0200 | [diff] [blame] | 499 | #else |
Archit Taneja | c3dc6a7 | 2011-09-13 18:28:41 +0530 | [diff] [blame] | 500 | static inline unsigned long venc_get_pixel_clock(void) |
| 501 | { |
| 502 | WARN("%s: VENC not compiled in, returning pclk as 0\n", __func__); |
| 503 | return 0; |
| 504 | } |
Jani Nikula | 368a148 | 2010-05-07 11:58:41 +0200 | [diff] [blame] | 505 | #endif |
Archit Taneja | 156fd99 | 2012-07-06 20:52:37 +0530 | [diff] [blame] | 506 | int omapdss_venc_display_enable(struct omap_dss_device *dssdev); |
| 507 | void omapdss_venc_display_disable(struct omap_dss_device *dssdev); |
| 508 | void omapdss_venc_set_timings(struct omap_dss_device *dssdev, |
| 509 | struct omap_video_timings *timings); |
| 510 | int omapdss_venc_check_timings(struct omap_dss_device *dssdev, |
| 511 | struct omap_video_timings *timings); |
| 512 | u32 omapdss_venc_get_wss(struct omap_dss_device *dssdev); |
| 513 | int omapdss_venc_set_wss(struct omap_dss_device *dssdev, u32 wss); |
Archit Taneja | febe290 | 2012-08-16 11:55:15 +0530 | [diff] [blame] | 514 | void omapdss_venc_set_type(struct omap_dss_device *dssdev, |
| 515 | enum omap_dss_venc_type type); |
Archit Taneja | 89e7195 | 2012-08-16 11:56:31 +0530 | [diff] [blame] | 516 | void omapdss_venc_invert_vid_out_polarity(struct omap_dss_device *dssdev, |
| 517 | bool invert_polarity); |
Archit Taneja | 156fd99 | 2012-07-06 20:52:37 +0530 | [diff] [blame] | 518 | int venc_panel_init(void); |
| 519 | void venc_panel_exit(void); |
Tomi Valkeinen | 559d670 | 2009-11-03 11:23:50 +0200 | [diff] [blame] | 520 | |
Mythri P K | c3198a5 | 2011-03-12 12:04:27 +0530 | [diff] [blame] | 521 | /* HDMI */ |
| 522 | #ifdef CONFIG_OMAP4_DSS_HDMI |
Tomi Valkeinen | 6e7e8f0 | 2012-02-17 17:41:13 +0200 | [diff] [blame] | 523 | int hdmi_init_platform_driver(void) __init; |
| 524 | void hdmi_uninit_platform_driver(void) __exit; |
Archit Taneja | c3dc6a7 | 2011-09-13 18:28:41 +0530 | [diff] [blame] | 525 | unsigned long hdmi_get_pixel_clock(void); |
Mythri P K | c3198a5 | 2011-03-12 12:04:27 +0530 | [diff] [blame] | 526 | #else |
Archit Taneja | c3dc6a7 | 2011-09-13 18:28:41 +0530 | [diff] [blame] | 527 | static inline unsigned long hdmi_get_pixel_clock(void) |
| 528 | { |
| 529 | WARN("%s: HDMI not compiled in, returning pclk as 0\n", __func__); |
| 530 | return 0; |
| 531 | } |
Mythri P K | c3198a5 | 2011-03-12 12:04:27 +0530 | [diff] [blame] | 532 | #endif |
| 533 | int omapdss_hdmi_display_enable(struct omap_dss_device *dssdev); |
| 534 | void omapdss_hdmi_display_disable(struct omap_dss_device *dssdev); |
Archit Taneja | 7849398 | 2012-08-08 16:50:42 +0530 | [diff] [blame] | 535 | void omapdss_hdmi_display_set_timing(struct omap_dss_device *dssdev, |
| 536 | struct omap_video_timings *timings); |
Mythri P K | c3198a5 | 2011-03-12 12:04:27 +0530 | [diff] [blame] | 537 | int omapdss_hdmi_display_check_timing(struct omap_dss_device *dssdev, |
| 538 | struct omap_video_timings *timings); |
Tomi Valkeinen | 4702456 | 2011-08-25 17:12:56 +0300 | [diff] [blame] | 539 | int omapdss_hdmi_read_edid(u8 *buf, int len); |
Tomi Valkeinen | 759593f | 2011-08-29 18:10:20 +0300 | [diff] [blame] | 540 | bool omapdss_hdmi_detect(void); |
Mythri P K | 70be832 | 2011-03-10 15:48:48 +0530 | [diff] [blame] | 541 | int hdmi_panel_init(void); |
| 542 | void hdmi_panel_exit(void); |
Ricardo Neri | f3a97491 | 2012-05-09 21:09:50 -0500 | [diff] [blame] | 543 | #ifdef CONFIG_OMAP4_DSS_HDMI_AUDIO |
| 544 | int hdmi_audio_enable(void); |
| 545 | void hdmi_audio_disable(void); |
| 546 | int hdmi_audio_start(void); |
| 547 | void hdmi_audio_stop(void); |
| 548 | bool hdmi_mode_has_audio(void); |
| 549 | int hdmi_audio_config(struct omap_dss_audio *audio); |
| 550 | #endif |
Mythri P K | c3198a5 | 2011-03-12 12:04:27 +0530 | [diff] [blame] | 551 | |
Tomi Valkeinen | 559d670 | 2009-11-03 11:23:50 +0200 | [diff] [blame] | 552 | /* RFBI */ |
Tomi Valkeinen | 6e7e8f0 | 2012-02-17 17:41:13 +0200 | [diff] [blame] | 553 | int rfbi_init_platform_driver(void) __init; |
| 554 | void rfbi_uninit_platform_driver(void) __exit; |
Tomi Valkeinen | 559d670 | 2009-11-03 11:23:50 +0200 | [diff] [blame] | 555 | |
Tomi Valkeinen | dfc0fd8 | 2009-12-17 14:35:21 +0200 | [diff] [blame] | 556 | |
| 557 | #ifdef CONFIG_OMAP2_DSS_COLLECT_IRQ_STATS |
| 558 | static inline void dss_collect_irq_stats(u32 irqstatus, unsigned *irq_arr) |
| 559 | { |
| 560 | int b; |
| 561 | for (b = 0; b < 32; ++b) { |
| 562 | if (irqstatus & (1 << b)) |
| 563 | irq_arr[b]++; |
| 564 | } |
| 565 | } |
| 566 | #endif |
| 567 | |
Tomi Valkeinen | 559d670 | 2009-11-03 11:23:50 +0200 | [diff] [blame] | 568 | #endif |