update gc830 driver
author杜坤明 <dkm@rock-chips.com>
Mon, 6 Dec 2010 12:31:24 +0000 (20:31 +0800)
committer杜坤明 <dkm@rock-chips.com>
Mon, 6 Dec 2010 12:31:24 +0000 (20:31 +0800)
drivers/staging/rk29/vivante/arch/XAQ2/hal/kernel/gc_hal_kernel_hardware.c
drivers/staging/rk29/vivante/hal/os/linux/kernel/gc_hal_kernel_debug.c
drivers/staging/rk29/vivante/hal/os/linux/kernel/gc_hal_kernel_os.c
drivers/video/rk29_fb.c

index 1e2d1cb98d5bb784e0e61db21310c4d7052eb817..6d6b22f9910c72ddf6f6cd94b5c05b08e1883265 100644 (file)
@@ -2793,7 +2793,7 @@ gckHARDWARE_SetPowerManagementState(
     IN gceCHIPPOWERSTATE State
     )
 {
-#if 0
+#if 1
 #if !gcdNO_POWER_MANAGEMENT
     gceSTATUS status;
     gckCOMMAND command = gcvNULL;
index 9e8bb14aa0892b0015c9d6e884cba090a63a7379..078a1c7d9ddde806ecd4058d6f0d17195e788c2d 100644 (file)
@@ -39,7 +39,7 @@
 \******************************************************************************/
 
 static gceSTATUS  _lastError  = gcvSTATUS_OK;
-static gctUINT32  _debugLevel = gcvLEVEL_NONE;
+static gctUINT32  _debugLevel = gcvLEVEL_ERROR;
 static gctUINT32  _debugZones = gcvZONE_NONE;
 static gctINT     _indent     = 0;
 static spinlock_t _lock       = SPIN_LOCK_UNLOCKED;
index 9f63033c05ceda6cbde5c554f531269457a8bab2..bfa68b81f092556777c35a7469ca6ef548663680 100644 (file)
@@ -5330,7 +5330,6 @@ gckOS_Broadcast(
         gcmkONERROR(
             gckHARDWARE_SetPowerManagementState(Hardware,
                                                 gcvPOWER_OFF_BROADCAST));
-
         break;
 
     case gcvBROADCAST_GPU_IDLE:
@@ -5340,7 +5339,6 @@ gckOS_Broadcast(
         gcmkONERROR(
             gckHARDWARE_SetPowerManagementState(Hardware,
                                                 gcvPOWER_IDLE_BROADCAST));
-
         break;
 
     case gcvBROADCAST_GPU_COMMIT:
index 5b085f6ac061baaf549e856dd677d608946a91e6..b48129bbd0ba6b7b433558de62ac590f4b8dcf66 100755 (executable)
@@ -53,6 +53,8 @@
 
 #include "./display/screen/screen.h"
 
+#define ANDROID_USE_THREE_BUFS  0       //android use three buffers to accelerate UI display in rgb plane
+
 #if 0
        #define fbprintk(msg...)        printk(msg);
 #else
@@ -189,6 +191,10 @@ static int win1fb_set_par(struct fb_info *info);
 static DECLARE_WAIT_QUEUE_HEAD(wq);
 static int wq_condition = 0;
 
+#if ANDROID_USE_THREE_BUFS
+static int new_frame_seted = 1;
+#endif
+
 void set_lcd_pin(struct platform_device *pdev, int enable)
 {
        struct rk29fb_info *mach_info = pdev->dev.platform_data;
@@ -1366,6 +1372,14 @@ static int win1fb_set_par(struct fb_info *info)
 
     addr = fix->smem_start + offset;
 
+#if ANDROID_USE_THREE_BUFS
+    if(0==new_frame_seted) {
+        wq_condition = 0;
+        wait_event_interruptible_timeout(wq, wq_condition, HZ/20);
+    }
+    new_frame_seted = 0;
+#endif
+
     LcdMskReg(inf, SYS_CONFIG, m_W1_ENABLE|m_W1_FORMAT, v_W1_ENABLE(1)|v_W1_FORMAT(format));
 
     xpos += (screen->left_margin + screen->hsync_len);
@@ -1436,6 +1450,7 @@ static int win1fb_pan_display(struct fb_var_screeninfo *var, struct fb_info *inf
 
        mcu_refresh(inf);
 
+#if !ANDROID_USE_THREE_BUFS
     // flush end when wq_condition=1 in mcu panel, but not in rgb panel
     if(SCREEN_MCU == inf->cur_screen->type) {
         wait_event_interruptible_timeout(wq, wq_condition, HZ/20);
@@ -1444,6 +1459,7 @@ static int win1fb_pan_display(struct fb_var_screeninfo *var, struct fb_info *inf
         wq_condition = 0;
         wait_event_interruptible_timeout(wq, wq_condition, HZ/20);
     }
+#endif
 
 #if 0
     for(i=0;i<=(0xc0/4);i+=4)
@@ -1589,6 +1605,10 @@ static irqreturn_t rk29fb_irq(int irq, void *dev_id)
         }
        }
 
+#if ANDROID_USE_THREE_BUFS
+    new_frame_seted = 1;
+#endif
+
        wq_condition = 1;
        wake_up_interruptible(&wq);