mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-09 12:17:12 +09:00
update fb suspend for disable slow mode
This commit is contained in:
12
drivers/video/rk29_fb.c
Executable file → Normal file
12
drivers/video/rk29_fb.c
Executable file → Normal file
@@ -33,7 +33,7 @@
|
||||
#include <linux/wait.h>
|
||||
#include <linux/earlysuspend.h>
|
||||
#include <linux/cpufreq.h>
|
||||
|
||||
#include <linux/wakelock.h>
|
||||
|
||||
#include <asm/io.h>
|
||||
#include <asm/div64.h>
|
||||
@@ -226,6 +226,7 @@ static int wq_condition2 = 0;
|
||||
#if ANDROID_USE_THREE_BUFS
|
||||
static int new_frame_seted = 1;
|
||||
#endif
|
||||
static struct wake_lock idlelock; /* only for fb */
|
||||
|
||||
void set_lcd_pin(struct platform_device *pdev, int enable)
|
||||
{
|
||||
@@ -271,7 +272,7 @@ int mcu_do_refresh(struct rk29fb_inf *inf)
|
||||
// not use frame mark
|
||||
if(LcdReadBit(inf, MCU_TIMING_CTRL, m_MCU_HOLDMODE_SELECT))
|
||||
{
|
||||
if(!LcdReadBit(inf, MCU_TIMING_CTRL, m_MCU_HOLD_STATUS))
|
||||
if(!LcdReadBit(inf, MCU_TIMING_CTRL, m_MCU_HOLDMODE_FRAME_ST))
|
||||
{
|
||||
inf->mcu_needflush = 1;
|
||||
}
|
||||
@@ -1758,7 +1759,9 @@ int FB_Switch_Screen( struct rk29fb_screen *screen, u32 enable )
|
||||
// LcdMskReg(inf, SYS_CONFIG, m_W1_ENABLE, v_W1_ENABLE(0));
|
||||
LcdMskReg(inf, DSP_CTRL1, m_BLACK_MODE, v_BLACK_MODE(1));
|
||||
LcdWrReg(inf, REG_CFG_DONE, 0x01);
|
||||
wake_lock(&idlelock);
|
||||
msleep(20);
|
||||
wake_unlock(&idlelock);
|
||||
|
||||
if(inf->cur_screen->standby) inf->cur_screen->standby(1);
|
||||
// operate the display_on pin to power down the lcd
|
||||
@@ -1827,7 +1830,7 @@ static irqreturn_t rk29fb_irq(int irq, void *dev_id)
|
||||
|
||||
if(IsMcuUseFmk())
|
||||
{
|
||||
if(LcdReadBit(inf, MCU_TIMING_CTRL, m_MCU_HOLD_STATUS) && (inf->mcu_fmksync == 0))
|
||||
if(LcdReadBit(inf, MCU_TIMING_CTRL, m_MCU_HOLDMODE_FRAME_ST) && (inf->mcu_fmksync == 0))
|
||||
{
|
||||
inf->mcu_fmksync = 1;
|
||||
if(inf->cur_screen->refresh)
|
||||
@@ -1916,7 +1919,9 @@ static void rk29fb_suspend(struct early_suspend *h)
|
||||
if(!inf->in_suspend)
|
||||
{
|
||||
fbprintk(">>>>>> diable the lcdc clk! \n");
|
||||
wake_lock(&idlelock);
|
||||
msleep(100);
|
||||
wake_unlock(&idlelock);
|
||||
clk_disable(inf->aclk_ddr_lcdc);
|
||||
clk_disable(inf->aclk_disp_matrix);
|
||||
clk_disable(inf->hclk_cpu_display);
|
||||
@@ -2426,6 +2431,7 @@ static struct platform_driver rk29fb_driver = {
|
||||
|
||||
static int __init rk29fb_init(void)
|
||||
{
|
||||
wake_lock_init(&idlelock, WAKE_LOCK_IDLE, "fb");
|
||||
return platform_driver_register(&rk29fb_driver);
|
||||
}
|
||||
|
||||
|
||||
@@ -126,7 +126,6 @@
|
||||
#define m_MCU_CS_END (31<<10)
|
||||
#define m_MCU_RW_ST (31<<15)
|
||||
#define m_MCU_RW_END (31<<20)
|
||||
#define m_MCU_HOLD_STATUS (1<<26)
|
||||
#define m_MCU_HOLDMODE_SELECT (1<<27)
|
||||
#define m_MCU_HOLDMODE_FRAME_ST (1<<28)
|
||||
#define m_MCU_RS_SELECT (1<<29)
|
||||
|
||||
Reference in New Issue
Block a user