"fb:reinit the vars when opening the fb1."
authorzyc <zyc@rock-chips.com>
Tue, 14 Jun 2011 04:48:25 +0000 (21:48 -0700)
committerzyc <zyc@rock-chips.com>
Tue, 14 Jun 2011 04:58:23 +0000 (21:58 -0700)
1. 解决旋转情况下,预览过程中,按下power键休眠,唤醒时显示异常
2. 解决旋转情况下播放视频,切换上下曲时有时会花屏一下

drivers/video/rk29_fb.c [changed mode: 0644->0755]

old mode 100644 (file)
new mode 100755 (executable)
index 714dda6..791b87b
@@ -1888,7 +1888,7 @@ static int fb1_set_par(struct fb_info *info)
 
 #if CONFIG_FB_ROTATE_VIDEO
 //need refresh ,zyc add                
-       if(has_set_rotate == true)
+       if((has_set_rotate == true) && (last_yuv_phy[0] != 0) && (last_yuv_phy[1] != 0))
        {
                u32 yuv_phy[2];
                struct rk29_ipp_req ipp_req;
@@ -1987,6 +1987,12 @@ int fb1_open(struct fb_info *info, int user)
     par->addr_seted = 0;
     inf->video_mode = 1;
     wq_condition2 = 1;
+#if CONFIG_FB_ROTATE_VIDEO
+   //reinitialize  the var when open,zyc
+    last_yuv_phy[0] = 0;
+    last_yuv_phy[1] = 0;
+    has_set_rotate = 0;
+#endif
     if(par->refcount) {
         printk(">>>>>> fb1 has opened! \n");
         return -EACCES;