mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-09 12:17:12 +09:00
only plug in hdmi use screen scale
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user