rk29fb:add config FB_SCALING_OSD_1080P for scale UI in 1080p video,
authoryzq <yzq@rock-chips.com>
Sat, 24 Sep 2011 01:57:37 +0000 (09:57 +0800)
committeryzq <yzq@rock-chips.com>
Fri, 7 Oct 2011 10:26:04 +0000 (18:26 +0800)
if enable it,syn android and enable the SCALE_UI_1080P_VIDEO in
  hardware/libhardware/include/hardware/hardware.h

arch/arm/mach-rk29/board-rk29-ddr3sdk.c
drivers/video/Kconfig
drivers/video/rk29_fb.c

index 87762c6050d6702d7bc55f5051fab858b3be14d2..ff7a27e436581a0c884eae2cde2a2a268e84a625 100755 (executable)
 #endif
 #define MEM_FB_SIZE         (9*SZ_1M)
 #ifdef CONFIG_FB_WORK_IPP
+#ifdef CONFIG_FB_SCALING_OSD_1080P
+#define MEM_FBIPP_SIZE      SZ_16M   //1920 x 1080 x 2 x 2  //RGB565 = x2;RGB888 = x4
+#else
 #define MEM_FBIPP_SIZE      SZ_8M   //1920 x 1080 x 2 x 2  //RGB565 = x2;RGB888 = x4
+#endif
 #else
 #define MEM_FBIPP_SIZE      0
 #endif
index 68df978a8008e47c8a9b5607a27cf96411c226e6..d763582661ec3fbad5a6c644b8714ba7cf126f90 100755 (executable)
@@ -1958,6 +1958,12 @@ config FB_SCALING_OSD
        ---help---
           this function be used scale-up UI when video, it only support RGB565 UI;
 
+config FB_SCALING_OSD_1080P
+       bool "fb scale OSD support when video playing in 1080P "
+       depends on FB_WORK_IPP && FB_SCALING_OSD
+       ---help---
+          this function be used scale-up UI when video, it only support RGB565 UI;
+          should set SCALE_UI_1080P_VIDEO to 1 in android
 config FB_ROTATE_VIDEO
        bool "fb video rotate support"
        depends on FB_WORK_IPP
index 9f57ad6a424caaf6befc97880058a694cb8392ed..12a55d8fe762aa957b816e2e80d37cc60308994f 100755 (executable)
@@ -1272,14 +1272,20 @@ static int win1_set_par(struct fb_info *info)
     cancel_delayed_work_sync(&rk29_win1_check_work);
  #endif   
     if(((screen->x_res != var->xres) || (screen->y_res != var->yres))
-        && !((screen->x_res>1280) && (var->bits_per_pixel == 32)))
+           #ifndef     CONFIG_FB_SCALING_OSD_1080P
+            && !((screen->x_res>1280) && (var->bits_per_pixel == 32))
+               #endif
+               )
     {
         hdmi_set_fbscale(info);
-    }else  if(((screen->x_res==1920) ))
+    }
+               #ifndef CONFIG_FB_SCALING_OSD_1080P
+               else  if(((screen->x_res==1920) ))
     {
        if(hdmi_get_fbscale() < 100)
                        par->ypos -=screen->y_res * (100-hdmi_get_fbscale()) / 200;
        }
+               #endif
     //u32 offset=0, addr=0, map_size=0, smem_len=0;
     addr=0;
     xres_virtual = 0;      //virtual screen size
@@ -1297,7 +1303,10 @@ static int win1_set_par(struct fb_info *info)
 
    #ifdef CONFIG_FB_SCALING_OSD
     if(((screen->x_res != var->xres) || (screen->y_res != var->yres)) 
-            && (screen->x_res<=1280))
+        #ifndef        CONFIG_FB_SCALING_OSD_1080P
+            && (screen->x_res<=1280)
+               #endif
+               )
     {
         addr = fix->mmio_start + par->y_offset* hdmi_get_fbscale()/100;
         xres_virtual = screen->x_res* hdmi_get_fbscale()/100;      //virtual screen size
@@ -1359,7 +1368,10 @@ static int win1_pan( struct fb_info *info )
     struct rk29fb_screen *screen = inf->cur_screen;
     struct fb_var_screeninfo *var = &info->var;
     if(((screen->x_res != var->xres) || (screen->y_res != var->yres)) 
-            && (screen->x_res<=1280))
+        #ifndef        CONFIG_FB_SCALING_OSD_1080P
+            && (screen->x_res<=1280)
+               #endif
+               )
     {
         addr = fix1->mmio_start + par->y_offset* hdmi_get_fbscale()/100;
     }
@@ -1552,7 +1564,10 @@ static int fb0_set_par(struct fb_info *info)
     {
         #ifdef CONFIG_FB_SCALING_OSD
         if(((screen->x_res != var->xres) || (screen->y_res != var->yres)) 
-            && (screen->x_res<=1280))
+               #ifndef CONFIG_FB_SCALING_OSD_1080P
+            && (screen->x_res<=1280)
+               #endif
+               )
         {
             par->xpos = 0;
             par->ypos = 0;
@@ -1668,7 +1683,10 @@ static int fb0_pan_display(struct fb_var_screeninfo *var, struct fb_info *info)
     {
         #ifdef CONFIG_FB_SCALING_OSD
         if(((screen->x_res != var->xres) || (screen->y_res != var->yres)) 
-            && (screen->x_res<=1280))
+        #ifndef        CONFIG_FB_SCALING_OSD_1080P
+            && (screen->x_res<=1280)
+               #endif
+               )
         {
             par->y_offset = dstoffset;
 
@@ -2236,6 +2254,7 @@ int fb1_release(struct fb_info *info, int user)
         par->par_seted = 0;
         par->addr_seted = 0;
         win1_blank(FB_BLANK_NORMAL, info);
+
         //if(inf->cur_screen->type != SCREEN_HDMI)
             fb0_set_par(inf->fb0);