disable the lcdc which HDMI is used when the HDMI unplug
authoryxj <yxj@rock-chips.com>
Wed, 2 May 2012 09:27:11 +0000 (17:27 +0800)
committeryxj <yxj@rock-chips.com>
Wed, 2 May 2012 09:29:37 +0000 (17:29 +0800)
drivers/video/rockchip/rk_fb.c

index 380a67d5295ca968499efb213d646e07e6ea605c..c8454cab3790a81e4f4322c9a3e128e823a63615 100644 (file)
@@ -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;