From: yzq Date: Sat, 24 Sep 2011 01:57:37 +0000 (+0800) Subject: rk29fb:add config FB_SCALING_OSD_1080P for scale UI in 1080p video, X-Git-Tag: firefly_0821_release~9766^2~39^2~2 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=cb96f0b048059610ccc946d0b08f635e31be2f87;p=firefly-linux-kernel-4.4.55.git rk29fb:add config FB_SCALING_OSD_1080P for scale UI in 1080p video, if enable it,syn android and enable the SCALE_UI_1080P_VIDEO in hardware/libhardware/include/hardware/hardware.h --- diff --git a/arch/arm/mach-rk29/board-rk29-ddr3sdk.c b/arch/arm/mach-rk29/board-rk29-ddr3sdk.c index 87762c6050d6..ff7a27e43658 100755 --- a/arch/arm/mach-rk29/board-rk29-ddr3sdk.c +++ b/arch/arm/mach-rk29/board-rk29-ddr3sdk.c @@ -112,7 +112,11 @@ #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 diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig index 68df978a8008..d763582661ec 100755 --- a/drivers/video/Kconfig +++ b/drivers/video/Kconfig @@ -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 diff --git a/drivers/video/rk29_fb.c b/drivers/video/rk29_fb.c index 9f57ad6a424c..12a55d8fe762 100755 --- a/drivers/video/rk29_fb.c +++ b/drivers/video/rk29_fb.c @@ -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);