#include <linux/hdmi.h>
#endif
+
#include <mach/iomux.h>
#include <mach/gpio.h>
#include "./display/screen/screen.h"
+#ifdef CONFIG_MFD_RK610
+#include "./display/lcd/rk610_lcd.h"
+#endif
#define ANDROID_USE_THREE_BUFS 0 //android use three buffers to accelerate UI display in rgb plane
#define CURSOR_BUF_SIZE 256 //RK2818 cursor need 256B buf
int rk29_cursor_buf[CURSOR_BUF_SIZE];
{
return blocking_notifier_call_chain(&rk29fb_notifier_list, event, inf->cur_screen);
}
+void rk29_lcd_set(bool on)
+{
+ struct rk29fb_info *mach_info = g_pdev->dev.platform_data;
+ if(on == 1 &&mach_info->io_enable)
+ mach_info->io_enable(); //open lcd out
+ else if(mach_info->io_disable)
+ mach_info->io_disable(); //close lcd out
+}
int mcu_do_refresh(struct rk29fb_inf *inf)
{
if(inf->mcu_stopflush) return 0;
if(inf->cur_screen->standby) inf->cur_screen->standby(1);
// operate the display_on pin to power down the lcd
-
+#ifdef CONFIG_HDMI_DUAL_DISP
+ if(inf->panel1_info.sscreen_get!=NULL)
+ inf->panel1_info.sscreen_get(&inf->panel1_info,inf->panel2_info.hdmi_resolution);
+ else
+ printk("warnig : LCD driver do not support dual display");
+ if(inf->panel1_info.sscreen_set!=NULL)
+ inf->panel1_info.sscreen_set(&inf->panel1_info,enable);
+ else
+ printk("warnig : LCD driver do not support dual display");
+#else
if(enable && mach_info->io_disable)mach_info->io_disable(); //close lcd out
else if (mach_info->io_enable)mach_info->io_enable(); //open lcd out
-
+#endif
load_screen(inf->fb0, 0);
mcu_refresh(inf);
fb0_set_par(inf->fb0);
LcdMskReg(inf, DSP_CTRL1, m_BLACK_MODE, v_BLACK_MODE(0));
LcdWrReg(inf, REG_CFG_DONE, 0x01);
+
rk29fb_notify(inf, enable ? RK29FB_EVENT_HDMI_ON : RK29FB_EVENT_HDMI_OFF);
return 0;
}
#ifdef CONFIG_CLOSE_WIN1_DYNAMIC
cancel_delayed_work_sync(&rk29_win1_check_work);
#endif
-
+#ifdef CONFIG_HDMI_DUAL_DISP
+ if(mach_info->io_disable) // close lcd pwr when output screen is lcd
+ mach_info->io_disable(); //close lcd out
+#else
if((inf->cur_screen != &inf->panel2_info) && mach_info->io_disable) // close lcd pwr when output screen is lcd
mach_info->io_disable(); //close lcd out
-
+#endif
if(inf->cur_screen->standby)
{
fbprintk(">>>>>> power down the screen! \n");
usleep_range(10*1000, 10*1000);
memcpy((u8*)inf->preg, (u8*)&inf->regbak, 0xa4); //resume reg
usleep_range(40*1000, 40*1000);
-
+ #ifdef CONFIG_HDMI_DUAL_DISP
+ if(mach_info->io_enable) // open lcd pwr when output screen is lcd
+ mach_info->io_enable(); //close lcd out
+ #else
if((inf->cur_screen != &inf->panel2_info) && mach_info->io_enable) // open lcd pwr when output screen is lcd
mach_info->io_enable(); //close lcd out
-
+ #endif
}
static struct suspend_info suspend_info = {
#else
set_lcd_info(&inf->panel1_info, mach_info->lcd_info);
#endif
+
inf->cur_screen = &inf->panel1_info;
screen = inf->cur_screen;
if(SCREEN_NULL==screen->type)
goto release_irq;
}
}
-
+ #ifdef CONFIG_MFD_RK610
+ rk610_lcd_scaler_set_param(&inf->panel1_info,0);
+ #endif
#if !defined(CONFIG_FRAMEBUFFER_CONSOLE) && defined(CONFIG_LOGO)
fb0_set_par(inf->fb0);
if (fb_prepare_logo(inf->fb0, FB_ROTATE_UR)) {