In video mode change to PIXEL_FORMAT_RGB_565
authorroot <root@huangds-desktop.(none)>
Wed, 9 Mar 2011 08:27:27 +0000 (16:27 +0800)
committerroot <root@huangds-desktop.(none)>
Wed, 9 Mar 2011 08:27:27 +0000 (16:27 +0800)
drivers/video/rk29_fb.c
include/linux/fb.h

index 08ed5bc01f85aebd5dd6c6d5af3f92329e3169fd..f4a6432ee698ca0be7c0f9c2429067914d65d977 100755 (executable)
@@ -469,7 +469,7 @@ int init_lcdc(struct fb_info *info)
        // set AHB access rule and disable all windows
     LcdWrReg(inf, SYS_CONFIG, 0x60000000);
     LcdWrReg(inf, SWAP_CTRL, 0);
-    LcdWrReg(inf, FIFO_WATER_MARK, 0x00000864);//68
+    LcdWrReg(inf, FIFO_WATER_MARK, 0x00000862);//68
     LcdWrReg(inf, AXI_MS_ID, 0x54321);
 
        // and mcu holdmode; and set win1 top.
@@ -1452,6 +1452,9 @@ static int fb0_ioctl(struct fb_info *info, unsigned int cmd, unsigned long arg)
            break;
        case FBIOPUT_FBPHYADD:
         return info->fix.smem_start;
+   case FBIOGET_OVERLAY_STATE:
+        return inf->video_mode;
+
        case FBIOPUT_SET_CURSOR_EN:
                {
                        int en;
@@ -1777,7 +1780,7 @@ int fb1_open(struct fb_info *info, int user)
     par->addr_seted = 0;
     inf->video_mode = 1;
     wq_condition2 = 1;
-
+    memset(inf->fb0->screen_base, 0, inf->fb0->fix.smem_len);
     if(par->refcount) {
         printk(">>>>>> fb1 has opened! \n");
         return -EACCES;
index 54ce1d9883b64cb4da74c6e393ff12de53712217..74595389f4efbdb8bc331903e1755eeb40b35687 100755 (executable)
@@ -26,6 +26,7 @@ struct dentry;
 #define FBIOPUT_SET_CURSOR_CMAP    0x460c
 #define FBIOPUT_GET_CURSOR_RESOLUTION    0x460d
 #define FBIOPUT_GET_CURSOR_EN    0x460e
+#define FBIOGET_OVERLAY_STATE 0X460f
 #ifdef __KERNEL__
 #define FBIO_CURSOR            _IOWR('F', 0x08, struct fb_cursor_user)
 #else