Archit Taneja | e1ef4d2 | 2010-09-15 18:47:29 +0530 | [diff] [blame] | 1 | /* |
| 2 | * linux/drivers/video/omap2/dss/dss_features.h |
| 3 | * |
| 4 | * Copyright (C) 2010 Texas Instruments |
| 5 | * Author: Archit Taneja <archit@ti.com> |
| 6 | * |
| 7 | * This program is free software; you can redistribute it and/or modify it |
| 8 | * under the terms of the GNU General Public License version 2 as published by |
| 9 | * the Free Software Foundation. |
| 10 | * |
| 11 | * This program is distributed in the hope that it will be useful, but WITHOUT |
| 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
| 13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for |
| 14 | * more details. |
| 15 | * |
| 16 | * You should have received a copy of the GNU General Public License along with |
| 17 | * this program. If not, see <http://www.gnu.org/licenses/>. |
| 18 | */ |
| 19 | |
| 20 | #ifndef __OMAP2_DSS_FEATURES_H |
| 21 | #define __OMAP2_DSS_FEATURES_H |
| 22 | |
Chandrabhanu Mahapatra | e86d456 | 2012-06-29 10:43:13 +0530 | [diff] [blame] | 23 | #define MAX_DSS_MANAGERS 4 |
Archit Taneja | b8c095b | 2011-09-13 18:20:33 +0530 | [diff] [blame] | 24 | #define MAX_DSS_OVERLAYS 4 |
Chandrabhanu Mahapatra | e86d456 | 2012-06-29 10:43:13 +0530 | [diff] [blame] | 25 | #define MAX_DSS_LCD_MANAGERS 3 |
Archit Taneja | a72b64b | 2011-05-12 17:26:26 +0530 | [diff] [blame] | 26 | #define MAX_NUM_DSI 2 |
Archit Taneja | e1ef4d2 | 2010-09-15 18:47:29 +0530 | [diff] [blame] | 27 | |
| 28 | /* DSS has feature id */ |
| 29 | enum dss_feat_id { |
Archit Taneja | c124f23 | 2012-01-30 10:52:39 +0530 | [diff] [blame] | 30 | FEAT_LCDENABLEPOL, |
| 31 | FEAT_LCDENABLESIGNAL, |
| 32 | FEAT_PCKFREEENABLE, |
| 33 | FEAT_FUNCGATED, |
| 34 | FEAT_MGR_LCD2, |
Chandrabhanu Mahapatra | e86d456 | 2012-06-29 10:43:13 +0530 | [diff] [blame] | 35 | FEAT_MGR_LCD3, |
Archit Taneja | c124f23 | 2012-01-30 10:52:39 +0530 | [diff] [blame] | 36 | FEAT_LINEBUFFERSPLIT, |
| 37 | FEAT_ROWREPEATENABLE, |
| 38 | FEAT_RESIZECONF, |
Murthy, Raghuveer | 5c6366e | 2011-03-03 09:27:58 -0600 | [diff] [blame] | 39 | /* Independent core clk divider */ |
Archit Taneja | c124f23 | 2012-01-30 10:52:39 +0530 | [diff] [blame] | 40 | FEAT_CORE_CLK_DIV, |
| 41 | FEAT_LCD_CLK_SRC, |
Tomi Valkeinen | c94dfe05 | 2011-04-15 10:42:59 +0300 | [diff] [blame] | 42 | /* DSI-PLL power command 0x3 is not working */ |
Archit Taneja | c124f23 | 2012-01-30 10:52:39 +0530 | [diff] [blame] | 43 | FEAT_DSI_PLL_PWR_BUG, |
Archit Taneja | c124f23 | 2012-01-30 10:52:39 +0530 | [diff] [blame] | 44 | FEAT_DSI_DCS_CMD_CONFIG_VC, |
| 45 | FEAT_DSI_VC_OCP_WIDTH, |
| 46 | FEAT_DSI_REVERSE_TXCLKESC, |
| 47 | FEAT_DSI_GNQ, |
Chandrabhanu Mahapatra | 195e672 | 2012-08-22 11:44:06 +0530 | [diff] [blame] | 48 | FEAT_DPI_USES_VDDS_DSI, |
Archit Taneja | c124f23 | 2012-01-30 10:52:39 +0530 | [diff] [blame] | 49 | FEAT_HDMI_CTS_SWMODE, |
Ricardo Neri | 7098819 | 2012-02-16 09:20:57 -0600 | [diff] [blame] | 50 | FEAT_HDMI_AUDIO_USE_MCLK, |
Archit Taneja | c124f23 | 2012-01-30 10:52:39 +0530 | [diff] [blame] | 51 | FEAT_HANDLE_UV_SEPARATE, |
| 52 | FEAT_ATTR2, |
| 53 | FEAT_VENC_REQUIRES_TV_DAC_CLK, |
| 54 | FEAT_CPR, |
| 55 | FEAT_PRELOAD, |
| 56 | FEAT_FIR_COEF_V, |
| 57 | FEAT_ALPHA_FIXED_ZORDER, |
| 58 | FEAT_ALPHA_FREE_ZORDER, |
| 59 | FEAT_FIFO_MERGE, |
Tomi Valkeinen | e0e405b | 2012-01-13 13:18:11 +0200 | [diff] [blame] | 60 | /* An unknown HW bug causing the normal FIFO thresholds not to work */ |
Archit Taneja | c124f23 | 2012-01-30 10:52:39 +0530 | [diff] [blame] | 61 | FEAT_OMAP3_DSI_FIFO_BUG, |
Chandrabhanu Mahapatra | 65e006f | 2012-05-11 19:19:55 +0530 | [diff] [blame] | 62 | FEAT_BURST_2D, |
Tomi Valkeinen | 77ccbfb | 2012-09-24 15:15:57 +0300 | [diff] [blame] | 63 | FEAT_DSI_PHY_DCC, |
Tomi Valkeinen | 29fceee | 2013-11-14 11:38:25 +0200 | [diff] [blame] | 64 | FEAT_MFLAG, |
Archit Taneja | e1ef4d2 | 2010-09-15 18:47:29 +0530 | [diff] [blame] | 65 | }; |
| 66 | |
| 67 | /* DSS register field id */ |
| 68 | enum dss_feat_reg_field { |
| 69 | FEAT_REG_FIRHINC, |
| 70 | FEAT_REG_FIRVINC, |
| 71 | FEAT_REG_FIFOHIGHTHRESHOLD, |
| 72 | FEAT_REG_FIFOLOWTHRESHOLD, |
| 73 | FEAT_REG_FIFOSIZE, |
Archit Taneja | 87a7484 | 2011-03-02 11:19:50 +0530 | [diff] [blame] | 74 | FEAT_REG_HORIZONTALACCU, |
| 75 | FEAT_REG_VERTICALACCU, |
Taneja, Archit | ea75159 | 2011-03-08 05:50:35 -0600 | [diff] [blame] | 76 | FEAT_REG_DISPC_CLK_SWITCH, |
Archit Taneja | e1ef4d2 | 2010-09-15 18:47:29 +0530 | [diff] [blame] | 77 | }; |
| 78 | |
Taneja, Archit | 31ef823 | 2011-03-14 23:28:22 -0500 | [diff] [blame] | 79 | enum dss_range_param { |
| 80 | FEAT_PARAM_DSS_FCK, |
Tomi Valkeinen | 9eaaf20 | 2011-08-29 15:56:04 +0300 | [diff] [blame] | 81 | FEAT_PARAM_DSS_PCD, |
Taneja, Archit | 4964111 | 2011-03-14 23:28:23 -0500 | [diff] [blame] | 82 | FEAT_PARAM_DSIPLL_LPDIV, |
Tomi Valkeinen | bc63f30 | 2012-08-16 16:25:29 +0300 | [diff] [blame] | 83 | FEAT_PARAM_DSI_FCK, |
Archit Taneja | 0373cac | 2011-09-08 13:25:17 +0530 | [diff] [blame] | 84 | FEAT_PARAM_DOWNSCALE, |
Chandrabhanu Mahapatra | 7282f1b | 2011-12-19 14:03:56 +0530 | [diff] [blame] | 85 | FEAT_PARAM_LINEWIDTH, |
Taneja, Archit | 31ef823 | 2011-03-14 23:28:22 -0500 | [diff] [blame] | 86 | }; |
| 87 | |
Archit Taneja | e1ef4d2 | 2010-09-15 18:47:29 +0530 | [diff] [blame] | 88 | /* DSS Feature Functions */ |
Taneja, Archit | 31ef823 | 2011-03-14 23:28:22 -0500 | [diff] [blame] | 89 | unsigned long dss_feat_get_param_min(enum dss_range_param param); |
| 90 | unsigned long dss_feat_get_param_max(enum dss_range_param param); |
Tomi Valkeinen | 67019db | 2011-08-15 15:18:15 +0300 | [diff] [blame] | 91 | enum omap_overlay_caps dss_feat_get_overlay_caps(enum omap_plane plane); |
Archit Taneja | 8dad2ab | 2010-11-25 17:58:10 +0530 | [diff] [blame] | 92 | bool dss_feat_color_mode_supported(enum omap_plane plane, |
| 93 | enum omap_color_mode color_mode); |
Archit Taneja | 89a35e5 | 2011-04-12 13:52:23 +0530 | [diff] [blame] | 94 | const char *dss_feat_get_clk_source_name(enum omap_dss_clk_source id); |
Archit Taneja | e1ef4d2 | 2010-09-15 18:47:29 +0530 | [diff] [blame] | 95 | |
Tomi Valkeinen | 5ed8cf5 | 2011-06-21 09:35:36 +0300 | [diff] [blame] | 96 | u32 dss_feat_get_buffer_size_unit(void); /* in bytes */ |
| 97 | u32 dss_feat_get_burst_size_unit(void); /* in bytes */ |
| 98 | |
Chandrabhanu Mahapatra | 65e006f | 2012-05-11 19:19:55 +0530 | [diff] [blame] | 99 | bool dss_feat_rotation_type_supported(enum omap_dss_rotation_type rot_type); |
| 100 | |
Archit Taneja | e1ef4d2 | 2010-09-15 18:47:29 +0530 | [diff] [blame] | 101 | bool dss_has_feature(enum dss_feat_id id); |
| 102 | void dss_feat_get_reg_field(enum dss_feat_reg_field id, u8 *start, u8 *end); |
Tomi Valkeinen | 649514c | 2012-09-28 12:46:49 +0300 | [diff] [blame] | 103 | void dss_features_init(enum omapdss_version version); |
Tomi Valkeinen | 98c2835 | 2015-11-04 17:10:56 +0200 | [diff] [blame] | 104 | |
| 105 | enum omap_display_type dss_feat_get_supported_displays(enum omap_channel channel); |
| 106 | enum omap_dss_output_id dss_feat_get_supported_outputs(enum omap_channel channel); |
| 107 | |
Archit Taneja | e1ef4d2 | 2010-09-15 18:47:29 +0530 | [diff] [blame] | 108 | #endif |