only plug in hdmi use screen scale
authoryzq <yzq@rock-chips.com>
Fri, 16 Nov 2012 07:29:20 +0000 (15:29 +0800)
committeryzq <yzq@rock-chips.com>
Fri, 16 Nov 2012 07:29:20 +0000 (15:29 +0800)
drivers/video/rockchip/hdmi/rk_hdmi_sysfs.c
drivers/video/rockchip/rk_fb.c

index 5dd6fddee913215b6f08327621dbbd4d1da0d699..d4bf8b7e9490fa3b47f14ff481fc3ed9395b2460 100755 (executable)
@@ -110,6 +110,9 @@ static int hdmi_set_scale(struct rk_display_device *device, int direction, int v
        
        if(!hdmi || value < 0 || value > 100)
                return -1;
+
+       if(!hdmi->hotplug)
+               return 0;
                        
        if(direction == DISPLAY_SCALE_X)
                hdmi->xscale = value;
index 3d632eb969f15aae62f4346eb1f61040d6dd23db..5e4822f6e5bba8df58b62b27dac8d38a2fb957a8 100644 (file)
@@ -814,26 +814,14 @@ int rk_fb_disp_scale(u8 scale_x, u8 scale_y,u8 lcdc_id)
        screen_x = dev_drv->cur_screen->x_res;
        screen_y = dev_drv->cur_screen->y_res;
        
-#if defined(CONFIG_ONE_LCDC_DUAL_OUTPUT_INF)||defined(CONFIG_NO_DUAL_DISP)
        if(dev_drv->cur_screen->screen_id == 1){
                dev_drv->cur_screen->xpos = (screen_x-screen_x*scale_x/100)>>1;
                dev_drv->cur_screen->ypos = (screen_y-screen_y*scale_y/100)>>1;
                dev_drv->cur_screen->xsize = screen_x*scale_x/100;
                dev_drv->cur_screen->ysize = screen_y*scale_y/100;
-       }else
-#endif
-       {
-               xpos = (screen_x-screen_x*scale_x/100)>>1;
-               ypos = (screen_y-screen_y*scale_y/100)>>1;
-               xsize = screen_x*scale_x/100;
-               ysize = screen_y*scale_y/100;
-               var->nonstd &= 0xff;
-               var->nonstd |= (xpos<<8) + (ypos<<20);
-               var->grayscale &= 0xff;
-               var->grayscale |= (xsize<<8) + (ysize<<20);     
+               info->fbops->fb_set_par(info);
        }
 
-       info->fbops->fb_set_par(info);
        return 0;