void mdp_hw_init(void) { int i; #if defined(CONFIG_MACH_JENA) mdp_timer_duration = (100 * HZ); /* 100 sec */ #endif /* MDP cmd block enable */ mdp_pipe_ctrl(MDP_CMD_BLOCK, MDP_BLOCK_POWER_ON, FALSE); /* debug interface write access */ outpdw(MDP_BASE + 0x60, 1); outp32(MDP_INTR_ENABLE, MDP_ANY_INTR_MASK); outp32(MDP_EBI2_PORTMAP_MODE, 0x3); outpdw(MDP_CMD_DEBUG_ACCESS_BASE + 0x01f8, 0x0); outpdw(MDP_CMD_DEBUG_ACCESS_BASE + 0x01fc, 0x0); outpdw(MDP_BASE + 0x60, 0x1); mdp_load_lut_param(); /* * clear up unused fg/main registers */ /* comp.plane 2&3 ystride */ MDP_OUTP(MDP_CMD_DEBUG_ACCESS_BASE + 0x0120, 0x0); /* unpacked pattern */ MDP_OUTP(MDP_CMD_DEBUG_ACCESS_BASE + 0x012c, 0x0); /* unpacked pattern */ MDP_OUTP(MDP_CMD_DEBUG_ACCESS_BASE + 0x0130, 0x0); /* unpacked pattern */ MDP_OUTP(MDP_CMD_DEBUG_ACCESS_BASE + 0x0134, 0x0); MDP_OUTP(MDP_CMD_DEBUG_ACCESS_BASE + 0x0158, 0x0); MDP_OUTP(MDP_CMD_DEBUG_ACCESS_BASE + 0x15c, 0x0); MDP_OUTP(MDP_CMD_DEBUG_ACCESS_BASE + 0x0160, 0x0); MDP_OUTP(MDP_CMD_DEBUG_ACCESS_BASE + 0x0170, 0x0); MDP_OUTP(MDP_CMD_DEBUG_ACCESS_BASE + 0x0174, 0x0); MDP_OUTP(MDP_CMD_DEBUG_ACCESS_BASE + 0x017c, 0x0); /* comp.plane 2 */ MDP_OUTP(MDP_CMD_DEBUG_ACCESS_BASE + 0x0114, 0x0); /* comp.plane 3 */ MDP_OUTP(MDP_CMD_DEBUG_ACCESS_BASE + 0x0118, 0x0); /* clear up unused bg registers */ MDP_OUTP(MDP_CMD_DEBUG_ACCESS_BASE + 0x01c8, 0); MDP_OUTP(MDP_CMD_DEBUG_ACCESS_BASE + 0x01d0, 0); MDP_OUTP(MDP_CMD_DEBUG_ACCESS_BASE + 0x01dc, 0); MDP_OUTP(MDP_CMD_DEBUG_ACCESS_BASE + 0x01e0, 0); MDP_OUTP(MDP_CMD_DEBUG_ACCESS_BASE + 0x01e4, 0); #ifndef CONFIG_FB_MSM_MDP22 #if defined(CONFIG_MACH_JENA) /* skip the code to avoid LCDC is to be disable */ if (!mdp_continues_display) #endif { MDP_OUTP(MDP_BASE + 0xE0000, 0); MDP_OUTP(MDP_BASE + 0x100, 0xffffffff); MDP_OUTP(MDP_BASE + 0x90070, 0); MDP_OUTP(MDP_BASE + 0x94010, 1); MDP_OUTP(MDP_BASE + 0x9401c, 2); } #endif /* * limit vector * pre gets applied before color matrix conversion * post is after ccs */ writel(mdp_plv[0], MDP_CSC_PRE_LV1n(0)); writel(mdp_plv[1], MDP_CSC_PRE_LV1n(1)); writel(mdp_plv[2], MDP_CSC_PRE_LV1n(2)); writel(mdp_plv[3], MDP_CSC_PRE_LV1n(3)); #ifdef CONFIG_FB_MSM_MDP31 writel(mdp_plv[2], MDP_CSC_PRE_LV1n(4)); writel(mdp_plv[3], MDP_CSC_PRE_LV1n(5)); writel(0, MDP_CSC_POST_LV1n(0)); writel(0xff, MDP_CSC_POST_LV1n(1)); writel(0, MDP_CSC_POST_LV1n(2)); writel(0xff, MDP_CSC_POST_LV1n(3)); writel(0, MDP_CSC_POST_LV1n(4)); writel(0xff, MDP_CSC_POST_LV1n(5)); writel(0, MDP_CSC_PRE_LV2n(0)); writel(0xff, MDP_CSC_PRE_LV2n(1)); writel(0, MDP_CSC_PRE_LV2n(2)); writel(0xff, MDP_CSC_PRE_LV2n(3)); writel(0, MDP_CSC_PRE_LV2n(4)); writel(0xff, MDP_CSC_PRE_LV2n(5)); writel(mdp_plv[0], MDP_CSC_POST_LV2n(0)); writel(mdp_plv[1], MDP_CSC_POST_LV2n(1)); writel(mdp_plv[2], MDP_CSC_POST_LV2n(2)); writel(mdp_plv[3], MDP_CSC_POST_LV2n(3)); writel(mdp_plv[2], MDP_CSC_POST_LV2n(4)); writel(mdp_plv[3], MDP_CSC_POST_LV2n(5)); #endif /* primary forward matrix */ for (i = 0; i < MDP_CCS_SIZE; i++) writel(mdp_ccs_rgb2yuv.ccs[i], MDP_CSC_PFMVn(i)); #ifdef CONFIG_FB_MSM_MDP31 for (i = 0; i < MDP_BV_SIZE; i++) writel(mdp_ccs_rgb2yuv.bv[i], MDP_CSC_POST_BV2n(i)); writel(0, MDP_CSC_PRE_BV2n(0)); writel(0, MDP_CSC_PRE_BV2n(1)); writel(0, MDP_CSC_PRE_BV2n(2)); #endif /* primary reverse matrix */ for (i = 0; i < MDP_CCS_SIZE; i++) writel(mdp_ccs_yuv2rgb.ccs[i], MDP_CSC_PRMVn(i)); for (i = 0; i < MDP_BV_SIZE; i++) writel(mdp_ccs_yuv2rgb.bv[i], MDP_CSC_PRE_BV1n(i)); #ifdef CONFIG_FB_MSM_MDP31 writel(0, MDP_CSC_POST_BV1n(0)); writel(0, MDP_CSC_POST_BV1n(1)); writel(0, MDP_CSC_POST_BV1n(2)); outpdw(MDP_BASE + 0x30010, 0x03e0); outpdw(MDP_BASE + 0x30014, 0x0360); outpdw(MDP_BASE + 0x30018, 0x0120); outpdw(MDP_BASE + 0x3001c, 0x0140); #endif mdp_init_scale_table(); #ifndef CONFIG_FB_MSM_MDP31 MDP_OUTP(MDP_CMD_DEBUG_ACCESS_BASE + 0x0104, ((16 << 6) << 16) | (16) << 6); #endif /* MDP cmd block disable */ mdp_pipe_ctrl(MDP_CMD_BLOCK, MDP_BLOCK_POWER_OFF, FALSE); }
void mdp_hw_init(void) { int i; /* MDP cmd block enable */ mdp_pipe_ctrl(MDP_CMD_BLOCK, MDP_BLOCK_POWER_ON, FALSE); /* debug interface write access */ outpdw(MDP_BASE + 0x60, 1); outp32(MDP_INTR_ENABLE, MDP_ANY_INTR_MASK); outp32(MDP_EBI2_PORTMAP_MODE, 0x3); outpdw(MDP_CMD_DEBUG_ACCESS_BASE + 0x01f8, 0x0); outpdw(MDP_CMD_DEBUG_ACCESS_BASE + 0x01fc, 0x0); outpdw(MDP_BASE + 0x60, 0x1); mdp_load_lut_param(); /* * clear up unused fg/main registers */ /* comp.plane 2&3 ystride */ MDP_OUTP(MDP_CMD_DEBUG_ACCESS_BASE + 0x0120, 0x0); /* unpacked pattern */ MDP_OUTP(MDP_CMD_DEBUG_ACCESS_BASE + 0x012c, 0x0); /* unpacked pattern */ MDP_OUTP(MDP_CMD_DEBUG_ACCESS_BASE + 0x0130, 0x0); /* unpacked pattern */ MDP_OUTP(MDP_CMD_DEBUG_ACCESS_BASE + 0x0134, 0x0); MDP_OUTP(MDP_CMD_DEBUG_ACCESS_BASE + 0x0158, 0x0); MDP_OUTP(MDP_CMD_DEBUG_ACCESS_BASE + 0x15c, 0x0); MDP_OUTP(MDP_CMD_DEBUG_ACCESS_BASE + 0x0160, 0x0); MDP_OUTP(MDP_CMD_DEBUG_ACCESS_BASE + 0x0170, 0x0); MDP_OUTP(MDP_CMD_DEBUG_ACCESS_BASE + 0x0174, 0x0); MDP_OUTP(MDP_CMD_DEBUG_ACCESS_BASE + 0x017c, 0x0); /* comp.plane 2 */ MDP_OUTP(MDP_CMD_DEBUG_ACCESS_BASE + 0x0114, 0x0); /* comp.plane 3 */ MDP_OUTP(MDP_CMD_DEBUG_ACCESS_BASE + 0x0118, 0x0); /* clear up unused bg registers */ MDP_OUTP(MDP_CMD_DEBUG_ACCESS_BASE + 0x01c8, 0); MDP_OUTP(MDP_CMD_DEBUG_ACCESS_BASE + 0x01d0, 0); MDP_OUTP(MDP_CMD_DEBUG_ACCESS_BASE + 0x01dc, 0); MDP_OUTP(MDP_CMD_DEBUG_ACCESS_BASE + 0x01e0, 0); MDP_OUTP(MDP_CMD_DEBUG_ACCESS_BASE + 0x01e4, 0); #ifndef CONFIG_FB_MSM_MDP22 MDP_OUTP(MDP_BASE + 0xE0000, 0); MDP_OUTP(MDP_BASE + 0x100, 0xffffffff); MDP_OUTP(MDP_BASE + 0x90070, 0); #endif /* * limit vector * pre gets applied before color matrix conversion * post is after ccs */ writel(mdp_plv[0], MDP_CSC_PRE_LV1n(0)); writel(mdp_plv[1], MDP_CSC_PRE_LV1n(1)); writel(mdp_plv[2], MDP_CSC_PRE_LV1n(2)); writel(mdp_plv[3], MDP_CSC_PRE_LV1n(3)); #ifdef CONFIG_FB_MSM_MDP31 writel(mdp_plv[2], MDP_CSC_PRE_LV1n(4)); writel(mdp_plv[3], MDP_CSC_PRE_LV1n(5)); writel(0, MDP_CSC_POST_LV1n(0)); writel(0xff, MDP_CSC_POST_LV1n(1)); writel(0, MDP_CSC_POST_LV1n(2)); writel(0xff, MDP_CSC_POST_LV1n(3)); writel(0, MDP_CSC_POST_LV1n(4)); writel(0xff, MDP_CSC_POST_LV1n(5)); writel(0, MDP_CSC_PRE_LV2n(0)); writel(0xff, MDP_CSC_PRE_LV2n(1)); writel(0, MDP_CSC_PRE_LV2n(2)); writel(0xff, MDP_CSC_PRE_LV2n(3)); writel(0, MDP_CSC_PRE_LV2n(4)); writel(0xff, MDP_CSC_PRE_LV2n(5)); writel(mdp_plv[0], MDP_CSC_POST_LV2n(0)); writel(mdp_plv[1], MDP_CSC_POST_LV2n(1)); writel(mdp_plv[2], MDP_CSC_POST_LV2n(2)); writel(mdp_plv[3], MDP_CSC_POST_LV2n(3)); writel(mdp_plv[2], MDP_CSC_POST_LV2n(4)); writel(mdp_plv[3], MDP_CSC_POST_LV2n(5)); #endif /* primary forward matrix */ for (i = 0; i < MDP_CCS_SIZE; i++) writel(mdp_ccs_rgb2yuv.ccs[i], MDP_CSC_PFMVn(i)); #ifdef CONFIG_FB_MSM_MDP31 for (i = 0; i < MDP_BV_SIZE; i++) writel(mdp_ccs_rgb2yuv.bv[i], MDP_CSC_POST_BV2n(i)); writel(0, MDP_CSC_PRE_BV2n(0)); writel(0, MDP_CSC_PRE_BV2n(1)); writel(0, MDP_CSC_PRE_BV2n(2)); #endif /* primary reverse matrix */ for (i = 0; i < MDP_CCS_SIZE; i++) writel(mdp_ccs_yuv2rgb.ccs[i], MDP_CSC_PRMVn(i)); for (i = 0; i < MDP_BV_SIZE; i++) writel(mdp_ccs_yuv2rgb.bv[i], MDP_CSC_PRE_BV1n(i)); #ifdef CONFIG_FB_MSM_MDP31 writel(0, MDP_CSC_POST_BV1n(0)); writel(0, MDP_CSC_POST_BV1n(1)); writel(0, MDP_CSC_POST_BV1n(2)); outpdw(MDP_BASE + 0x30010, 0x03e0); outpdw(MDP_BASE + 0x30014, 0x0360); outpdw(MDP_BASE + 0x30018, 0x0120); outpdw(MDP_BASE + 0x3001c, 0x0140); #endif mdp_init_scale_table(); #ifndef CONFIG_FB_MSM_MDP31 MDP_OUTP(MDP_CMD_DEBUG_ACCESS_BASE + 0x0104, ((16 << 6) << 16) | (16) << 6); #endif wmb(); /* * Postpone the MDP clock disable for VIDEO_ONLY panels */ if (((panel_type & MIPI_MODE_MASK) != MIPI_VIDEO_ONLY) || (board_mfg_mode() == 4)) { /* MDP cmd block disable */ mdp_pipe_ctrl(MDP_CMD_BLOCK, MDP_BLOCK_POWER_OFF, FALSE); } }
void mdp_hw_init(void) { int i; /* LGE_CHANGE [[email protected]] 2010-08-28, probe LCD */ #if defined(CONFIG_FB_MSM_MDDI_NOVATEK_HITACHI_HVGA) lge_probe_lcd(); #endif /* MDP cmd block enable */ mdp_pipe_ctrl(MDP_CMD_BLOCK, MDP_BLOCK_POWER_ON, FALSE); /* debug interface write access */ outpdw(MDP_BASE + 0x60, 1); outp32(MDP_INTR_ENABLE, MDP_ANY_INTR_MASK); outp32(MDP_EBI2_PORTMAP_MODE, 0x3); outpdw(MDP_CMD_DEBUG_ACCESS_BASE + 0x01f8, 0x0); outpdw(MDP_CMD_DEBUG_ACCESS_BASE + 0x01fc, 0x0); outpdw(MDP_BASE + 0x60, 0x1); mdp_load_lut_param(); /* * clear up unused fg/main registers */ /* comp.plane 2&3 ystride */ MDP_OUTP(MDP_CMD_DEBUG_ACCESS_BASE + 0x0120, 0x0); /* unpacked pattern */ MDP_OUTP(MDP_CMD_DEBUG_ACCESS_BASE + 0x012c, 0x0); /* unpacked pattern */ MDP_OUTP(MDP_CMD_DEBUG_ACCESS_BASE + 0x0130, 0x0); /* unpacked pattern */ MDP_OUTP(MDP_CMD_DEBUG_ACCESS_BASE + 0x0134, 0x0); MDP_OUTP(MDP_CMD_DEBUG_ACCESS_BASE + 0x0158, 0x0); MDP_OUTP(MDP_CMD_DEBUG_ACCESS_BASE + 0x15c, 0x0); MDP_OUTP(MDP_CMD_DEBUG_ACCESS_BASE + 0x0160, 0x0); MDP_OUTP(MDP_CMD_DEBUG_ACCESS_BASE + 0x0170, 0x0); MDP_OUTP(MDP_CMD_DEBUG_ACCESS_BASE + 0x0174, 0x0); MDP_OUTP(MDP_CMD_DEBUG_ACCESS_BASE + 0x017c, 0x0); /* comp.plane 2 */ MDP_OUTP(MDP_CMD_DEBUG_ACCESS_BASE + 0x0114, 0x0); /* comp.plane 3 */ MDP_OUTP(MDP_CMD_DEBUG_ACCESS_BASE + 0x0118, 0x0); /* clear up unused bg registers */ MDP_OUTP(MDP_CMD_DEBUG_ACCESS_BASE + 0x01c8, 0); MDP_OUTP(MDP_CMD_DEBUG_ACCESS_BASE + 0x01d0, 0); MDP_OUTP(MDP_CMD_DEBUG_ACCESS_BASE + 0x01dc, 0); MDP_OUTP(MDP_CMD_DEBUG_ACCESS_BASE + 0x01e0, 0); MDP_OUTP(MDP_CMD_DEBUG_ACCESS_BASE + 0x01e4, 0); #ifndef CONFIG_FB_MSM_MDP22 MDP_OUTP(MDP_BASE + 0xE0000, 0); MDP_OUTP(MDP_BASE + 0x100, 0xffffffff); MDP_OUTP(MDP_BASE + 0x90070, 0); MDP_OUTP(MDP_BASE + 0x94010, 1); MDP_OUTP(MDP_BASE + 0x9401c, 2); #endif #if defined(CONFIG_MACH_MSM7X27_THUNDERG) || defined(CONFIG_MACH_MSM7X27_THUNDERC) /* LGE_CHANGE_S * Change code to apply new LUT for display quality. 2010-08-03. [email protected] */ mdp_load_thunder_lut(1); // nornal #endif /* * limit vector * pre gets applied before color matrix conversion * post is after ccs */ writel(mdp_plv[0], MDP_CSC_PRE_LV1n(0)); writel(mdp_plv[1], MDP_CSC_PRE_LV1n(1)); writel(mdp_plv[2], MDP_CSC_PRE_LV1n(2)); writel(mdp_plv[3], MDP_CSC_PRE_LV1n(3)); #ifdef CONFIG_FB_MSM_MDP31 writel(mdp_plv[2], MDP_CSC_PRE_LV1n(4)); writel(mdp_plv[3], MDP_CSC_PRE_LV1n(5)); writel(0, MDP_CSC_POST_LV1n(0)); writel(0xff, MDP_CSC_POST_LV1n(1)); writel(0, MDP_CSC_POST_LV1n(2)); writel(0xff, MDP_CSC_POST_LV1n(3)); writel(0, MDP_CSC_POST_LV1n(4)); writel(0xff, MDP_CSC_POST_LV1n(5)); writel(0, MDP_CSC_PRE_LV2n(0)); writel(0xff, MDP_CSC_PRE_LV2n(1)); writel(0, MDP_CSC_PRE_LV2n(2)); writel(0xff, MDP_CSC_PRE_LV2n(3)); writel(0, MDP_CSC_PRE_LV2n(4)); writel(0xff, MDP_CSC_PRE_LV2n(5)); writel(mdp_plv[0], MDP_CSC_POST_LV2n(0)); writel(mdp_plv[1], MDP_CSC_POST_LV2n(1)); writel(mdp_plv[2], MDP_CSC_POST_LV2n(2)); writel(mdp_plv[3], MDP_CSC_POST_LV2n(3)); writel(mdp_plv[2], MDP_CSC_POST_LV2n(4)); writel(mdp_plv[3], MDP_CSC_POST_LV2n(5)); #endif /* primary forward matrix */ for (i = 0; i < MDP_CCS_SIZE; i++) writel(mdp_ccs_rgb2yuv.ccs[i], MDP_CSC_PFMVn(i)); #ifdef CONFIG_FB_MSM_MDP31 for (i = 0; i < MDP_BV_SIZE; i++) writel(mdp_ccs_rgb2yuv.bv[i], MDP_CSC_POST_BV2n(i)); writel(0, MDP_CSC_PRE_BV2n(0)); writel(0, MDP_CSC_PRE_BV2n(1)); writel(0, MDP_CSC_PRE_BV2n(2)); #endif /* primary reverse matrix */ for (i = 0; i < MDP_CCS_SIZE; i++) writel(mdp_ccs_yuv2rgb.ccs[i], MDP_CSC_PRMVn(i)); for (i = 0; i < MDP_BV_SIZE; i++) writel(mdp_ccs_yuv2rgb.bv[i], MDP_CSC_PRE_BV1n(i)); #ifdef CONFIG_FB_MSM_MDP31 writel(0, MDP_CSC_POST_BV1n(0)); writel(0, MDP_CSC_POST_BV1n(1)); writel(0, MDP_CSC_POST_BV1n(2)); outpdw(MDP_BASE + 0x30010, 0x03e0); outpdw(MDP_BASE + 0x30014, 0x0360); outpdw(MDP_BASE + 0x30018, 0x0120); outpdw(MDP_BASE + 0x3001c, 0x0140); #endif mdp_init_scale_table(); #ifndef CONFIG_FB_MSM_MDP31 MDP_OUTP(MDP_CMD_DEBUG_ACCESS_BASE + 0x0104, ((16 << 6) << 16) | (16) << 6); #endif /* MDP cmd block disable */ mdp_pipe_ctrl(MDP_CMD_BLOCK, MDP_BLOCK_POWER_OFF, FALSE); }
void mdp_hw_init(void) { int i; /* { FIH, ChandlerKang, chandler_boot_lcdc, 09/9/24 */ #ifdef CONFIG_FIH_FXX int id; int mddi_type=0; id=FIH_READ_HWID_FROM_SMEM(); if( (CMCS_CTP_PR1 <= id && id < CMCS_7627_EVB1 ) || (CMCS_7627_PR1 <= id) ) { mddi_type=1; printk( KERN_INFO "mdp_hw_init(): MDDI panel, default way !!\n"); }else{ printk( KERN_INFO "mdp_hw_init(): RGB panel, skip mdp power on!!\n"); } #endif //mddi_type=1;//chandler_porting: workaround for porting /* } FIH, ChandlerKang, 09/9/24 */ /* MDP cmd block enable */ //chandler_boot_lcdc if(mddi_type){ mdp_pipe_ctrl(MDP_CMD_BLOCK, MDP_BLOCK_POWER_ON, FALSE); } /* debug interface write access */ outpdw(MDP_BASE + 0x60, 1); outp32(MDP_INTR_ENABLE, MDP_ANY_INTR_MASK); outp32(MDP_EBI2_PORTMAP_MODE, 0x3); outpdw(MDP_CMD_DEBUG_ACCESS_BASE + 0x01f8, 0x0); outpdw(MDP_CMD_DEBUG_ACCESS_BASE + 0x01fc, 0x0); outpdw(MDP_BASE + 0x60, 0x1); mdp_load_lut_param(); /* * clear up unused fg/main registers */ /* comp.plane 2&3 ystride */ MDP_OUTP(MDP_CMD_DEBUG_ACCESS_BASE + 0x0120, 0x0); /* unpacked pattern */ MDP_OUTP(MDP_CMD_DEBUG_ACCESS_BASE + 0x012c, 0x0); /* unpacked pattern */ MDP_OUTP(MDP_CMD_DEBUG_ACCESS_BASE + 0x0130, 0x0); /* unpacked pattern */ MDP_OUTP(MDP_CMD_DEBUG_ACCESS_BASE + 0x0134, 0x0); MDP_OUTP(MDP_CMD_DEBUG_ACCESS_BASE + 0x0158, 0x0); MDP_OUTP(MDP_CMD_DEBUG_ACCESS_BASE + 0x15c, 0x0); MDP_OUTP(MDP_CMD_DEBUG_ACCESS_BASE + 0x0160, 0x0); MDP_OUTP(MDP_CMD_DEBUG_ACCESS_BASE + 0x0170, 0x0); MDP_OUTP(MDP_CMD_DEBUG_ACCESS_BASE + 0x0174, 0x0); MDP_OUTP(MDP_CMD_DEBUG_ACCESS_BASE + 0x017c, 0x0); /* comp.plane 2 */ MDP_OUTP(MDP_CMD_DEBUG_ACCESS_BASE + 0x0114, 0x0); /* comp.plane 3 */ MDP_OUTP(MDP_CMD_DEBUG_ACCESS_BASE + 0x0118, 0x0); /* clear up unused bg registers */ MDP_OUTP(MDP_CMD_DEBUG_ACCESS_BASE + 0x01c8, 0); MDP_OUTP(MDP_CMD_DEBUG_ACCESS_BASE + 0x01d0, 0); MDP_OUTP(MDP_CMD_DEBUG_ACCESS_BASE + 0x01dc, 0); MDP_OUTP(MDP_CMD_DEBUG_ACCESS_BASE + 0x01e0, 0); MDP_OUTP(MDP_CMD_DEBUG_ACCESS_BASE + 0x01e4, 0); #ifndef CONFIG_FB_MSM_MDP22 //chandler_boot_lcdc if(mddi_type){ MDP_OUTP(MDP_BASE + 0xE0000, 0); }else{ MDP_OUTP(MDP_BASE + 0xE0000, 1); } MDP_OUTP(MDP_BASE + 0x100, 0xffffffff); MDP_OUTP(MDP_BASE + 0x90070, 0); MDP_OUTP(MDP_BASE + 0x94010, 1); MDP_OUTP(MDP_BASE + 0x9401c, 2); #endif /* * limit vector * pre gets applied before color matrix conversion * post is after ccs */ writel(mdp_plv[0], MDP_CSC_PRE_LV1n(0)); writel(mdp_plv[1], MDP_CSC_PRE_LV1n(1)); writel(mdp_plv[2], MDP_CSC_PRE_LV1n(2)); writel(mdp_plv[3], MDP_CSC_PRE_LV1n(3)); #ifdef CONFIG_FB_MSM_MDP31 writel(mdp_plv[2], MDP_CSC_PRE_LV1n(4)); writel(mdp_plv[3], MDP_CSC_PRE_LV1n(5)); writel(0, MDP_CSC_POST_LV1n(0)); writel(0xff, MDP_CSC_POST_LV1n(1)); writel(0, MDP_CSC_POST_LV1n(2)); writel(0xff, MDP_CSC_POST_LV1n(3)); writel(0, MDP_CSC_POST_LV1n(4)); writel(0xff, MDP_CSC_POST_LV1n(5)); writel(0, MDP_CSC_PRE_LV2n(0)); writel(0xff, MDP_CSC_PRE_LV2n(1)); writel(0, MDP_CSC_PRE_LV2n(2)); writel(0xff, MDP_CSC_PRE_LV2n(3)); writel(0, MDP_CSC_PRE_LV2n(4)); writel(0xff, MDP_CSC_PRE_LV2n(5)); writel(mdp_plv[0], MDP_CSC_POST_LV2n(0)); writel(mdp_plv[1], MDP_CSC_POST_LV2n(1)); writel(mdp_plv[2], MDP_CSC_POST_LV2n(2)); writel(mdp_plv[3], MDP_CSC_POST_LV2n(3)); writel(mdp_plv[2], MDP_CSC_POST_LV2n(4)); writel(mdp_plv[3], MDP_CSC_POST_LV2n(5)); #endif /* primary forward matrix */ for (i = 0; i < MDP_CCS_SIZE; i++) writel(mdp_ccs_rgb2yuv.ccs[i], MDP_CSC_PFMVn(i)); #ifdef CONFIG_FB_MSM_MDP31 for (i = 0; i < MDP_BV_SIZE; i++) writel(mdp_ccs_rgb2yuv.bv[i], MDP_CSC_POST_BV2n(i)); writel(0, MDP_CSC_PRE_BV2n(0)); writel(0, MDP_CSC_PRE_BV2n(1)); writel(0, MDP_CSC_PRE_BV2n(2)); #endif /* primary reverse matrix */ for (i = 0; i < MDP_CCS_SIZE; i++) writel(mdp_ccs_yuv2rgb.ccs[i], MDP_CSC_PRMVn(i)); for (i = 0; i < MDP_BV_SIZE; i++) writel(mdp_ccs_yuv2rgb.bv[i], MDP_CSC_PRE_BV1n(i)); #ifdef CONFIG_FB_MSM_MDP31 writel(0, MDP_CSC_POST_BV1n(0)); writel(0, MDP_CSC_POST_BV1n(1)); writel(0, MDP_CSC_POST_BV1n(2)); outpdw(MDP_BASE + 0x30010, 0x03e0); outpdw(MDP_BASE + 0x30014, 0x0360); outpdw(MDP_BASE + 0x30018, 0x0120); outpdw(MDP_BASE + 0x3001c, 0x0140); #endif mdp_init_scale_table(); #ifndef CONFIG_FB_MSM_MDP31 MDP_OUTP(MDP_CMD_DEBUG_ACCESS_BASE + 0x0104, ((16 << 6) << 16) | (16) << 6); #endif /* MDP cmd block disable */ //chandler_boot_lcdc if(mddi_type){ mdp_pipe_ctrl(MDP_CMD_BLOCK, MDP_BLOCK_POWER_OFF, FALSE); } }
void mdp_hw_init(int cont_splash) { int i; /* MDP cmd block enable */ mdp_pipe_ctrl(MDP_CMD_BLOCK, MDP_BLOCK_POWER_ON, FALSE); /* debug interface write access */ outpdw(MDP_BASE + 0x60, 1); outp32(MDP_INTR_ENABLE, MDP_ANY_INTR_MASK); outp32(MDP_EBI2_PORTMAP_MODE, 0x3); outpdw(MDP_CMD_DEBUG_ACCESS_BASE + 0x01f8, 0x0); outpdw(MDP_CMD_DEBUG_ACCESS_BASE + 0x01fc, 0x0); outpdw(MDP_BASE + 0x60, 0x1); mdp_load_lut_param(); /* * clear up unused fg/main registers */ /* comp.plane 2&3 ystride */ MDP_OUTP(MDP_CMD_DEBUG_ACCESS_BASE + 0x0120, 0x0); /* unpacked pattern */ MDP_OUTP(MDP_CMD_DEBUG_ACCESS_BASE + 0x012c, 0x0); /* unpacked pattern */ MDP_OUTP(MDP_CMD_DEBUG_ACCESS_BASE + 0x0130, 0x0); /* unpacked pattern */ MDP_OUTP(MDP_CMD_DEBUG_ACCESS_BASE + 0x0134, 0x0); MDP_OUTP(MDP_CMD_DEBUG_ACCESS_BASE + 0x0158, 0x0); MDP_OUTP(MDP_CMD_DEBUG_ACCESS_BASE + 0x15c, 0x0); MDP_OUTP(MDP_CMD_DEBUG_ACCESS_BASE + 0x0160, 0x0); MDP_OUTP(MDP_CMD_DEBUG_ACCESS_BASE + 0x0170, 0x0); MDP_OUTP(MDP_CMD_DEBUG_ACCESS_BASE + 0x0174, 0x0); MDP_OUTP(MDP_CMD_DEBUG_ACCESS_BASE + 0x017c, 0x0); /* comp.plane 2 */ MDP_OUTP(MDP_CMD_DEBUG_ACCESS_BASE + 0x0114, 0x0); /* comp.plane 3 */ MDP_OUTP(MDP_CMD_DEBUG_ACCESS_BASE + 0x0118, 0x0); /* clear up unused bg registers */ MDP_OUTP(MDP_CMD_DEBUG_ACCESS_BASE + 0x01c8, 0); MDP_OUTP(MDP_CMD_DEBUG_ACCESS_BASE + 0x01d0, 0); MDP_OUTP(MDP_CMD_DEBUG_ACCESS_BASE + 0x01dc, 0); MDP_OUTP(MDP_CMD_DEBUG_ACCESS_BASE + 0x01e0, 0); MDP_OUTP(MDP_CMD_DEBUG_ACCESS_BASE + 0x01e4, 0); #ifndef CONFIG_FB_MSM_MDP22 /* Make sure to disable TG if continuous splash screen * is not enabled on kernel side. This avoids issues * when multiple panels are supported on same board * and all the panels do not have splash screen/continuous * splash support on the boot loader side. */ if (!cont_splash) { MDP_OUTP(MDP_BASE + 0xE0000, 0); msleep(20); MDP_OUTP(MDP_BASE + 0xF0000, 0); msleep(20); } MDP_OUTP(MDP_BASE + 0x100, 0xffffffff); MDP_OUTP(MDP_BASE + 0x90070, 0); #endif /* * limit vector * pre gets applied before color matrix conversion * post is after ccs */ writel(mdp_plv[0], MDP_CSC_PRE_LV1n(0)); writel(mdp_plv[1], MDP_CSC_PRE_LV1n(1)); writel(mdp_plv[2], MDP_CSC_PRE_LV1n(2)); writel(mdp_plv[3], MDP_CSC_PRE_LV1n(3)); #ifdef CONFIG_FB_MSM_MDP31 writel(mdp_plv[2], MDP_CSC_PRE_LV1n(4)); writel(mdp_plv[3], MDP_CSC_PRE_LV1n(5)); writel(0, MDP_CSC_POST_LV1n(0)); writel(0xff, MDP_CSC_POST_LV1n(1)); writel(0, MDP_CSC_POST_LV1n(2)); writel(0xff, MDP_CSC_POST_LV1n(3)); writel(0, MDP_CSC_POST_LV1n(4)); writel(0xff, MDP_CSC_POST_LV1n(5)); writel(0, MDP_CSC_PRE_LV2n(0)); writel(0xff, MDP_CSC_PRE_LV2n(1)); writel(0, MDP_CSC_PRE_LV2n(2)); writel(0xff, MDP_CSC_PRE_LV2n(3)); writel(0, MDP_CSC_PRE_LV2n(4)); writel(0xff, MDP_CSC_PRE_LV2n(5)); writel(mdp_plv[0], MDP_CSC_POST_LV2n(0)); writel(mdp_plv[1], MDP_CSC_POST_LV2n(1)); writel(mdp_plv[2], MDP_CSC_POST_LV2n(2)); writel(mdp_plv[3], MDP_CSC_POST_LV2n(3)); writel(mdp_plv[2], MDP_CSC_POST_LV2n(4)); writel(mdp_plv[3], MDP_CSC_POST_LV2n(5)); #endif /* primary forward matrix */ for (i = 0; i < MDP_CCS_SIZE; i++) writel(mdp_ccs_rgb2yuv.ccs[i], MDP_CSC_PFMVn(i)); #ifdef CONFIG_FB_MSM_MDP31 for (i = 0; i < MDP_BV_SIZE; i++) writel(mdp_ccs_rgb2yuv.bv[i], MDP_CSC_POST_BV2n(i)); writel(0, MDP_CSC_PRE_BV2n(0)); writel(0, MDP_CSC_PRE_BV2n(1)); writel(0, MDP_CSC_PRE_BV2n(2)); #endif /* primary reverse matrix */ for (i = 0; i < MDP_CCS_SIZE; i++) writel(mdp_ccs_yuv2rgb.ccs[i], MDP_CSC_PRMVn(i)); for (i = 0; i < MDP_BV_SIZE; i++) writel(mdp_ccs_yuv2rgb.bv[i], MDP_CSC_PRE_BV1n(i)); #ifdef CONFIG_FB_MSM_MDP31 writel(0, MDP_CSC_POST_BV1n(0)); writel(0, MDP_CSC_POST_BV1n(1)); writel(0, MDP_CSC_POST_BV1n(2)); outpdw(MDP_BASE + 0x30010, 0x03e0); outpdw(MDP_BASE + 0x30014, 0x0360); outpdw(MDP_BASE + 0x30018, 0x0120); outpdw(MDP_BASE + 0x3001c, 0x0140); #endif mdp_init_scale_table(); #ifndef CONFIG_FB_MSM_MDP31 MDP_OUTP(MDP_CMD_DEBUG_ACCESS_BASE + 0x0104, ((16 << 6) << 16) | (16) << 6); #endif /* MDP cmd block disable */ mdp_pipe_ctrl(MDP_CMD_BLOCK, MDP_BLOCK_POWER_OFF, FALSE); }