modify UI error in camena DC and DV change
authorhuangdesheng <root@huangds-desktop.(none)>
Wed, 24 Aug 2011 03:00:20 +0000 (11:00 +0800)
committerhuangdesheng <root@huangds-desktop.(none)>
Wed, 24 Aug 2011 03:00:20 +0000 (11:00 +0800)
drivers/video/rk29_fb.c
include/linux/fb.h

index d01c6df1991f9876887817069dd4ed487bd015bf..f5d8be3261eb86a8f4404f48641a0bde3e91064b 100755 (executable)
@@ -270,6 +270,8 @@ static struct wake_lock idlelock; /* only for fb */
 static bool has_set_rotate; 
 static u32 last_yuv_phy[2] = {0,0};
 #endif
+int fb0_first_buff_bits = 32;
+int fb0_second_buff_bits = 32;
 
 static BLOCKING_NOTIFIER_HEAD(rk29fb_notifier_list);
 int rk29fb_register_notifier(struct notifier_block *nb)
@@ -1439,6 +1441,11 @@ static int fb0_set_par(struct fb_info *info)
     {
     case 16:    // rgb565
         par->format = 1;
+         if( ypos_virtual == 0)
+            fb0_first_buff_bits = 16;
+        else
+            fb0_second_buff_bits = 16;
+
         //fix->line_length = 2 * xres_virtual;
         fix->line_length = (inf->fb0_color_deepth ? 4:2) * xres_virtual;   //32bit and 16bit change
 
@@ -1452,6 +1459,10 @@ static int fb0_set_par(struct fb_info *info)
     case 32:    // rgb888
     default:
         par->format = 0;
+         if( ypos_virtual == 0)
+            fb0_first_buff_bits = 32;
+        else
+            fb0_second_buff_bits = 32;
         fix->line_length = 4 * xres_virtual;
         #ifdef CONFIG_FB_SCALING_OSD
         dstoffset = ((ypos_virtual*screen->y_res/var->yres) *screen->x_res + (xpos_virtual*screen->x_res)/var->xres )*4;
@@ -1648,6 +1659,17 @@ static int fb0_ioctl(struct fb_info *info, unsigned int cmd, unsigned long arg)
         inf->fb0_color_deepth = arg;
 
            break;
+       case FBIOGET_16OR32:
+           return  inf->fb0_color_deepth;
+       case FBIOGET_IDLEFBUff_16OR32:
+        if(info->var.yoffset == 0)
+        {
+            return fb0_second_buff_bits;
+        }
+        else
+        {
+            return fb0_first_buff_bits;
+        }
        case FBIOPUT_FBPHYADD:
         return info->fix.smem_start;
     case FBIOGET_OVERLAY_STATE:
index 6181f1baafa7606b5dd06f0a995ebd6cdbd4d0aa..4463d75862ea647a7b09a806bbe9549323e1b69c 100755 (executable)
@@ -47,7 +47,8 @@ struct dentry;
 #define FBIOGET_DISPINFO        0x4618
 #define FBIOGET_OVERLAY_STATE   0X4619
 #define FBIOGET_SCREEN_STATE    0X4620
-
+#define FBIOGET_16OR32    0X4621
+#define FBIOGET_IDLEFBUff_16OR32    0X4622
 
 #define FB_TYPE_PACKED_PIXELS          0       /* Packed Pixels        */
 #define FB_TYPE_PLANES                 1       /* Non interleaved planes */