| Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1 | /* Copyright (c) 2008-2011, Code Aurora Forum. All rights reserved. | 
|  | 2 | * | 
|  | 3 | * This program is free software; you can redistribute it and/or modify | 
|  | 4 | * it under the terms of the GNU General Public License version 2 and | 
|  | 5 | * only version 2 as published by the Free Software Foundation. | 
|  | 6 | * | 
|  | 7 | * This program is distributed in the hope that it will be useful, | 
|  | 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 
|  | 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | 
|  | 10 | * GNU General Public License for more details. | 
|  | 11 | * | 
|  | 12 | */ | 
|  | 13 |  | 
|  | 14 | #ifndef MDP_H | 
|  | 15 | #define MDP_H | 
|  | 16 |  | 
|  | 17 | #include <linux/kernel.h> | 
|  | 18 | #include <linux/sched.h> | 
|  | 19 | #include <linux/time.h> | 
|  | 20 | #include <linux/init.h> | 
|  | 21 | #include <linux/interrupt.h> | 
|  | 22 | #include <linux/fb.h> | 
|  | 23 | #include <linux/hrtimer.h> | 
|  | 24 | #include <linux/msm_mdp.h> | 
|  | 25 |  | 
|  | 26 | #include <mach/hardware.h> | 
|  | 27 |  | 
|  | 28 | #ifdef CONFIG_MSM_BUS_SCALING | 
|  | 29 | #include <mach/msm_bus.h> | 
|  | 30 | #include <mach/msm_bus_board.h> | 
|  | 31 | #endif | 
|  | 32 |  | 
|  | 33 | #include <linux/io.h> | 
|  | 34 |  | 
|  | 35 | #include <asm/system.h> | 
|  | 36 | #include <asm/mach-types.h> | 
|  | 37 |  | 
|  | 38 | #include "msm_fb_panel.h" | 
|  | 39 |  | 
|  | 40 | extern uint32 mdp_hw_revision; | 
|  | 41 | extern ulong mdp4_display_intf; | 
|  | 42 | extern spinlock_t mdp_spin_lock; | 
|  | 43 | extern int mdp_rev; | 
|  | 44 |  | 
|  | 45 | #define MDP4_REVISION_V1		0 | 
|  | 46 | #define MDP4_REVISION_V2		1 | 
|  | 47 | #define MDP4_REVISION_V2_1	2 | 
|  | 48 | #define MDP4_REVISION_NONE	0xffffffff | 
|  | 49 |  | 
|  | 50 | #ifdef BIT | 
|  | 51 | #undef BIT | 
|  | 52 | #endif | 
|  | 53 |  | 
|  | 54 | #define BIT(x)  (1<<(x)) | 
|  | 55 |  | 
|  | 56 | #define MDPOP_NOP               0 | 
|  | 57 | #define MDPOP_LR                BIT(0)	/* left to right flip */ | 
|  | 58 | #define MDPOP_UD                BIT(1)	/* up and down flip */ | 
|  | 59 | #define MDPOP_ROT90             BIT(2)	/* rotate image to 90 degree */ | 
|  | 60 | #define MDPOP_ROT180            (MDPOP_UD|MDPOP_LR) | 
|  | 61 | #define MDPOP_ROT270            (MDPOP_ROT90|MDPOP_UD|MDPOP_LR) | 
|  | 62 | #define MDPOP_ASCALE            BIT(7) | 
|  | 63 | #define MDPOP_ALPHAB            BIT(8)	/* enable alpha blending */ | 
|  | 64 | #define MDPOP_TRANSP            BIT(9)	/* enable transparency */ | 
|  | 65 | #define MDPOP_DITHER            BIT(10)	/* enable dither */ | 
|  | 66 | #define MDPOP_SHARPENING	BIT(11) /* enable sharpening */ | 
|  | 67 | #define MDPOP_BLUR		BIT(12) /* enable blur */ | 
|  | 68 | #define MDPOP_FG_PM_ALPHA       BIT(13) | 
|  | 69 |  | 
|  | 70 | struct mdp_table_entry { | 
|  | 71 | uint32_t reg; | 
|  | 72 | uint32_t val; | 
|  | 73 | }; | 
|  | 74 |  | 
|  | 75 | extern struct mdp_ccs mdp_ccs_yuv2rgb ; | 
|  | 76 | extern struct mdp_ccs mdp_ccs_rgb2yuv ; | 
|  | 77 |  | 
|  | 78 | /* | 
|  | 79 | * MDP Image Structure | 
|  | 80 | */ | 
|  | 81 | typedef struct mdpImg_ { | 
|  | 82 | uint32 imgType;		/* Image type */ | 
|  | 83 | uint32 *bmy_addr;	/* bitmap or y addr */ | 
|  | 84 | uint32 *cbcr_addr;	/* cbcr addr */ | 
|  | 85 | uint32 width;		/* image width */ | 
|  | 86 | uint32 mdpOp;		/* image opertion (rotation,flip up/down, alpha/tp) */ | 
|  | 87 | uint32 tpVal;		/* transparency color */ | 
|  | 88 | uint32 alpha;		/* alpha percentage 0%(0x0) ~ 100%(0x100) */ | 
|  | 89 | int    sp_value;        /* sharpening strength */ | 
|  | 90 | } MDPIMG; | 
|  | 91 |  | 
|  | 92 | #define MDP_OUTP(addr, data) outpdw((addr), (data)) | 
|  | 93 |  | 
|  | 94 | #define MDP_BASE msm_mdp_base | 
|  | 95 |  | 
|  | 96 | typedef enum { | 
|  | 97 | MDP_BC_SCALE_POINT2_POINT4, | 
|  | 98 | MDP_BC_SCALE_POINT4_POINT6, | 
|  | 99 | MDP_BC_SCALE_POINT6_POINT8, | 
|  | 100 | MDP_BC_SCALE_POINT8_1, | 
|  | 101 | MDP_BC_SCALE_UP, | 
|  | 102 | MDP_PR_SCALE_POINT2_POINT4, | 
|  | 103 | MDP_PR_SCALE_POINT4_POINT6, | 
|  | 104 | MDP_PR_SCALE_POINT6_POINT8, | 
|  | 105 | MDP_PR_SCALE_POINT8_1, | 
|  | 106 | MDP_PR_SCALE_UP, | 
|  | 107 | MDP_SCALE_BLUR, | 
|  | 108 | MDP_INIT_SCALE | 
|  | 109 | } MDP_SCALE_MODE; | 
|  | 110 |  | 
|  | 111 | typedef enum { | 
|  | 112 | MDP_BLOCK_POWER_OFF, | 
|  | 113 | MDP_BLOCK_POWER_ON | 
|  | 114 | } MDP_BLOCK_POWER_STATE; | 
|  | 115 |  | 
|  | 116 | typedef enum { | 
|  | 117 | MDP_CMD_BLOCK, | 
|  | 118 | MDP_OVERLAY0_BLOCK, | 
|  | 119 | MDP_MASTER_BLOCK, | 
|  | 120 | MDP_PPP_BLOCK, | 
|  | 121 | MDP_DMA2_BLOCK, | 
|  | 122 | MDP_DMA3_BLOCK, | 
|  | 123 | MDP_DMA_S_BLOCK, | 
|  | 124 | MDP_DMA_E_BLOCK, | 
|  | 125 | MDP_OVERLAY1_BLOCK, | 
|  | 126 | MDP_MAX_BLOCK | 
|  | 127 | } MDP_BLOCK_TYPE; | 
|  | 128 |  | 
|  | 129 | /* Let's keep Q Factor power of 2 for optimization */ | 
|  | 130 | #define MDP_SCALE_Q_FACTOR 512 | 
|  | 131 |  | 
|  | 132 | #ifdef CONFIG_FB_MSM_MDP31 | 
|  | 133 | #define MDP_MAX_X_SCALE_FACTOR (MDP_SCALE_Q_FACTOR*8) | 
|  | 134 | #define MDP_MIN_X_SCALE_FACTOR (MDP_SCALE_Q_FACTOR/8) | 
|  | 135 | #define MDP_MAX_Y_SCALE_FACTOR (MDP_SCALE_Q_FACTOR*8) | 
|  | 136 | #define MDP_MIN_Y_SCALE_FACTOR (MDP_SCALE_Q_FACTOR/8) | 
|  | 137 | #else | 
|  | 138 | #define MDP_MAX_X_SCALE_FACTOR (MDP_SCALE_Q_FACTOR*4) | 
|  | 139 | #define MDP_MIN_X_SCALE_FACTOR (MDP_SCALE_Q_FACTOR/4) | 
|  | 140 | #define MDP_MAX_Y_SCALE_FACTOR (MDP_SCALE_Q_FACTOR*4) | 
|  | 141 | #define MDP_MIN_Y_SCALE_FACTOR (MDP_SCALE_Q_FACTOR/4) | 
|  | 142 | #endif | 
|  | 143 |  | 
|  | 144 | /* SHIM Q Factor */ | 
|  | 145 | #define PHI_Q_FACTOR          29 | 
|  | 146 | #define PQF_PLUS_5            (PHI_Q_FACTOR + 5)	/* due to 32 phases */ | 
|  | 147 | #define PQF_PLUS_4            (PHI_Q_FACTOR + 4) | 
|  | 148 | #define PQF_PLUS_2            (PHI_Q_FACTOR + 2)	/* to get 4.0 */ | 
|  | 149 | #define PQF_MINUS_2           (PHI_Q_FACTOR - 2)	/* to get 0.25 */ | 
|  | 150 | #define PQF_PLUS_5_PLUS_2     (PQF_PLUS_5 + 2) | 
|  | 151 | #define PQF_PLUS_5_MINUS_2    (PQF_PLUS_5 - 2) | 
|  | 152 |  | 
|  | 153 | #define MDP_CONVTP(tpVal) (((tpVal&0xF800)<<8)|((tpVal&0x7E0)<<5)|((tpVal&0x1F)<<3)) | 
|  | 154 |  | 
|  | 155 | #define MDPOP_ROTATION (MDPOP_ROT90|MDPOP_LR|MDPOP_UD) | 
|  | 156 | #define MDP_CHKBIT(val, bit) ((bit) == ((val) & (bit))) | 
|  | 157 |  | 
|  | 158 | /* overlay interface API defines */ | 
|  | 159 | typedef enum { | 
|  | 160 | MORE_IBUF, | 
|  | 161 | FINAL_IBUF, | 
|  | 162 | COMPLETE_IBUF | 
|  | 163 | } MDP_IBUF_STATE; | 
|  | 164 |  | 
|  | 165 | struct mdp_dirty_region { | 
|  | 166 | __u32 xoffset;		/* source origin in the x-axis */ | 
|  | 167 | __u32 yoffset;		/* source origin in the y-axis */ | 
|  | 168 | __u32 width;		/* number of pixels in the x-axis */ | 
|  | 169 | __u32 height;		/* number of pixels in the y-axis */ | 
|  | 170 | }; | 
|  | 171 |  | 
|  | 172 | /* | 
|  | 173 | * MDP extended data types | 
|  | 174 | */ | 
|  | 175 | typedef struct mdp_roi_s { | 
|  | 176 | uint32 x; | 
|  | 177 | uint32 y; | 
|  | 178 | uint32 width; | 
|  | 179 | uint32 height; | 
|  | 180 | int32 lcd_x; | 
|  | 181 | int32 lcd_y; | 
|  | 182 | uint32 dst_width; | 
|  | 183 | uint32 dst_height; | 
|  | 184 | } MDP_ROI; | 
|  | 185 |  | 
|  | 186 | typedef struct mdp_ibuf_s { | 
|  | 187 | uint8 *buf; | 
|  | 188 | uint32 bpp; | 
|  | 189 | uint32 ibuf_type; | 
|  | 190 | uint32 ibuf_width; | 
|  | 191 | uint32 ibuf_height; | 
|  | 192 |  | 
|  | 193 | MDP_ROI roi; | 
|  | 194 | MDPIMG mdpImg; | 
|  | 195 |  | 
|  | 196 | int32 dma_x; | 
|  | 197 | int32 dma_y; | 
|  | 198 | uint32 dma_w; | 
|  | 199 | uint32 dma_h; | 
|  | 200 |  | 
|  | 201 | uint32 vsync_enable; | 
|  | 202 | } MDPIBUF; | 
|  | 203 |  | 
|  | 204 | struct mdp_dma_data { | 
|  | 205 | boolean busy; | 
|  | 206 | boolean dmap_busy; | 
|  | 207 | boolean waiting; | 
|  | 208 | struct mutex ov_mutex; | 
|  | 209 | struct semaphore mutex; | 
|  | 210 | struct completion comp; | 
|  | 211 | struct completion dmap_comp; | 
|  | 212 | }; | 
|  | 213 |  | 
|  | 214 | #define MDP_CMD_DEBUG_ACCESS_BASE   (MDP_BASE+0x10000) | 
|  | 215 |  | 
|  | 216 | #define MDP_DMA2_TERM 0x1 | 
|  | 217 | #define MDP_DMA3_TERM 0x2 | 
|  | 218 | #define MDP_PPP_TERM 0x4 | 
|  | 219 | #define MDP_DMA_S_TERM 0x8 | 
|  | 220 | #define MDP_DMA_E_TERM 0x10 | 
|  | 221 | #ifdef CONFIG_FB_MSM_MDP40 | 
|  | 222 | #define MDP_OVERLAY0_TERM 0x20 | 
|  | 223 | #define MDP_OVERLAY1_TERM 0x40 | 
|  | 224 | #endif | 
|  | 225 | #define MDP_HISTOGRAM_TERM 0x80 | 
|  | 226 |  | 
|  | 227 | #define ACTIVE_START_X_EN BIT(31) | 
|  | 228 | #define ACTIVE_START_Y_EN BIT(31) | 
|  | 229 | #define ACTIVE_HIGH 0 | 
|  | 230 | #define ACTIVE_LOW 1 | 
|  | 231 | #define MDP_DMA_S_DONE  BIT(2) | 
|  | 232 | #define MDP_DMA_E_DONE  BIT(3) | 
|  | 233 | #define LCDC_FRAME_START    BIT(15) | 
|  | 234 | #define LCDC_UNDERFLOW      BIT(16) | 
|  | 235 |  | 
|  | 236 | #ifdef CONFIG_FB_MSM_MDP22 | 
|  | 237 | #define MDP_DMA_P_DONE 	BIT(2) | 
|  | 238 | #else | 
|  | 239 | #define MDP_DMA_P_DONE 	BIT(14) | 
|  | 240 | #endif | 
|  | 241 |  | 
|  | 242 | #define MDP_PPP_DONE 				BIT(0) | 
|  | 243 | #define TV_OUT_DMA3_DONE    BIT(6) | 
|  | 244 | #define TV_ENC_UNDERRUN     BIT(7) | 
|  | 245 | #define TV_OUT_DMA3_START   BIT(13) | 
|  | 246 | #define MDP_HIST_DONE       BIT(20) | 
|  | 247 |  | 
| Carl Vanderlip | 13f48ed | 2011-10-27 13:44:31 -0700 | [diff] [blame^] | 248 | /* histogram interrupts */ | 
|  | 249 | #define INTR_HIST_DONE			BIT(1) | 
|  | 250 | #define INTR_HIST_RESET_SEQ_DONE	BIT(0) | 
|  | 251 |  | 
| Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 252 | #ifdef CONFIG_FB_MSM_MDP22 | 
|  | 253 | #define MDP_ANY_INTR_MASK (MDP_PPP_DONE| \ | 
|  | 254 | MDP_DMA_P_DONE| \ | 
|  | 255 | TV_ENC_UNDERRUN) | 
|  | 256 | #else | 
|  | 257 | #define MDP_ANY_INTR_MASK (MDP_PPP_DONE| \ | 
|  | 258 | MDP_DMA_P_DONE| \ | 
|  | 259 | MDP_DMA_S_DONE| \ | 
|  | 260 | MDP_DMA_E_DONE| \ | 
|  | 261 | LCDC_UNDERFLOW| \ | 
|  | 262 | MDP_HIST_DONE| \ | 
|  | 263 | TV_ENC_UNDERRUN) | 
|  | 264 | #endif | 
|  | 265 |  | 
|  | 266 | #define MDP_TOP_LUMA       16 | 
|  | 267 | #define MDP_TOP_CHROMA     0 | 
|  | 268 | #define MDP_BOTTOM_LUMA    19 | 
|  | 269 | #define MDP_BOTTOM_CHROMA  3 | 
|  | 270 | #define MDP_LEFT_LUMA      22 | 
|  | 271 | #define MDP_LEFT_CHROMA    6 | 
|  | 272 | #define MDP_RIGHT_LUMA     25 | 
|  | 273 | #define MDP_RIGHT_CHROMA   9 | 
|  | 274 |  | 
|  | 275 | #define CLR_G 0x0 | 
|  | 276 | #define CLR_B 0x1 | 
|  | 277 | #define CLR_R 0x2 | 
|  | 278 | #define CLR_ALPHA 0x3 | 
|  | 279 |  | 
|  | 280 | #define CLR_Y  CLR_G | 
|  | 281 | #define CLR_CB CLR_B | 
|  | 282 | #define CLR_CR CLR_R | 
|  | 283 |  | 
|  | 284 | /* from lsb to msb */ | 
|  | 285 | #define MDP_GET_PACK_PATTERN(a,x,y,z,bit) (((a)<<(bit*3))|((x)<<(bit*2))|((y)<<bit)|(z)) | 
|  | 286 |  | 
|  | 287 | /* | 
|  | 288 | * 0x0000 0x0004 0x0008 MDP sync config | 
|  | 289 | */ | 
|  | 290 | #ifdef CONFIG_FB_MSM_MDP22 | 
|  | 291 | #define MDP_SYNCFG_HGT_LOC 22 | 
|  | 292 | #define MDP_SYNCFG_VSYNC_EXT_EN BIT(21) | 
|  | 293 | #define MDP_SYNCFG_VSYNC_INT_EN BIT(20) | 
|  | 294 | #else | 
|  | 295 | #define MDP_SYNCFG_HGT_LOC 21 | 
|  | 296 | #define MDP_SYNCFG_VSYNC_EXT_EN BIT(20) | 
|  | 297 | #define MDP_SYNCFG_VSYNC_INT_EN BIT(19) | 
|  | 298 | #define MDP_HW_VSYNC | 
|  | 299 | #endif | 
|  | 300 |  | 
|  | 301 | /* | 
|  | 302 | * 0x0018 MDP VSYNC THREASH | 
|  | 303 | */ | 
|  | 304 | #define MDP_PRIM_BELOW_LOC 0 | 
|  | 305 | #define MDP_PRIM_ABOVE_LOC 8 | 
|  | 306 |  | 
|  | 307 | /* | 
|  | 308 | * MDP_PRIMARY_VSYNC_OUT_CTRL | 
|  | 309 | * 0x0080,84,88 internal vsync pulse config | 
|  | 310 | */ | 
|  | 311 | #define VSYNC_PULSE_EN BIT(31) | 
|  | 312 | #define VSYNC_PULSE_INV BIT(30) | 
|  | 313 |  | 
|  | 314 | /* | 
|  | 315 | * 0x008c MDP VSYNC CONTROL | 
|  | 316 | */ | 
|  | 317 | #define DISP0_VSYNC_MAP_VSYNC0 0 | 
|  | 318 | #define DISP0_VSYNC_MAP_VSYNC1 BIT(0) | 
|  | 319 | #define DISP0_VSYNC_MAP_VSYNC2 BIT(0)|BIT(1) | 
|  | 320 |  | 
|  | 321 | #define DISP1_VSYNC_MAP_VSYNC0 0 | 
|  | 322 | #define DISP1_VSYNC_MAP_VSYNC1 BIT(2) | 
|  | 323 | #define DISP1_VSYNC_MAP_VSYNC2 BIT(2)|BIT(3) | 
|  | 324 |  | 
|  | 325 | #define PRIMARY_LCD_SYNC_EN BIT(4) | 
|  | 326 | #define PRIMARY_LCD_SYNC_DISABLE 0 | 
|  | 327 |  | 
|  | 328 | #define SECONDARY_LCD_SYNC_EN BIT(5) | 
|  | 329 | #define SECONDARY_LCD_SYNC_DISABLE 0 | 
|  | 330 |  | 
|  | 331 | #define EXTERNAL_LCD_SYNC_EN BIT(6) | 
|  | 332 | #define EXTERNAL_LCD_SYNC_DISABLE 0 | 
|  | 333 |  | 
|  | 334 | /* | 
|  | 335 | * 0x101f0 MDP VSYNC Threshold | 
|  | 336 | */ | 
|  | 337 | #define VSYNC_THRESHOLD_ABOVE_LOC 0 | 
|  | 338 | #define VSYNC_THRESHOLD_BELOW_LOC 16 | 
|  | 339 | #define VSYNC_ANTI_TEAR_EN BIT(31) | 
|  | 340 |  | 
|  | 341 | /* | 
|  | 342 | * 0x10004 command config | 
|  | 343 | */ | 
|  | 344 | #define MDP_CMD_DBGBUS_EN BIT(0) | 
|  | 345 |  | 
|  | 346 | /* | 
|  | 347 | * 0x10124 or 0x101d4PPP source config | 
|  | 348 | */ | 
|  | 349 | #define PPP_SRC_C0G_8BITS (BIT(1)|BIT(0)) | 
|  | 350 | #define PPP_SRC_C1B_8BITS (BIT(3)|BIT(2)) | 
|  | 351 | #define PPP_SRC_C2R_8BITS (BIT(5)|BIT(4)) | 
|  | 352 | #define PPP_SRC_C3A_8BITS (BIT(7)|BIT(6)) | 
|  | 353 |  | 
|  | 354 | #define PPP_SRC_C0G_6BITS BIT(1) | 
|  | 355 | #define PPP_SRC_C1B_6BITS BIT(3) | 
|  | 356 | #define PPP_SRC_C2R_6BITS BIT(5) | 
|  | 357 |  | 
|  | 358 | #define PPP_SRC_C0G_5BITS BIT(0) | 
|  | 359 | #define PPP_SRC_C1B_5BITS BIT(2) | 
|  | 360 | #define PPP_SRC_C2R_5BITS BIT(4) | 
|  | 361 |  | 
|  | 362 | #define PPP_SRC_C3_ALPHA_EN BIT(8) | 
|  | 363 |  | 
|  | 364 | #define PPP_SRC_BPP_INTERLVD_1BYTES 0 | 
|  | 365 | #define PPP_SRC_BPP_INTERLVD_2BYTES BIT(9) | 
|  | 366 | #define PPP_SRC_BPP_INTERLVD_3BYTES BIT(10) | 
|  | 367 | #define PPP_SRC_BPP_INTERLVD_4BYTES (BIT(10)|BIT(9)) | 
|  | 368 |  | 
|  | 369 | #define PPP_SRC_BPP_ROI_ODD_X BIT(11) | 
|  | 370 | #define PPP_SRC_BPP_ROI_ODD_Y BIT(12) | 
|  | 371 | #define PPP_SRC_INTERLVD_2COMPONENTS BIT(13) | 
|  | 372 | #define PPP_SRC_INTERLVD_3COMPONENTS BIT(14) | 
|  | 373 | #define PPP_SRC_INTERLVD_4COMPONENTS (BIT(14)|BIT(13)) | 
|  | 374 |  | 
|  | 375 | /* | 
|  | 376 | * RGB666 unpack format | 
|  | 377 | * TIGHT means R6+G6+B6 together | 
|  | 378 | * LOOSE means R6+2 +G6+2+ B6+2 (with MSB) | 
|  | 379 | * or 2+R6 +2+G6 +2+B6 (with LSB) | 
|  | 380 | */ | 
|  | 381 | #define PPP_SRC_UNPACK_TIGHT BIT(17) | 
|  | 382 | #define PPP_SRC_UNPACK_LOOSE 0 | 
|  | 383 | #define PPP_SRC_UNPACK_ALIGN_LSB 0 | 
|  | 384 | #define PPP_SRC_UNPACK_ALIGN_MSB BIT(18) | 
|  | 385 |  | 
|  | 386 | #define PPP_SRC_FETCH_PLANES_INTERLVD 0 | 
|  | 387 | #define PPP_SRC_FETCH_PLANES_PSEUDOPLNR BIT(20) | 
|  | 388 |  | 
|  | 389 | #define PPP_SRC_WMV9_MODE BIT(21)	/* window media version 9 */ | 
|  | 390 |  | 
|  | 391 | /* | 
|  | 392 | * 0x10138 PPP operation config | 
|  | 393 | */ | 
|  | 394 | #define PPP_OP_SCALE_X_ON BIT(0) | 
|  | 395 | #define PPP_OP_SCALE_Y_ON BIT(1) | 
|  | 396 |  | 
|  | 397 | #define PPP_OP_CONVERT_RGB2YCBCR 0 | 
|  | 398 | #define PPP_OP_CONVERT_YCBCR2RGB BIT(2) | 
|  | 399 | #define PPP_OP_CONVERT_ON BIT(3) | 
|  | 400 |  | 
|  | 401 | #define PPP_OP_CONVERT_MATRIX_PRIMARY 0 | 
|  | 402 | #define PPP_OP_CONVERT_MATRIX_SECONDARY BIT(4) | 
|  | 403 |  | 
|  | 404 | #define PPP_OP_LUT_C0_ON BIT(5) | 
|  | 405 | #define PPP_OP_LUT_C1_ON BIT(6) | 
|  | 406 | #define PPP_OP_LUT_C2_ON BIT(7) | 
|  | 407 |  | 
|  | 408 | /* rotate or blend enable */ | 
|  | 409 | #define PPP_OP_ROT_ON BIT(8) | 
|  | 410 |  | 
|  | 411 | #define PPP_OP_ROT_90 BIT(9) | 
|  | 412 | #define PPP_OP_FLIP_LR BIT(10) | 
|  | 413 | #define PPP_OP_FLIP_UD BIT(11) | 
|  | 414 |  | 
|  | 415 | #define PPP_OP_BLEND_ON BIT(12) | 
|  | 416 |  | 
|  | 417 | #define PPP_OP_BLEND_SRCPIXEL_ALPHA 0 | 
|  | 418 | #define PPP_OP_BLEND_DSTPIXEL_ALPHA BIT(13) | 
|  | 419 | #define PPP_OP_BLEND_CONSTANT_ALPHA BIT(14) | 
|  | 420 | #define PPP_OP_BLEND_SRCPIXEL_TRANSP (BIT(13)|BIT(14)) | 
|  | 421 |  | 
|  | 422 | #define PPP_OP_BLEND_ALPHA_BLEND_NORMAL 0 | 
|  | 423 | #define PPP_OP_BLEND_ALPHA_BLEND_REVERSE BIT(15) | 
|  | 424 |  | 
|  | 425 | #define PPP_OP_DITHER_EN BIT(16) | 
|  | 426 |  | 
|  | 427 | #define PPP_OP_COLOR_SPACE_RGB 0 | 
|  | 428 | #define PPP_OP_COLOR_SPACE_YCBCR BIT(17) | 
|  | 429 |  | 
|  | 430 | #define PPP_OP_SRC_CHROMA_RGB 0 | 
|  | 431 | #define PPP_OP_SRC_CHROMA_H2V1 BIT(18) | 
|  | 432 | #define PPP_OP_SRC_CHROMA_H1V2 BIT(19) | 
|  | 433 | #define PPP_OP_SRC_CHROMA_420 (BIT(18)|BIT(19)) | 
|  | 434 | #define PPP_OP_SRC_CHROMA_COSITE 0 | 
|  | 435 | #define PPP_OP_SRC_CHROMA_OFFSITE BIT(20) | 
|  | 436 |  | 
|  | 437 | #define PPP_OP_DST_CHROMA_RGB 0 | 
|  | 438 | #define PPP_OP_DST_CHROMA_H2V1 BIT(21) | 
|  | 439 | #define PPP_OP_DST_CHROMA_H1V2 BIT(22) | 
|  | 440 | #define PPP_OP_DST_CHROMA_420 (BIT(21)|BIT(22)) | 
|  | 441 | #define PPP_OP_DST_CHROMA_COSITE 0 | 
|  | 442 | #define PPP_OP_DST_CHROMA_OFFSITE BIT(23) | 
|  | 443 |  | 
|  | 444 | #define PPP_BLEND_CALPHA_TRNASP BIT(24) | 
|  | 445 |  | 
|  | 446 | #define PPP_OP_BG_CHROMA_RGB 0 | 
|  | 447 | #define PPP_OP_BG_CHROMA_H2V1 BIT(25) | 
|  | 448 | #define PPP_OP_BG_CHROMA_H1V2 BIT(26) | 
|  | 449 | #define PPP_OP_BG_CHROMA_420 BIT(25)|BIT(26) | 
|  | 450 | #define PPP_OP_BG_CHROMA_SITE_COSITE 0 | 
|  | 451 | #define PPP_OP_BG_CHROMA_SITE_OFFSITE BIT(27) | 
|  | 452 | #define PPP_OP_DEINT_EN BIT(28) | 
|  | 453 |  | 
|  | 454 | #define PPP_BLEND_BG_USE_ALPHA_SEL      (1 << 0) | 
|  | 455 | #define PPP_BLEND_BG_ALPHA_REVERSE      (1 << 3) | 
|  | 456 | #define PPP_BLEND_BG_SRCPIXEL_ALPHA     (0 << 1) | 
|  | 457 | #define PPP_BLEND_BG_DSTPIXEL_ALPHA     (1 << 1) | 
|  | 458 | #define PPP_BLEND_BG_CONSTANT_ALPHA     (2 << 1) | 
|  | 459 | #define PPP_BLEND_BG_CONST_ALPHA_VAL(x) ((x) << 24) | 
|  | 460 |  | 
|  | 461 | #define PPP_OP_DST_RGB 0 | 
|  | 462 | #define PPP_OP_DST_YCBCR BIT(30) | 
|  | 463 | /* | 
|  | 464 | * 0x10150 PPP destination config | 
|  | 465 | */ | 
|  | 466 | #define PPP_DST_C0G_8BIT (BIT(0)|BIT(1)) | 
|  | 467 | #define PPP_DST_C1B_8BIT (BIT(3)|BIT(2)) | 
|  | 468 | #define PPP_DST_C2R_8BIT (BIT(5)|BIT(4)) | 
|  | 469 | #define PPP_DST_C3A_8BIT (BIT(7)|BIT(6)) | 
|  | 470 |  | 
|  | 471 | #define PPP_DST_C0G_6BIT BIT(1) | 
|  | 472 | #define PPP_DST_C1B_6BIT BIT(3) | 
|  | 473 | #define PPP_DST_C2R_6BIT BIT(5) | 
|  | 474 |  | 
|  | 475 | #define PPP_DST_C0G_5BIT BIT(0) | 
|  | 476 | #define PPP_DST_C1B_5BIT BIT(2) | 
|  | 477 | #define PPP_DST_C2R_5BIT BIT(4) | 
|  | 478 |  | 
|  | 479 | #define PPP_DST_C3A_8BIT (BIT(7)|BIT(6)) | 
|  | 480 | #define PPP_DST_C3ALPHA_EN BIT(8) | 
|  | 481 |  | 
|  | 482 | #define PPP_DST_PACKET_CNT_INTERLVD_2ELEM BIT(9) | 
|  | 483 | #define PPP_DST_PACKET_CNT_INTERLVD_3ELEM BIT(10) | 
|  | 484 | #define PPP_DST_PACKET_CNT_INTERLVD_4ELEM (BIT(10)|BIT(9)) | 
|  | 485 | #define PPP_DST_PACKET_CNT_INTERLVD_6ELEM (BIT(11)|BIT(9)) | 
|  | 486 |  | 
|  | 487 | #define PPP_DST_PACK_LOOSE 0 | 
|  | 488 | #define PPP_DST_PACK_TIGHT BIT(13) | 
|  | 489 | #define PPP_DST_PACK_ALIGN_LSB 0 | 
|  | 490 | #define PPP_DST_PACK_ALIGN_MSB BIT(14) | 
|  | 491 |  | 
|  | 492 | #define PPP_DST_OUT_SEL_AXI 0 | 
|  | 493 | #define PPP_DST_OUT_SEL_MDDI BIT(15) | 
|  | 494 |  | 
|  | 495 | #define PPP_DST_BPP_2BYTES BIT(16) | 
|  | 496 | #define PPP_DST_BPP_3BYTES BIT(17) | 
|  | 497 | #define PPP_DST_BPP_4BYTES (BIT(17)|BIT(16)) | 
|  | 498 |  | 
|  | 499 | #define PPP_DST_PLANE_INTERLVD 0 | 
|  | 500 | #define PPP_DST_PLANE_PLANAR BIT(18) | 
|  | 501 | #define PPP_DST_PLANE_PSEUDOPLN BIT(19) | 
|  | 502 |  | 
|  | 503 | #define PPP_DST_TO_TV BIT(20) | 
|  | 504 |  | 
|  | 505 | #define PPP_DST_MDDI_PRIMARY 0 | 
|  | 506 | #define PPP_DST_MDDI_SECONDARY BIT(21) | 
|  | 507 | #define PPP_DST_MDDI_EXTERNAL BIT(22) | 
|  | 508 |  | 
|  | 509 | /* | 
|  | 510 | * 0x10180 DMA config | 
|  | 511 | */ | 
|  | 512 | #define DMA_DSTC0G_8BITS (BIT(1)|BIT(0)) | 
|  | 513 | #define DMA_DSTC1B_8BITS (BIT(3)|BIT(2)) | 
|  | 514 | #define DMA_DSTC2R_8BITS (BIT(5)|BIT(4)) | 
|  | 515 |  | 
|  | 516 | #define DMA_DSTC0G_6BITS BIT(1) | 
|  | 517 | #define DMA_DSTC1B_6BITS BIT(3) | 
|  | 518 | #define DMA_DSTC2R_6BITS BIT(5) | 
|  | 519 |  | 
|  | 520 | #define DMA_DSTC0G_5BITS BIT(0) | 
|  | 521 | #define DMA_DSTC1B_5BITS BIT(2) | 
|  | 522 | #define DMA_DSTC2R_5BITS BIT(4) | 
|  | 523 |  | 
|  | 524 | #define DMA_PACK_TIGHT                      BIT(6) | 
|  | 525 | #define DMA_PACK_LOOSE                      0 | 
|  | 526 | #define DMA_PACK_ALIGN_LSB                  0 | 
|  | 527 | /* | 
|  | 528 | * use DMA_PACK_ALIGN_MSB if the upper 6 bits from 8 bits output | 
|  | 529 | * from LCDC block maps into 6 pins out to the panel | 
|  | 530 | */ | 
|  | 531 | #define DMA_PACK_ALIGN_MSB                  BIT(7) | 
|  | 532 | #define DMA_PACK_PATTERN_RGB \ | 
|  | 533 | (MDP_GET_PACK_PATTERN(0, CLR_R, CLR_G, CLR_B, 2)<<8) | 
|  | 534 | #define DMA_PACK_PATTERN_BGR \ | 
|  | 535 | (MDP_GET_PACK_PATTERN(0, CLR_B, CLR_G, CLR_R, 2)<<8) | 
|  | 536 | #define DMA_OUT_SEL_AHB                     0 | 
|  | 537 | #define DMA_OUT_SEL_LCDC                    BIT(20) | 
|  | 538 | #define DMA_IBUF_FORMAT_RGB888              0 | 
|  | 539 | #define DMA_IBUF_FORMAT_xRGB8888_OR_ARGB8888  BIT(26) | 
|  | 540 |  | 
|  | 541 | #ifdef CONFIG_FB_MSM_MDP303 | 
|  | 542 | #define DMA_OUT_SEL_DSI_CMD                  BIT(19) | 
|  | 543 | #define DMA_OUT_SEL_DSI_VIDEO               (3 << 19) | 
|  | 544 | #endif | 
|  | 545 |  | 
|  | 546 | #ifdef CONFIG_FB_MSM_MDP22 | 
|  | 547 | #define DMA_OUT_SEL_MDDI BIT(14) | 
|  | 548 | #define DMA_AHBM_LCD_SEL_PRIMARY 0 | 
|  | 549 | #define DMA_AHBM_LCD_SEL_SECONDARY BIT(15) | 
|  | 550 | #define DMA_IBUF_C3ALPHA_EN BIT(16) | 
|  | 551 | #define DMA_DITHER_EN BIT(17) | 
|  | 552 | #define DMA_MDDI_DMAOUT_LCD_SEL_PRIMARY 0 | 
|  | 553 | #define DMA_MDDI_DMAOUT_LCD_SEL_SECONDARY BIT(18) | 
|  | 554 | #define DMA_MDDI_DMAOUT_LCD_SEL_EXTERNAL BIT(19) | 
|  | 555 | #define DMA_IBUF_FORMAT_RGB565 BIT(20) | 
|  | 556 | #define DMA_IBUF_FORMAT_RGB888_OR_ARGB8888 0 | 
|  | 557 | #define DMA_IBUF_NONCONTIGUOUS BIT(21) | 
|  | 558 | #else | 
|  | 559 | #define DMA_OUT_SEL_MDDI                    BIT(19) | 
|  | 560 | #define DMA_AHBM_LCD_SEL_PRIMARY            0 | 
|  | 561 | #define DMA_AHBM_LCD_SEL_SECONDARY          0 | 
|  | 562 | #define DMA_IBUF_C3ALPHA_EN                 0 | 
|  | 563 | #define DMA_BUF_FORMAT_RGB565		BIT(25) | 
|  | 564 | #define DMA_DITHER_EN                       BIT(24)	/* dma_p */ | 
|  | 565 | #define DMA_DEFLKR_EN                       BIT(24)	/* dma_e */ | 
|  | 566 | #define DMA_MDDI_DMAOUT_LCD_SEL_PRIMARY     0 | 
|  | 567 | #define DMA_MDDI_DMAOUT_LCD_SEL_SECONDARY   0 | 
|  | 568 | #define DMA_MDDI_DMAOUT_LCD_SEL_EXTERNAL    0 | 
|  | 569 | #define DMA_IBUF_FORMAT_RGB565              BIT(25) | 
|  | 570 | #define DMA_IBUF_NONCONTIGUOUS 0 | 
|  | 571 | #endif | 
|  | 572 |  | 
|  | 573 | /* | 
|  | 574 | * MDDI Register | 
|  | 575 | */ | 
|  | 576 | #define MDDI_VDO_PACKET_DESC_16  0x5565 | 
|  | 577 | #define MDDI_VDO_PACKET_DESC	 0x5666	/* 18 bits */ | 
|  | 578 | #define MDDI_VDO_PACKET_DESC_24  0x5888 | 
|  | 579 |  | 
|  | 580 | #ifdef CONFIG_FB_MSM_MDP40 | 
|  | 581 | #define MDP_INTR_ENABLE		(msm_mdp_base + 0x0050) | 
|  | 582 | #define MDP_INTR_STATUS		(msm_mdp_base + 0x0054) | 
|  | 583 | #define MDP_INTR_CLEAR		(msm_mdp_base + 0x0058) | 
|  | 584 | #define MDP_EBI2_LCD0		(msm_mdp_base + 0x0060) | 
|  | 585 | #define MDP_EBI2_LCD1		(msm_mdp_base + 0x0064) | 
|  | 586 | #define MDP_EBI2_PORTMAP_MODE	(msm_mdp_base + 0x0070) | 
|  | 587 |  | 
|  | 588 | #define MDP_DMA_P_HIST_INTR_STATUS 	(msm_mdp_base + 0x95014) | 
|  | 589 | #define MDP_DMA_P_HIST_INTR_CLEAR 	(msm_mdp_base + 0x95018) | 
|  | 590 | #define MDP_DMA_P_HIST_INTR_ENABLE 	(msm_mdp_base + 0x9501C) | 
|  | 591 | #else | 
|  | 592 | #define MDP_INTR_ENABLE		(msm_mdp_base + 0x0020) | 
|  | 593 | #define MDP_INTR_STATUS		(msm_mdp_base + 0x0024) | 
|  | 594 | #define MDP_INTR_CLEAR		(msm_mdp_base + 0x0028) | 
|  | 595 | #define MDP_EBI2_LCD0		(msm_mdp_base + 0x003c) | 
|  | 596 | #define MDP_EBI2_LCD1		(msm_mdp_base + 0x0040) | 
|  | 597 | #define MDP_EBI2_PORTMAP_MODE	(msm_mdp_base + 0x005c) | 
|  | 598 | #endif | 
|  | 599 |  | 
|  | 600 | #define MDP_FULL_BYPASS_WORD43  (msm_mdp_base + 0x101ac) | 
|  | 601 |  | 
|  | 602 | #define MDP_CSC_PFMVn(n)	(msm_mdp_base + 0x40400 + 4 * (n)) | 
|  | 603 | #define MDP_CSC_PRMVn(n)	(msm_mdp_base + 0x40440 + 4 * (n)) | 
|  | 604 | #define MDP_CSC_PRE_BV1n(n)	(msm_mdp_base + 0x40500 + 4 * (n)) | 
|  | 605 | #define MDP_CSC_PRE_BV2n(n)	(msm_mdp_base + 0x40540 + 4 * (n)) | 
|  | 606 | #define MDP_CSC_POST_BV1n(n)	(msm_mdp_base + 0x40580 + 4 * (n)) | 
|  | 607 | #define MDP_CSC_POST_BV2n(n)	(msm_mdp_base + 0x405c0 + 4 * (n)) | 
|  | 608 |  | 
|  | 609 | #ifdef CONFIG_FB_MSM_MDP31 | 
|  | 610 | #define MDP_CSC_PRE_LV1n(n)	(msm_mdp_base + 0x40600 + 4 * (n)) | 
|  | 611 | #define MDP_CSC_PRE_LV2n(n)	(msm_mdp_base + 0x40640 + 4 * (n)) | 
|  | 612 | #define MDP_CSC_POST_LV1n(n)	(msm_mdp_base + 0x40680 + 4 * (n)) | 
|  | 613 | #define MDP_CSC_POST_LV2n(n)	(msm_mdp_base + 0x406c0 + 4 * (n)) | 
|  | 614 | #define MDP_PPP_SCALE_COEFF_LSBn(n)	(msm_mdp_base + 0x50400 + 8 * (n)) | 
|  | 615 | #define MDP_PPP_SCALE_COEFF_MSBn(n)	(msm_mdp_base + 0x50404 + 8 * (n)) | 
|  | 616 |  | 
|  | 617 | #define SCALE_D0_SET  0 | 
|  | 618 | #define SCALE_D1_SET  BIT(0) | 
|  | 619 | #define SCALE_D2_SET  BIT(1) | 
|  | 620 | #define SCALE_U1_SET  (BIT(0)|BIT(1)) | 
|  | 621 |  | 
|  | 622 | #else | 
|  | 623 | #define MDP_CSC_PRE_LV1n(n)	(msm_mdp_base + 0x40580 + 4 * (n)) | 
|  | 624 | #endif | 
|  | 625 |  | 
|  | 626 | #define MDP_CURSOR_WIDTH 64 | 
|  | 627 | #define MDP_CURSOR_HEIGHT 64 | 
|  | 628 | #define MDP_CURSOR_SIZE (MDP_CURSOR_WIDTH*MDP_CURSOR_WIDTH*4) | 
|  | 629 |  | 
|  | 630 | #define MDP_DMA_P_LUT_C0_EN   BIT(0) | 
|  | 631 | #define MDP_DMA_P_LUT_C1_EN   BIT(1) | 
|  | 632 | #define MDP_DMA_P_LUT_C2_EN   BIT(2) | 
|  | 633 | #define MDP_DMA_P_LUT_POST    BIT(4) | 
|  | 634 |  | 
|  | 635 | void mdp_hw_init(void); | 
|  | 636 | int mdp_ppp_pipe_wait(void); | 
|  | 637 | void mdp_pipe_kickoff(uint32 term, struct msm_fb_data_type *mfd); | 
|  | 638 | void mdp_pipe_ctrl(MDP_BLOCK_TYPE block, MDP_BLOCK_POWER_STATE state, | 
|  | 639 | boolean isr); | 
|  | 640 | void mdp_set_dma_pan_info(struct fb_info *info, struct mdp_dirty_region *dirty, | 
|  | 641 | boolean sync); | 
|  | 642 | void mdp_dma_pan_update(struct fb_info *info); | 
|  | 643 | void mdp_refresh_screen(unsigned long data); | 
|  | 644 | int mdp_ppp_blit(struct fb_info *info, struct mdp_blit_req *req); | 
|  | 645 | void mdp_lcd_update_workqueue_handler(struct work_struct *work); | 
|  | 646 | void mdp_vsync_resync_workqueue_handler(struct work_struct *work); | 
|  | 647 | void mdp_dma2_update(struct msm_fb_data_type *mfd); | 
| Ravishangar Kalyanam | 419051b | 2011-08-31 19:07:53 -0700 | [diff] [blame] | 648 | void mdp_vsync_cfg_regs(struct msm_fb_data_type *mfd, | 
|  | 649 | boolean first_time); | 
| Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 650 | void mdp_config_vsync(struct msm_fb_data_type *); | 
|  | 651 | uint32 mdp_get_lcd_line_counter(struct msm_fb_data_type *mfd); | 
|  | 652 | enum hrtimer_restart mdp_dma2_vsync_hrtimer_handler(struct hrtimer *ht); | 
|  | 653 | void mdp_set_scale(MDPIBUF *iBuf, | 
|  | 654 | uint32 dst_roi_width, | 
|  | 655 | uint32 dst_roi_height, | 
|  | 656 | boolean inputRGB, boolean outputRGB, uint32 *pppop_reg_ptr); | 
|  | 657 | void mdp_init_scale_table(void); | 
|  | 658 | void mdp_adjust_start_addr(uint8 **src0, | 
|  | 659 | uint8 **src1, | 
|  | 660 | int v_slice, | 
|  | 661 | int h_slice, | 
|  | 662 | int x, | 
|  | 663 | int y, | 
|  | 664 | uint32 width, | 
|  | 665 | uint32 height, int bpp, MDPIBUF *iBuf, int layer); | 
|  | 666 | void mdp_set_blend_attr(MDPIBUF *iBuf, | 
|  | 667 | uint32 *alpha, | 
|  | 668 | uint32 *tpVal, | 
|  | 669 | uint32 perPixelAlpha, uint32 *pppop_reg_ptr); | 
|  | 670 |  | 
|  | 671 | int mdp_dma3_on(struct platform_device *pdev); | 
|  | 672 | int mdp_dma3_off(struct platform_device *pdev); | 
|  | 673 | void mdp_dma3_update(struct msm_fb_data_type *mfd); | 
|  | 674 |  | 
|  | 675 | int mdp_lcdc_on(struct platform_device *pdev); | 
|  | 676 | int mdp_lcdc_off(struct platform_device *pdev); | 
|  | 677 | void mdp_lcdc_update(struct msm_fb_data_type *mfd); | 
|  | 678 |  | 
|  | 679 | #ifdef CONFIG_FB_MSM_MDP303 | 
|  | 680 | int mdp_dsi_video_on(struct platform_device *pdev); | 
|  | 681 | int mdp_dsi_video_off(struct platform_device *pdev); | 
|  | 682 | void mdp_dsi_video_update(struct msm_fb_data_type *mfd); | 
|  | 683 | void mdp3_dsi_cmd_dma_busy_wait(struct msm_fb_data_type *mfd); | 
|  | 684 | #endif | 
|  | 685 |  | 
|  | 686 | int mdp_hw_cursor_update(struct fb_info *info, struct fb_cursor *cursor); | 
| Adrian Salido-Moreno | d1b9d7a | 2011-10-14 18:18:51 -0700 | [diff] [blame] | 687 | #if defined(CONFIG_FB_MSM_OVERLAY) && defined(CONFIG_FB_MSM_MDP40) | 
| Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 688 | int mdp_hw_cursor_sync_update(struct fb_info *info, struct fb_cursor *cursor); | 
| Adrian Salido-Moreno | d1b9d7a | 2011-10-14 18:18:51 -0700 | [diff] [blame] | 689 | #else | 
|  | 690 | static inline int mdp_hw_cursor_sync_update(struct fb_info *info, | 
|  | 691 | struct fb_cursor *cursor) | 
|  | 692 | { | 
|  | 693 | return 0; | 
|  | 694 | } | 
|  | 695 | #endif | 
|  | 696 |  | 
| Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 697 | void mdp_enable_irq(uint32 term); | 
|  | 698 | void mdp_disable_irq(uint32 term); | 
|  | 699 | void mdp_disable_irq_nosync(uint32 term); | 
|  | 700 | int mdp_get_bytes_per_pixel(uint32_t format, | 
|  | 701 | struct msm_fb_data_type *mfd); | 
|  | 702 | int mdp_set_core_clk(uint16 perf_level); | 
|  | 703 | unsigned long mdp_get_core_clk(void); | 
|  | 704 | unsigned long mdp_perf_level2clk_rate(uint32 perf_level); | 
|  | 705 |  | 
|  | 706 | #ifdef CONFIG_MSM_BUS_SCALING | 
|  | 707 | int mdp_bus_scale_update_request(uint32_t index); | 
|  | 708 | #endif | 
|  | 709 |  | 
|  | 710 | #ifdef MDP_HW_VSYNC | 
|  | 711 | void mdp_hw_vsync_clk_enable(struct msm_fb_data_type *mfd); | 
|  | 712 | void mdp_hw_vsync_clk_disable(struct msm_fb_data_type *mfd); | 
|  | 713 | void mdp_vsync_clk_disable(void); | 
|  | 714 | void mdp_vsync_clk_enable(void); | 
|  | 715 | #endif | 
|  | 716 |  | 
|  | 717 | #ifdef CONFIG_DEBUG_FS | 
|  | 718 | int mdp_debugfs_init(void); | 
|  | 719 | #endif | 
|  | 720 |  | 
|  | 721 | void mdp_dma_s_update(struct msm_fb_data_type *mfd); | 
|  | 722 | int mdp_start_histogram(struct fb_info *info); | 
|  | 723 | int mdp_stop_histogram(struct fb_info *info); | 
|  | 724 | int mdp_histogram_ctrl(boolean en); | 
|  | 725 |  | 
|  | 726 | #ifdef CONFIG_FB_MSM_MDP303 | 
|  | 727 | static inline void mdp4_dsi_cmd_dma_busy_wait(struct msm_fb_data_type *mfd) | 
|  | 728 | { | 
|  | 729 | /* empty */ | 
|  | 730 | } | 
|  | 731 |  | 
|  | 732 | static inline void mdp4_dsi_blt_dmap_busy_wait(struct msm_fb_data_type *mfd) | 
|  | 733 | { | 
|  | 734 | /* empty */ | 
|  | 735 | } | 
|  | 736 | static inline void mdp4_overlay_dsi_state_set(int state) | 
|  | 737 | { | 
|  | 738 | /* empty */ | 
|  | 739 | } | 
|  | 740 | #endif | 
|  | 741 |  | 
|  | 742 | #endif /* MDP_H */ |