From: yxj Date: Wed, 2 May 2012 09:27:11 +0000 (+0800) Subject: disable the lcdc which HDMI is used when the HDMI unplug X-Git-Tag: firefly_0821_release~9275 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=4953aacb214688c705616ce8b0962b2d1b5a51fa;p=firefly-linux-kernel-4.4.55.git disable the lcdc which HDMI is used when the HDMI unplug --- diff --git a/drivers/video/rockchip/rk_fb.c b/drivers/video/rockchip/rk_fb.c index 380a67d5295c..c8454cab3790 100644 --- a/drivers/video/rockchip/rk_fb.c +++ b/drivers/video/rockchip/rk_fb.c @@ -595,6 +595,7 @@ int rk_fb_switch_screen(rk_screen *screen ,int enable ,int lcdc_id) char name[6]; int ret; int i; + int layer_id; sprintf(name, "lcdc%d",lcdc_id); for(i = 0; i < inf->num_lcdc; i++) { @@ -612,6 +613,7 @@ int rk_fb_switch_screen(rk_screen *screen ,int enable ,int lcdc_id) } + if((lcdc_id == 0) || (inf->num_lcdc == 1)) { info = inf->fb[0]; @@ -620,6 +622,12 @@ int rk_fb_switch_screen(rk_screen *screen ,int enable ,int lcdc_id) { info = inf->fb[2]; } + + layer_id = get_fb_layer_id(&info->fix); + if(!enable) + { + dev_drv->open(dev_drv,layer_id,enable); //disable the layer which attached to this fb + } hdmi_var = &info->var; hdmi_fix = &info->fix;