From f99dcc839ea2f34b2c038441d8ae6dab319e5026 Mon Sep 17 00:00:00 2001 From: yzq Date: Fri, 16 Nov 2012 15:29:20 +0800 Subject: [PATCH] only plug in hdmi use screen scale --- drivers/video/rockchip/hdmi/rk_hdmi_sysfs.c | 3 +++ drivers/video/rockchip/rk_fb.c | 14 +------------- 2 files changed, 4 insertions(+), 13 deletions(-) diff --git a/drivers/video/rockchip/hdmi/rk_hdmi_sysfs.c b/drivers/video/rockchip/hdmi/rk_hdmi_sysfs.c index 5dd6fddee913..d4bf8b7e9490 100755 --- a/drivers/video/rockchip/hdmi/rk_hdmi_sysfs.c +++ b/drivers/video/rockchip/hdmi/rk_hdmi_sysfs.c @@ -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; diff --git a/drivers/video/rockchip/rk_fb.c b/drivers/video/rockchip/rk_fb.c index 3d632eb969f1..5e4822f6e5bb 100644 --- a/drivers/video/rockchip/rk_fb.c +++ b/drivers/video/rockchip/rk_fb.c @@ -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; -- 2.34.1