Krishna Manikandan | b415cc1 | 2018-08-14 14:10:04 +0530 | [diff] [blame^] | 1 | /* Copyright (c) 2011-2015, 2017-2018, The Linux Foundation. All rights reserved. |
Aparna Mallavarapu | f712f5e | 2011-08-04 21:11:00 +0530 | [diff] [blame] | 2 | * |
| 3 | * Redistribution and use in source and binary forms, with or without |
| 4 | * modification, are permitted provided that the following conditions are |
| 5 | * met: |
| 6 | * * Redistributions of source code must retain the above copyright |
| 7 | * notice, this list of conditions and the following disclaimer. |
| 8 | * * Redistributions in binary form must reproduce the above |
| 9 | * copyright notice, this list of conditions and the following |
| 10 | * disclaimer in the documentation and/or other materials provided |
| 11 | * with the distribution. |
Padmanabhan Komanduru | fa4be75 | 2012-10-08 16:51:56 +0530 | [diff] [blame] | 12 | * * Neither the name of The Linux Foundation, Inc. nor the names of its |
Aparna Mallavarapu | f712f5e | 2011-08-04 21:11:00 +0530 | [diff] [blame] | 13 | * contributors may be used to endorse or promote products derived |
| 14 | * from this software without specific prior written permission. |
| 15 | * |
| 16 | * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED |
| 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF |
| 18 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT |
| 19 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS |
| 20 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
| 21 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
| 22 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR |
| 23 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, |
| 24 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE |
| 25 | * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN |
| 26 | * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 27 | * |
| 28 | */ |
| 29 | #include <mdp3.h> |
| 30 | #include <debug.h> |
| 31 | #include <reg.h> |
Channagoud Kadabi | 539ef72 | 2012-03-29 16:02:50 +0530 | [diff] [blame] | 32 | #include <msm_panel.h> |
| 33 | #include <err.h> |
Aparna Mallavarapu | f712f5e | 2011-08-04 21:11:00 +0530 | [diff] [blame] | 34 | #include <target/display.h> |
| 35 | #include <platform/timer.h> |
| 36 | #include <platform/iomap.h> |
| 37 | |
Sachin Bhayare | 5e5f32a | 2015-10-07 11:47:19 +0530 | [diff] [blame] | 38 | #define BIT(bit) (1 << (bit)) |
Shashank Mittal | 4bfb2e3 | 2012-04-16 10:56:27 -0700 | [diff] [blame] | 39 | static int mdp_rev; |
| 40 | |
Sachin Bhayare | 5e5f32a | 2015-10-07 11:47:19 +0530 | [diff] [blame] | 41 | /** |
| 42 | * mdp3_get_panic_lut_cfg() - calculate panic and robust lut mask |
| 43 | * @panel_width: Panel width |
| 44 | * |
| 45 | * DMA buffer has 16 fill levels. Which needs to configured as safe |
| 46 | * and panic levels based on panel resolutions. |
| 47 | * No. of fill levels used = ((panel active width * 8) / 512). |
| 48 | * Roundoff the use fill levels if needed. |
| 49 | * half of the total fill levels used will be treated as panic levels. |
| 50 | * Roundoff panic levels if total used fill levels are odd. |
| 51 | * |
| 52 | * Sample calculation for 720p display: |
| 53 | * Fill levels used = (720 * 8) / 512 = 12.5 after round off 13. |
| 54 | * panic levels = 13 / 2 = 6.5 after roundoff 7. |
| 55 | * Panic mask = 0x3FFF (2 bits per level) |
| 56 | * Robust mask = 0xFF80 (1 bit per level) |
| 57 | */ |
| 58 | unsigned long long mdp3_get_panic_lut_cfg(int panel_width) |
| 59 | { |
| 60 | unsigned int fill_levels = (((panel_width * 8) / 512) + 1); |
| 61 | unsigned int panic_mask = 0; |
| 62 | unsigned int robust_mask = 0; |
| 63 | int i = 0; |
| 64 | unsigned long long panic_config = 0; |
| 65 | int panic_levels = 0; |
| 66 | |
| 67 | panic_levels = fill_levels/2; |
| 68 | if (fill_levels % 2) |
| 69 | panic_levels++; |
| 70 | for (i = 0; i < panic_levels; i++) { |
| 71 | panic_mask |= (BIT((i * 2) + 1) | BIT(i * 2)); |
| 72 | robust_mask |= BIT(i); |
| 73 | } |
| 74 | panic_config = (~robust_mask); |
| 75 | panic_config = panic_config << 32; |
| 76 | panic_config |= panic_mask; |
| 77 | return panic_config; |
| 78 | } |
| 79 | |
Channagoud Kadabi | 539ef72 | 2012-03-29 16:02:50 +0530 | [diff] [blame] | 80 | int mdp_dsi_video_config(struct msm_panel_info *pinfo, |
| 81 | struct fbcon_config *fb) |
Aparna Mallavarapu | f712f5e | 2011-08-04 21:11:00 +0530 | [diff] [blame] | 82 | { |
Ajay Dudani | b01e506 | 2011-12-03 23:23:42 -0800 | [diff] [blame] | 83 | unsigned long hsync_period; |
| 84 | unsigned long vsync_period; |
| 85 | unsigned long vsync_period_intmd; |
Channagoud Kadabi | 539ef72 | 2012-03-29 16:02:50 +0530 | [diff] [blame] | 86 | struct lcdc_panel_info *lcdc = NULL; |
| 87 | int ystride = 3; |
Terence Hampson | 7385f6a | 2013-08-16 15:31:25 -0400 | [diff] [blame] | 88 | int mdp_rev = mdp_get_revision(); |
Sachin Bhayare | 5e5f32a | 2015-10-07 11:47:19 +0530 | [diff] [blame] | 89 | unsigned long long panic_config = mdp3_get_panic_lut_cfg(pinfo->xres); |
Channagoud Kadabi | 539ef72 | 2012-03-29 16:02:50 +0530 | [diff] [blame] | 90 | |
| 91 | if (pinfo == NULL) |
| 92 | return ERR_INVALID_ARGS; |
| 93 | |
| 94 | lcdc = &(pinfo->lcdc); |
| 95 | if (lcdc == NULL) |
| 96 | return ERR_INVALID_ARGS; |
Aparna Mallavarapu | f712f5e | 2011-08-04 21:11:00 +0530 | [diff] [blame] | 97 | |
Ajay Dudani | b01e506 | 2011-12-03 23:23:42 -0800 | [diff] [blame] | 98 | dprintf(SPEW, "MDP3.0.3 for DSI Video Mode\n"); |
Aparna Mallavarapu | f712f5e | 2011-08-04 21:11:00 +0530 | [diff] [blame] | 99 | |
Channagoud Kadabi | 539ef72 | 2012-03-29 16:02:50 +0530 | [diff] [blame] | 100 | hsync_period = pinfo->xres + lcdc->h_front_porch + \ |
| 101 | lcdc->h_back_porch + 1; |
| 102 | vsync_period_intmd = pinfo->yres + lcdc->v_front_porch + \ |
| 103 | lcdc->v_back_porch + 1; |
Shivaraj Shetty | f9e10c4 | 2014-09-17 04:21:15 +0530 | [diff] [blame] | 104 | if (mdp_rev == MDP_REV_304 || mdp_rev == MDP_REV_305) { |
Terence Hampson | 7385f6a | 2013-08-16 15:31:25 -0400 | [diff] [blame] | 105 | hsync_period += lcdc->h_pulse_width - 1; |
| 106 | vsync_period_intmd += lcdc->v_pulse_width - 1; |
| 107 | } |
Ajay Dudani | b01e506 | 2011-12-03 23:23:42 -0800 | [diff] [blame] | 108 | vsync_period = vsync_period_intmd * hsync_period; |
Aparna Mallavarapu | f712f5e | 2011-08-04 21:11:00 +0530 | [diff] [blame] | 109 | |
Sandeep Panda | 09fd978 | 2014-12-26 10:32:01 +0530 | [diff] [blame] | 110 | /* Program QOS remapper settings */ |
| 111 | writel(0x1A9, MDP_DMA_P_QOS_REMAPPER); |
| 112 | writel(0x0, MDP_DMA_P_WATERMARK_0); |
| 113 | writel(0x0, MDP_DMA_P_WATERMARK_1); |
| 114 | writel(0x0, MDP_DMA_P_WATERMARK_2); |
Sandeep Panda | 09fd978 | 2014-12-26 10:32:01 +0530 | [diff] [blame] | 115 | |
Sachin Bhayare | 5e5f32a | 2015-10-07 11:47:19 +0530 | [diff] [blame] | 116 | writel((panic_config & 0xFFFF), MDP_PANIC_LUT0); |
| 117 | writel(((panic_config >> 16) & 0xFFFF) , MDP_PANIC_LUT1); |
| 118 | writel(((panic_config >> 32) & 0xFFFF), MDP_ROBUST_LUT); |
| 119 | writel(0x1, MDP_PANIC_ROBUST_CTRL); |
| 120 | dprintf(INFO, "Panic Lut0 %x Lut1 %x Robest %x\n", |
| 121 | (panic_config & 0xFFFF), ((panic_config >> 16) & 0xFFFF), |
| 122 | ((panic_config >> 32) & 0xFFFF)); |
Ajay Dudani | b01e506 | 2011-12-03 23:23:42 -0800 | [diff] [blame] | 123 | // ------------- programming MDP_DMA_P_CONFIG --------------------- |
| 124 | writel(0x1800bf, MDP_DMA_P_CONFIG); // rgb888 |
Aparna Mallavarapu | f712f5e | 2011-08-04 21:11:00 +0530 | [diff] [blame] | 125 | |
Ajay Dudani | b01e506 | 2011-12-03 23:23:42 -0800 | [diff] [blame] | 126 | writel(0x00000000, MDP_DMA_P_OUT_XY); |
Channagoud Kadabi | 539ef72 | 2012-03-29 16:02:50 +0530 | [diff] [blame] | 127 | writel(pinfo->yres << 16 | pinfo->xres, MDP_DMA_P_SIZE); |
Nirmal Abraham | bc36a0b | 2017-06-06 17:41:31 +0530 | [diff] [blame] | 128 | writel((uint32_t)fb->base, MDP_DMA_P_BUF_ADDR); |
Channagoud Kadabi | 539ef72 | 2012-03-29 16:02:50 +0530 | [diff] [blame] | 129 | writel(pinfo->xres * ystride, MDP_DMA_P_BUF_Y_STRIDE); |
| 130 | writel(hsync_period << 16 | lcdc->h_pulse_width, \ |
| 131 | MDP_DSI_VIDEO_HSYNC_CTL); |
Ajay Dudani | b01e506 | 2011-12-03 23:23:42 -0800 | [diff] [blame] | 132 | writel(vsync_period, MDP_DSI_VIDEO_VSYNC_PERIOD); |
Channagoud Kadabi | 539ef72 | 2012-03-29 16:02:50 +0530 | [diff] [blame] | 133 | writel(lcdc->v_pulse_width * hsync_period, \ |
| 134 | MDP_DSI_VIDEO_VSYNC_PULSE_WIDTH); |
Shivaraj Shetty | f9e10c4 | 2014-09-17 04:21:15 +0530 | [diff] [blame] | 135 | if (mdp_rev == MDP_REV_304 || mdp_rev == MDP_REV_305) { |
Terence Hampson | 7385f6a | 2013-08-16 15:31:25 -0400 | [diff] [blame] | 136 | writel((pinfo->xres + lcdc->h_back_porch + \ |
| 137 | lcdc->h_pulse_width - 1) << 16 | \ |
| 138 | lcdc->h_back_porch + lcdc->h_pulse_width, \ |
| 139 | MDP_DSI_VIDEO_DISPLAY_HCTL); |
| 140 | writel((lcdc->v_back_porch + lcdc->v_pulse_width) \ |
| 141 | * hsync_period, MDP_DSI_VIDEO_DISPLAY_V_START); |
| 142 | writel(vsync_period - lcdc->v_front_porch * hsync_period - 1, |
Ajay Dudani | b01e506 | 2011-12-03 23:23:42 -0800 | [diff] [blame] | 143 | MDP_DSI_VIDEO_DISPLAY_V_END); |
Terence Hampson | 7385f6a | 2013-08-16 15:31:25 -0400 | [diff] [blame] | 144 | } else { |
| 145 | writel((pinfo->xres + lcdc->h_back_porch - 1) << 16 | \ |
| 146 | lcdc->h_back_porch, MDP_DSI_VIDEO_DISPLAY_HCTL); |
| 147 | writel(lcdc->v_back_porch * hsync_period, \ |
| 148 | MDP_DSI_VIDEO_DISPLAY_V_START); |
| 149 | writel((pinfo->yres + lcdc->v_back_porch) * hsync_period, |
| 150 | MDP_DSI_VIDEO_DISPLAY_V_END); |
| 151 | } |
Ajay Dudani | b01e506 | 2011-12-03 23:23:42 -0800 | [diff] [blame] | 152 | writel(0x00ABCDEF, MDP_DSI_VIDEO_BORDER_CLR); |
| 153 | writel(0x00000000, MDP_DSI_VIDEO_HSYNC_SKEW); |
| 154 | writel(0x00000000, MDP_DSI_VIDEO_CTL_POLARITY); |
Krishna Manikandan | b415cc1 | 2018-08-14 14:10:04 +0530 | [diff] [blame^] | 155 | writel(0x70000000, MDP_DSI_VIDEO_TEST_CTL); |
Ajay Dudani | b01e506 | 2011-12-03 23:23:42 -0800 | [diff] [blame] | 156 | // end of cmd mdp |
Aparna Mallavarapu | f712f5e | 2011-08-04 21:11:00 +0530 | [diff] [blame] | 157 | |
Channagoud Kadabi | 539ef72 | 2012-03-29 16:02:50 +0530 | [diff] [blame] | 158 | return 0; |
Aparna Mallavarapu | f712f5e | 2011-08-04 21:11:00 +0530 | [diff] [blame] | 159 | } |
Ajay Dudani | b01e506 | 2011-12-03 23:23:42 -0800 | [diff] [blame] | 160 | |
Channagoud Kadabi | 10189fd | 2012-05-25 13:33:39 +0530 | [diff] [blame] | 161 | int mdp_dsi_cmd_config(struct msm_panel_info *pinfo, |
| 162 | struct fbcon_config *fb) |
| 163 | { |
| 164 | int ret = 0; |
| 165 | unsigned short pack_pattern = 0x21; |
| 166 | unsigned char ystride = 3; |
Sachin Bhayare | 0f15bea | 2017-02-16 12:58:58 +0530 | [diff] [blame] | 167 | unsigned int sync_cfg; |
Sachin Bhayare | 5e5f32a | 2015-10-07 11:47:19 +0530 | [diff] [blame] | 168 | unsigned long long panic_config = 0; |
Sachin Bhayare | 0f15bea | 2017-02-16 12:58:58 +0530 | [diff] [blame] | 169 | const uint32_t vsync_hz = 19200000; /* Vsync Clock 19.2 HMz */ |
| 170 | /* Auto refresh fps = Panel fps / frame num */ |
| 171 | /* Auto refresh frame num = 60/10 = 6fps */ |
| 172 | const uint32_t autorefresh_framenum = 10; |
Sachin Bhayare | 5e5f32a | 2015-10-07 11:47:19 +0530 | [diff] [blame] | 173 | |
| 174 | if (pinfo == NULL) |
| 175 | return ERR_INVALID_ARGS; |
Channagoud Kadabi | 10189fd | 2012-05-25 13:33:39 +0530 | [diff] [blame] | 176 | |
Sandeep Panda | 09fd978 | 2014-12-26 10:32:01 +0530 | [diff] [blame] | 177 | /* Program QOS remapper settings */ |
| 178 | writel(0x1A9, MDP_DMA_P_QOS_REMAPPER); |
| 179 | writel(0x0, MDP_DMA_P_WATERMARK_0); |
| 180 | writel(0x0, MDP_DMA_P_WATERMARK_1); |
| 181 | writel(0x0, MDP_DMA_P_WATERMARK_2); |
Sachin Bhayare | 5e5f32a | 2015-10-07 11:47:19 +0530 | [diff] [blame] | 182 | |
| 183 | panic_config = mdp3_get_panic_lut_cfg(pinfo->xres); |
| 184 | writel((panic_config & 0xFFFF), MDP_PANIC_LUT0); |
| 185 | writel(((panic_config >> 16) & 0xFFFF) , MDP_PANIC_LUT1); |
| 186 | writel(((panic_config >> 32) & 0xFFFF), MDP_ROBUST_LUT); |
Sandeep Panda | 09fd978 | 2014-12-26 10:32:01 +0530 | [diff] [blame] | 187 | writel(0x1, MDP_PANIC_ROBUST_CTRL); |
Sachin Bhayare | 5e5f32a | 2015-10-07 11:47:19 +0530 | [diff] [blame] | 188 | dprintf(INFO, "Panic Lut0 %x Lut1 %x Robest %x\n", |
| 189 | (panic_config & 0xFFFF), ((panic_config >> 16) & 0xFFFF), |
| 190 | ((panic_config >> 32) & 0xFFFF)); |
Sandeep Panda | 09fd978 | 2014-12-26 10:32:01 +0530 | [diff] [blame] | 191 | |
Channagoud Kadabi | 10189fd | 2012-05-25 13:33:39 +0530 | [diff] [blame] | 192 | writel(0x03ffffff, MDP_INTR_ENABLE); |
| 193 | |
| 194 | // ------------- programming MDP_DMA_P_CONFIG --------------------- |
Sachin Bhayare | 0f15bea | 2017-02-16 12:58:58 +0530 | [diff] [blame] | 195 | writel(pack_pattern << 8 | 0x3f | (0 << 25)| (1 << 19) | (1 << 7) , |
| 196 | MDP_DMA_P_CONFIG); /* rgb888 */ |
Channagoud Kadabi | 10189fd | 2012-05-25 13:33:39 +0530 | [diff] [blame] | 197 | writel(0x00000000, MDP_DMA_P_OUT_XY); |
| 198 | writel(pinfo->yres << 16 | pinfo->xres, MDP_DMA_P_SIZE); |
Nirmal Abraham | bc36a0b | 2017-06-06 17:41:31 +0530 | [diff] [blame] | 199 | writel((uint32_t)fb->base, MDP_DMA_P_BUF_ADDR); |
Channagoud Kadabi | 10189fd | 2012-05-25 13:33:39 +0530 | [diff] [blame] | 200 | |
| 201 | writel(pinfo->xres * ystride, MDP_DMA_P_BUF_Y_STRIDE); |
| 202 | |
| 203 | writel(0x10, MDP_DSI_CMD_MODE_ID_MAP); |
| 204 | writel(0x11, MDP_DSI_CMD_MODE_TRIGGER_EN); |
Sachin Bhayare | 0f15bea | 2017-02-16 12:58:58 +0530 | [diff] [blame] | 205 | /* Enable Auto refresh */ |
| 206 | sync_cfg = (pinfo->yres - 1) << 21; |
| 207 | sync_cfg |= BIT(19); |
| 208 | |
| 209 | sync_cfg |= vsync_hz / (pinfo->yres * 60); |
| 210 | writel(sync_cfg, MDP_SYNC_CONFIG_0); |
| 211 | writel((BIT(28) | autorefresh_framenum), |
| 212 | MDP_AUTOREFRESH_CONFIG_P); |
Channagoud Kadabi | 10189fd | 2012-05-25 13:33:39 +0530 | [diff] [blame] | 213 | mdelay(10); |
| 214 | |
| 215 | return ret; |
| 216 | } |
| 217 | |
Aparna Mallavarapu | f712f5e | 2011-08-04 21:11:00 +0530 | [diff] [blame] | 218 | void mdp_disable(void) |
| 219 | { |
Channagoud Kadabi | f248846 | 2012-06-12 15:22:48 +0530 | [diff] [blame] | 220 | if (!target_cont_splash_screen()) |
| 221 | writel(0x00000000, MDP_DSI_VIDEO_EN); |
Aparna Mallavarapu | f712f5e | 2011-08-04 21:11:00 +0530 | [diff] [blame] | 222 | } |
| 223 | |
Channagoud Kadabi | 539ef72 | 2012-03-29 16:02:50 +0530 | [diff] [blame] | 224 | int mdp_dsi_video_off(void) |
Aparna Mallavarapu | f712f5e | 2011-08-04 21:11:00 +0530 | [diff] [blame] | 225 | { |
Channagoud Kadabi | f248846 | 2012-06-12 15:22:48 +0530 | [diff] [blame] | 226 | if (!target_cont_splash_screen()) { |
| 227 | mdp_disable(); |
| 228 | mdelay(60); |
Channagoud Kadabi | f248846 | 2012-06-12 15:22:48 +0530 | [diff] [blame] | 229 | } |
Padmanabhan Komanduru | fa4be75 | 2012-10-08 16:51:56 +0530 | [diff] [blame] | 230 | writel(0x00000000, MDP_INTR_ENABLE); |
| 231 | writel(0x01ffffff, MDP_INTR_CLEAR); |
Channagoud Kadabi | 539ef72 | 2012-03-29 16:02:50 +0530 | [diff] [blame] | 232 | return NO_ERROR; |
Aparna Mallavarapu | f712f5e | 2011-08-04 21:11:00 +0530 | [diff] [blame] | 233 | } |
Shashank Mittal | 4bfb2e3 | 2012-04-16 10:56:27 -0700 | [diff] [blame] | 234 | |
Channagoud Kadabi | 10189fd | 2012-05-25 13:33:39 +0530 | [diff] [blame] | 235 | int mdp_dsi_cmd_off(void) |
| 236 | { |
Channagoud Kadabi | f248846 | 2012-06-12 15:22:48 +0530 | [diff] [blame] | 237 | if (!target_cont_splash_screen()) { |
| 238 | mdp_dma_off(); |
| 239 | /* |
| 240 | * Allow sometime for the DMA channel to |
| 241 | * stop the data transfer |
| 242 | */ |
| 243 | mdelay(10); |
Channagoud Kadabi | f248846 | 2012-06-12 15:22:48 +0530 | [diff] [blame] | 244 | } |
Sachin Bhayare | 0f15bea | 2017-02-16 12:58:58 +0530 | [diff] [blame] | 245 | /* Disable Auto refresh */ |
| 246 | if (readl(MDP_AUTOREFRESH_CONFIG_P)) |
| 247 | writel(0, MDP_AUTOREFRESH_CONFIG_P); |
Padmanabhan Komanduru | fa4be75 | 2012-10-08 16:51:56 +0530 | [diff] [blame] | 248 | writel(0x00000000, MDP_INTR_ENABLE); |
| 249 | writel(0x01ffffff, MDP_INTR_CLEAR); |
Channagoud Kadabi | 10189fd | 2012-05-25 13:33:39 +0530 | [diff] [blame] | 250 | return NO_ERROR; |
| 251 | } |
| 252 | |
Shashank Mittal | 4bfb2e3 | 2012-04-16 10:56:27 -0700 | [diff] [blame] | 253 | void mdp_set_revision(int rev) |
| 254 | { |
| 255 | mdp_rev = rev; |
| 256 | } |
| 257 | |
| 258 | int mdp_get_revision(void) |
| 259 | { |
| 260 | return mdp_rev; |
| 261 | } |
Channagoud Kadabi | 539ef72 | 2012-03-29 16:02:50 +0530 | [diff] [blame] | 262 | |
Jayant Shekhar | 32397f9 | 2014-03-27 13:30:41 +0530 | [diff] [blame] | 263 | int mdp_dsi_video_on(struct msm_panel_info *pinfo) |
Channagoud Kadabi | 539ef72 | 2012-03-29 16:02:50 +0530 | [diff] [blame] | 264 | { |
| 265 | int ret = 0; |
| 266 | |
| 267 | writel(0x00000001, MDP_DSI_VIDEO_EN); |
| 268 | |
| 269 | return ret; |
| 270 | } |
Channagoud Kadabi | 10189fd | 2012-05-25 13:33:39 +0530 | [diff] [blame] | 271 | |
Jayant Shekhar | 32397f9 | 2014-03-27 13:30:41 +0530 | [diff] [blame] | 272 | int mdp_dma_on(struct msm_panel_info *pinfo) |
Channagoud Kadabi | 10189fd | 2012-05-25 13:33:39 +0530 | [diff] [blame] | 273 | { |
| 274 | int ret = 0; |
Xiaoming Zhou | 8d534dd | 2013-07-29 15:49:19 -0400 | [diff] [blame] | 275 | mdelay(100); |
Channagoud Kadabi | 10189fd | 2012-05-25 13:33:39 +0530 | [diff] [blame] | 276 | writel(0x00000001, MDP_DMA_P_START); |
| 277 | |
| 278 | return ret; |
| 279 | } |
| 280 | |
| 281 | int mdp_dma_off() |
| 282 | { |
| 283 | int ret = 0; |
| 284 | |
Channagoud Kadabi | f248846 | 2012-06-12 15:22:48 +0530 | [diff] [blame] | 285 | if (!target_cont_splash_screen()) |
| 286 | writel(0x00000000, MDP_DMA_P_START); |
Channagoud Kadabi | 10189fd | 2012-05-25 13:33:39 +0530 | [diff] [blame] | 287 | |
| 288 | return ret; |
| 289 | } |
Asaf Penso | 6c58a6b | 2013-07-14 19:57:29 +0300 | [diff] [blame] | 290 | |
| 291 | int mdp_edp_config(struct msm_panel_info *pinfo, struct fbcon_config *fb) |
| 292 | { |
| 293 | return NO_ERROR; |
| 294 | } |
| 295 | |
Jayant Shekhar | 32397f9 | 2014-03-27 13:30:41 +0530 | [diff] [blame] | 296 | int mdp_edp_on(struct msm_panel_info *pinfo) |
Asaf Penso | 6c58a6b | 2013-07-14 19:57:29 +0300 | [diff] [blame] | 297 | { |
| 298 | return NO_ERROR; |
| 299 | } |
| 300 | |
| 301 | int mdp_edp_off(void) |
| 302 | { |
| 303 | return NO_ERROR; |
| 304 | } |
Ajay Singh Parmar | 63c1850 | 2014-07-23 23:37:19 -0700 | [diff] [blame] | 305 | |
Ajay Singh Parmar | 243d82b | 2014-07-23 23:01:44 -0700 | [diff] [blame] | 306 | int mdss_hdmi_config(struct msm_panel_info *pinfo, struct fbcon_config *fb) |
Ajay Singh Parmar | 63c1850 | 2014-07-23 23:37:19 -0700 | [diff] [blame] | 307 | { |
| 308 | return NO_ERROR; |
| 309 | } |
| 310 | |
Veera Sundaram Sankaran | db0b2bf | 2014-12-16 18:09:27 -0800 | [diff] [blame] | 311 | int mdss_hdmi_on(struct msm_panel_info *pinfo) |
Ajay Singh Parmar | 63c1850 | 2014-07-23 23:37:19 -0700 | [diff] [blame] | 312 | { |
| 313 | return NO_ERROR; |
| 314 | } |
| 315 | |
Ajay Singh Parmar | 243d82b | 2014-07-23 23:01:44 -0700 | [diff] [blame] | 316 | int mdss_hdmi_off(void) |
Ajay Singh Parmar | 63c1850 | 2014-07-23 23:37:19 -0700 | [diff] [blame] | 317 | { |
| 318 | return NO_ERROR; |
| 319 | } |