示例#1
0
/*
 *  Suspend
 */
int s5p_tv_suspend(struct platform_device *dev, pm_message_t state)
{
	/* video layer stop */
        if ( s5ptv_status.vp_layer_enable ) {
	//__s5p_vm_save_reg();
	_s5p_vlayer_stop();
                s5ptv_status.vp_layer_enable = true;
        }
        if ( s5ptv_status.grp_layer_enable[0] ) {
                _s5p_grp_stop(VM_GPR0_LAYER);
                s5ptv_status.grp_layer_enable[VM_GPR0_LAYER] = true;
        }
        if ( s5ptv_status.grp_layer_enable[1] ) {
                _s5p_grp_stop(VM_GPR1_LAYER);
                s5ptv_status.grp_layer_enable[VM_GPR0_LAYER] = true;
        }
        if ( s5ptv_status.tvout_output_enable ) {
	_s5p_tv_if_stop();
                s5ptv_status.tvout_output_enable = true;
                s5ptv_status.tvout_param_available = true;
        }
        s5p_tv_clk_gate( false );
        //tv_phy_power( false );

	return 0;
}
示例#2
0
/*
 *  Suspend
 */
int s5p_tv_early_suspend(struct platform_device *dev, pm_message_t state)
{
    BASEPRINTK("(hpd_status = %d)++\n", s5ptv_status.hpd_status);

    mutex_lock(mutex_for_fo);
    s5ptv_status.suspend_status = true;

    if(!(s5ptv_status.hpd_status))
    {
	    mutex_unlock(mutex_for_fo);
	    return 0;
    }
    else
    {
	    /* video layer stop */
	    if ( s5ptv_status.vp_layer_enable ) {
		    _s5p_vlayer_stop();
		    s5ptv_status.vp_layer_enable = true;

	    }

	    /* grp0 layer stop */
	    if ( s5ptv_status.grp_layer_enable[0] ) {
		    _s5p_grp_stop(VM_GPR0_LAYER);
		    s5ptv_status.grp_layer_enable[VM_GPR0_LAYER] = true;
	    }

	    /* grp1 layer stop */
	    if ( s5ptv_status.grp_layer_enable[1] ) {
		    _s5p_grp_stop(VM_GPR1_LAYER);
		    s5ptv_status.grp_layer_enable[VM_GPR0_LAYER] = true;
	    }

	    if(s5ptv_status.tvout_param.out_mode == TVOUT_OUTPUT_HDMI || s5ptv_status.tvout_param.out_mode == TVOUT_OUTPUT_HDMI_RGB
			|| s5ptv_status.tvout_param.out_mode == TVOUT_OUTPUT_DVI)
		    tv_phy_power( false );
	    
	   
	    /* tv off */
	    if ( s5ptv_status.tvout_output_enable ) {
		    _s5p_tv_if_stop();
		    s5ptv_status.tvout_output_enable = true;
		    s5ptv_status.tvout_param_available = true;
	    }

	    /* clk & power off */
	    s5p_tv_clk_gate( false );


#ifdef CONFIG_CPU_FREQ_S5PV210
	    s5pv210_set_cpufreq_level(NORMAL_TABLE);
#endif /* CONFIG_CPU_FREQ_S5PV210 */
    }

    mutex_unlock(mutex_for_fo);
    BASEPRINTK("()--\n");
    return 0;
}
示例#3
0
/*
 *  Suspend
 */
int s5p_tv_early_suspend(struct platform_device *dev, pm_message_t state)
{
    BASEPRINTK("(hpd_status = %d)++\n", s5ptv_status.hpd_status);

    mutex_lock(mutex_for_fo);
    s5ptv_status.suspend_status = true;

    if(!(s5ptv_status.hpd_status))
    {
	    mutex_unlock(mutex_for_fo);
	    return 0;
    }
    else
    {
	    /* video layer stop */
	    if ( s5ptv_status.vp_layer_enable ) {
		    _s5p_vlayer_stop();
		    s5ptv_status.vp_layer_enable = true;

	    }

	    /* grp0 layer stop */
	    if ( s5ptv_status.grp_layer_enable[0] ) {
		    _s5p_grp_stop(VM_GPR0_LAYER);
		    s5ptv_status.grp_layer_enable[VM_GPR0_LAYER] = true;
	    }

	    /* grp1 layer stop */
	    if ( s5ptv_status.grp_layer_enable[1] ) {
		    _s5p_grp_stop(VM_GPR1_LAYER);
		    s5ptv_status.grp_layer_enable[VM_GPR0_LAYER] = true;
	    }

	    /* tv off */
	    if ( s5ptv_status.tvout_output_enable ) {
		    _s5p_tv_if_stop();
		    s5ptv_status.tvout_output_enable = true;
		    s5ptv_status.tvout_param_available = true;
	    }

#ifdef CONFIG_PM_PWR_GATING
	    /* clk & power off */
	    s5p_tv_clk_gate( false );
	    if(s5ptv_status.tvout_param.out_mode == TVOUT_OUTPUT_HDMI || s5ptv_status.tvout_param.out_mode == TVOUT_OUTPUT_HDMI_RGB)
		    tv_phy_power( false );
#endif
#if 0
#ifdef CONFIG_CPU_FREQ
	    s5pc110_unlock_dvfs_high_level(DVFS_LOCK_TOKEN_4);
#endif
#endif    
    }

    mutex_unlock(mutex_for_fo);
    BASEPRINTK("()--\n");
    return 0;
}
示例#4
0
/*
 *  Suspend
 */
void s5p_tv_early_suspend(struct early_suspend *h)
{
	BASEPRINTK("%s----------------start \n", __func__);

	mutex_lock(mutex_for_fo);
	s5ptv_status.suspend_status = true;

	if (!(s5ptv_status.hpd_status)) {
		printk(KERN_INFO "(hpd_status = %d)++\n", \
				s5ptv_status.hpd_status);
		mutex_unlock(mutex_for_fo);
		return ;
	} else  {
		/* video layer stop */
		if (s5ptv_status.vp_layer_enable) {
			_s5p_vlayer_stop();
			s5ptv_status.vp_layer_enable = true;
		}

		/* grp0 layer stop */
		if (s5ptv_status.grp_layer_enable[0]) {
			_s5p_grp_stop(VM_GPR0_LAYER);
			s5ptv_status.grp_layer_enable[VM_GPR0_LAYER] = true;
		}

		/* grp1 layer stop */
		if (s5ptv_status.grp_layer_enable[1]) {
			_s5p_grp_stop(VM_GPR1_LAYER);
			s5ptv_status.grp_layer_enable[VM_GPR0_LAYER] = true;
		}

		/* tv off */
		if (s5ptv_status.tvout_output_enable) {
			_s5p_tv_if_stop();
			s5ptv_status.tvout_output_enable = true;
			s5ptv_status.tvout_param_available = true;
		}

		/* clk & power off */
		s5p_tv_clk_gate(false);
		if ((s5ptv_status.tvout_param.out_mode == TVOUT_OUTPUT_HDMI) ||\
		(s5ptv_status.tvout_param.out_mode == TVOUT_OUTPUT_HDMI_RGB))
			tv_phy_power(false);

#ifdef CONFIG_CPU_FREQ_S5PV210
		s5pv210_set_cpufreq_level(NORMAL_TABLE);
#endif /* CONFIG_CPU_FREQ_S5PV210 */
	}

	mutex_unlock(mutex_for_fo);
	BASEPRINTK("()--\n");
	return ;
}
示例#5
0
/* start overlay * */
static int s5p_tv_v4l2_overlay(struct file *file, void *fh, unsigned int i)
{
	struct s5p_tv_vo *layer = (struct s5p_tv_vo *)fh;
	int	start = i;
	V4L2PRINTK("(0x%08x)++\n", i);

	/* tv dirver is on suspend mode
	   Just set the status variable on this function
	   overlay will be enabled or disabled on resume or
	   handle_cable function according to this status variable*/
	if (s5ptv_status.suspend_status == true || !(s5ptv_status.hpd_status)) {
		if (start)
			s5ptv_status.grp_layer_enable[layer->index] = true;
		else
			s5ptv_status.grp_layer_enable[layer->index] = false;

	    V4L2PRINTK("()it's on suspend mode or hdmi cable is not inserted--\n");
		return 0;
            
    }   
    else
    {
		if (start)
			_s5p_grp_start(layer->index);
		else
			_s5p_grp_stop(layer->index);
	}


	V4L2PRINTK("()--\n");
	return 0;
}
示例#6
0
int vo_release(int layer, struct file *filp)
{

	_s5p_grp_stop(layer);

	return 0;
}
示例#7
0
static int s5p_tv_v4l2_streamoff(struct file *file, void *fh,
	enum v4l2_buf_type i)
{
	struct s5p_tv_vo *layer = (struct s5p_tv_vo *)fh;

	V4L2PRINTK("(0x%08x)++\n", i);

    // tv driver is on suspend mode or hdmi cable is not inserted 
    // Each layer was disabled on suspend function already. 
    // Just set the status variable on this function 
    // Each layer will be enabled or disabled on resume or handle_cable function according to this status variable
    if( s5ptv_status.suspend_status == true || !(s5ptv_status.hpd_status))
    {
        switch (i) {
            // Vlayer

            case V4L2_BUF_TYPE_VIDEO_OUTPUT :
                s5ptv_status.vp_layer_enable = false;
                break;
                // GRP0/1

            case V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY :
                s5ptv_status.grp_layer_enable[layer->index] = false;
                break;

            default :
                break;
        }
	    V4L2PRINTK("()it's on suspend mode or hdmi cable is not inserted--\n");
        return 0;
        
    }

	switch (i) {
		/* Vlayer */

	case V4L2_BUF_TYPE_VIDEO_OUTPUT:
		_s5p_vlayer_stop();
		break;
		/* GRP0/1 */

	case V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY:
		_s5p_grp_stop(layer->index);
		break;

	default:
		break;
	}

	V4L2PRINTK("()--\n");

	return 0;
}
示例#8
0
void s5p_handle_cable(void)
{
    char env_buf[120];
    char *envp[2];
    int env_offset = 0;

	#if 0
    if(s5ptv_status.tvout_param.out_mode != TVOUT_OUTPUT_HDMI && s5ptv_status.tvout_param.out_mode != TVOUT_OUTPUT_HDMI_RGB)
        return;
#endif

    bool previous_hpd_status = s5ptv_status.hpd_status;
#ifdef CONFIG_HDMI_HPD
    s5ptv_status.hpd_status= s5p_hpd_get_state();
#else
    return;
#endif
    
    memset(env_buf, 0, sizeof(env_buf));

    if(previous_hpd_status == s5ptv_status.hpd_status)
    {
        BASEPRINTK("same hpd_status value: %d\n", previous_hpd_status);
        return;
    }

    if(s5ptv_status.hpd_status)
    {
    	
        BASEPRINTK("\n hdmi cable is connected \n");
		sprintf(env_buf, "HDMI_STATE=online");
		envp[env_offset++] = env_buf;
		envp[env_offset] = NULL;
		kobject_uevent_env(&(s5p_tvout[0].dev.kobj), KOBJ_CHANGE, envp);
        
        if(s5ptv_status.suspend_status)
            return;

#ifdef CONFIG_CPU_FREQ_S5PV210
        s5pv210_set_cpufreq_level(RESTRICT_TABLE);
#endif /* CONFIG_CPU_FREQ_S5PV210 */

 				s5p_tv_clk_gate( true );
				//if(s5ptv_status.tvout_param.out_mode == TVOUT_OUTPUT_HDMI || s5ptv_status.tvout_param.out_mode == TVOUT_OUTPUT_HDMI_RGB)
        	//	tv_phy_power( true );

    #ifdef CONFIG_PM
    #if 0
        s5p_tv_clk_gate( true );
		if(s5ptv_status.tvout_param.out_mode == TVOUT_OUTPUT_HDMI || s5ptv_status.tvout_param.out_mode == TVOUT_OUTPUT_HDMI_RGB)
        tv_phy_power( true );
    #endif
    #endif
        /* tv on */
        if ( s5ptv_status.tvout_output_enable )
                _s5p_tv_if_start();

        /* video layer start */
        if ( s5ptv_status.vp_layer_enable )
                _s5p_vlayer_start();

        /* grp0 layer start */
        if ( s5ptv_status.grp_layer_enable[0] )
                _s5p_grp_start(VM_GPR0_LAYER);

        /* grp1 layer start */
        if ( s5ptv_status.grp_layer_enable[1] )
                _s5p_grp_start(VM_GPR1_LAYER);
		
		
		printk("[TVOUT]hdmi cable is connected\n");
    }
    else{
		
        BASEPRINTK("\n hdmi cable is disconnected \n");

	#if 1
        if(s5ptv_status.suspend_status)
        {
			//if(gpio_get_value(GPIO_ACCESSORY_INT))
			{
				s5p_tv_clk_gate( true );
				tv_phy_power( true );
			}
 			//else
            //	return;
        }
	#endif 
        if ( s5ptv_status.vp_layer_enable ) {
            _s5p_vlayer_stop();
            s5ptv_status.vp_layer_enable = true;

        }

        /* grp0 layer stop */
        if ( s5ptv_status.grp_layer_enable[0] ) {
            _s5p_grp_stop(VM_GPR0_LAYER);
            s5ptv_status.grp_layer_enable[VM_GPR0_LAYER] = true;
        }

        /* grp1 layer stop */
        if ( s5ptv_status.grp_layer_enable[1] ) {
            _s5p_grp_stop(VM_GPR1_LAYER);
            s5ptv_status.grp_layer_enable[VM_GPR0_LAYER] = true;
        }

        /* tv off */
        if ( s5ptv_status.tvout_output_enable ) {
            _s5p_tv_if_stop();
            s5ptv_status.tvout_output_enable = false;
            s5ptv_status.tvout_param_available = false;
        }

    #ifdef CONFIG_PM
        /* clk & power off */
        s5p_tv_clk_gate( false );
  //if(s5ptv_status.tvout_param.out_mode == TVOUT_OUTPUT_HDMI || s5ptv_status.tvout_param.out_mode == TVOUT_OUTPUT_HDMI_RGB)
    //    tv_phy_power( false );
    #endif

		sprintf(env_buf, "HDMI_STATE=offline");
		envp[env_offset++] = env_buf;
		envp[env_offset] = NULL;
		kobject_uevent_env(&(s5p_tvout[0].dev.kobj), KOBJ_CHANGE, envp);
		printk("[TVOUT]hdmi cable is disconnected\n");

#ifdef CONFIG_CPU_FREQ_S5PV210
        s5pv210_set_cpufreq_level(NORMAL_TABLE);
#endif /* CONFIG_CPU_FREQ_S5PV210 */
    }
}
示例#9
0
void s5p_handle_cable(void)
{
    char env_buf[120];
    char *envp[2];
    int env_offset = 0;

	#if 0
    if(s5ptv_status.tvout_param.out_mode != TVOUT_OUTPUT_HDMI && s5ptv_status.tvout_param.out_mode != TVOUT_OUTPUT_HDMI_RGB)
        return;
#endif
   int previous_hpd_status = s5ptv_status.hpd_status;
#ifdef CONFIG_HDMI_HPD
    if (s5p_hpd_get_state()) {
        s5ptv_status.hpd_status = 1;
        set_irq_type(IRQ_EINT13, IRQ_TYPE_EDGE_FALLING);
        if (suspend_resume_sync == 2)
            suspend_resume_sync = 0;

    } else {
        s5ptv_status.hpd_status = 0;
        set_irq_type(IRQ_EINT13, IRQ_TYPE_EDGE_RISING); 
    }

//    s5ptv_status.hpd_status= gpio_get_value(S5PV210_GPH1(5));
#else
    return;
#endif
    printk(KERN_INFO "HDMI handle_cable previous status is %d and current status is %d\n",previous_hpd_status,s5ptv_status.hpd_status);
    
    memset(env_buf, 0, sizeof(env_buf));

    if(previous_hpd_status == s5ptv_status.hpd_status)
    {
        BASEPRINTK("same hpd_status value: %d\n", previous_hpd_status);
        return;
    }

    if(s5ptv_status.hpd_status)
    {
        TVout_LDO_ctrl(true);
        BASEPRINTK("\n hdmi cable is connected \n");
		sprintf(env_buf, "HDMI_STATE=online");
		envp[env_offset++] = env_buf;
		envp[env_offset] = NULL;
		kobject_uevent_env(&(s5p_tvout[0].dev.kobj), KOBJ_CHANGE, envp);
        
        if(s5ptv_status.suspend_status)
        {
		    printk("[TVOUT]hdmi cable is connected Before Suspend \n");
            return;
        }
#ifdef CONFIG_CPU_FREQ_S5PV210
        s5pv210_set_cpufreq_level(RESTRICT_TABLE);
#endif /* CONFIG_CPU_FREQ_S5PV210 */

 				s5p_tv_clk_gate( true );
				//if(s5ptv_status.tvout_param.out_mode == TVOUT_OUTPUT_HDMI || s5ptv_status.tvout_param.out_mode == TVOUT_OUTPUT_HDMI_RGB)
        	//	tv_phy_power( true );

    #ifdef CONFIG_PM
    #if 0
        s5p_tv_clk_gate( true );
		if(s5ptv_status.tvout_param.out_mode == TVOUT_OUTPUT_HDMI || s5ptv_status.tvout_param.out_mode == TVOUT_OUTPUT_HDMI_RGB)
        tv_phy_power( true );
    #endif
    #endif
        /* tv on */
        if ( s5ptv_status.tvout_output_enable )
                _s5p_tv_if_start();

        /* video layer start */
        if ( s5ptv_status.vp_layer_enable )
                _s5p_vlayer_start();

        /* grp0 layer start */
        if ( s5ptv_status.grp_layer_enable[0] )
                _s5p_grp_start(VM_GPR0_LAYER);

        /* grp1 layer start */
        if ( s5ptv_status.grp_layer_enable[1] )
                _s5p_grp_start(VM_GPR1_LAYER);
		
		
		printk("[TVOUT]hdmi cable is connected\n");
    }
    else{
		
        BASEPRINTK("\n hdmi cable is disconnected \n");

	#if 1
        if(s5ptv_status.suspend_status || suspend_resume_sync == 2)
        {
			//if(gpio_get_value(GPIO_ACCESSORY_INT))
			{
				s5p_tv_clk_gate( true );
				tv_phy_power( true );
			}
 			//else
            //	return;
        }
	#endif 
//    if (!s5ptv_status.suspend_status) {
    if (suspend_resume_sync == 0) {
        if ( s5ptv_status.vp_layer_enable ) {
            _s5p_vlayer_stop();
            s5ptv_status.vp_layer_enable = true;

        }

        /* grp0 layer stop */
        if ( s5ptv_status.grp_layer_enable[0] ) {
            _s5p_grp_stop(VM_GPR0_LAYER);
            s5ptv_status.grp_layer_enable[VM_GPR0_LAYER] = true;
        }

        /* grp1 layer stop */
        if ( s5ptv_status.grp_layer_enable[1] ) {
            _s5p_grp_stop(VM_GPR1_LAYER);
            s5ptv_status.grp_layer_enable[VM_GPR0_LAYER] = true;
        }

        /* tv off */
        if ( s5ptv_status.tvout_output_enable ) {
            _s5p_tv_if_stop();
            s5ptv_status.tvout_output_enable = false;
            s5ptv_status.tvout_param_available = false;
        }

    #ifdef CONFIG_PM
        /* clk & power off */
        s5p_tv_clk_gate( false );
  //if(s5ptv_status.tvout_param.out_mode == TVOUT_OUTPUT_HDMI || s5ptv_status.tvout_param.out_mode == TVOUT_OUTPUT_HDMI_RGB)
    //    tv_phy_power( false );
    #endif
    }

		sprintf(env_buf, "HDMI_STATE=offline");
		envp[env_offset++] = env_buf;
		envp[env_offset] = NULL;
		kobject_uevent_env(&(s5p_tvout[0].dev.kobj), KOBJ_CHANGE, envp);
		printk("[TVOUT]hdmi cable is disconnected\n");

#ifdef CONFIG_CPU_FREQ_S5PV210
    if (suspend_resume_sync == 0)
        s5pv210_set_cpufreq_level(NORMAL_TABLE);
#endif /* CONFIG_CPU_FREQ_S5PV210 */
    }
}
示例#10
0
/*
 *  Suspend
 */
int s5p_tv_early_suspend(struct platform_device *dev, pm_message_t state)
{
    BASEPRINTK("(hpd_status = %d)++\n", s5ptv_status.hpd_status);

    mutex_lock(mutex_for_fo);
    s5ptv_status.suspend_status = true;
    suspend_resume_sync = 1;
    printk(KERN_INFO "s5p_tv_early suspend executing..\n");
#ifdef CABLE_CHECK
          //s5p_hpd_set_state(HPD_SLEEP);
    if (s5p_hpd_get_state()) {
        hpd_sleep_state = 0;
        set_irq_type(IRQ_EINT13, IRQ_TYPE_EDGE_FALLING);
    } else {
        hpd_sleep_state = 1;
        set_irq_type(IRQ_EINT13, IRQ_TYPE_EDGE_RISING);
    }
#endif
    if(!(s5ptv_status.hpd_status))
    {
        printk(KERN_INFO "s5p_tv_early_suspend returned no HDMI connected\n");
	    mutex_unlock(mutex_for_fo);
        return 0;
    }
    else
    {
                 IsPower_on = false;
                 TVout_LDO_ctrl(true);
	    /* video layer stop */
	    if ( s5ptv_status.vp_layer_enable ) {
		    _s5p_vlayer_stop();
		    s5ptv_status.vp_layer_enable = true;

	    }

	    /* grp0 layer stop */
	    if ( s5ptv_status.grp_layer_enable[0] ) {
		    _s5p_grp_stop(VM_GPR0_LAYER);
		    s5ptv_status.grp_layer_enable[VM_GPR0_LAYER] = true;
	    }

	    /* grp1 layer stop */
	    if ( s5ptv_status.grp_layer_enable[1] ) {
		    _s5p_grp_stop(VM_GPR1_LAYER);
		    s5ptv_status.grp_layer_enable[VM_GPR0_LAYER] = true;
	    }

	    if(s5ptv_status.tvout_param.out_mode == TVOUT_OUTPUT_HDMI || s5ptv_status.tvout_param.out_mode == TVOUT_OUTPUT_HDMI_RGB
			|| s5ptv_status.tvout_param.out_mode == TVOUT_OUTPUT_DVI)
		    tv_phy_power( false );
	    
	   
	    /* tv off */
	    if ( s5ptv_status.tvout_output_enable ) {
		    _s5p_tv_if_stop();
		    s5ptv_status.tvout_output_enable = true;
		    s5ptv_status.tvout_param_available = true;
	    }

	    /* clk & power off */
	    s5p_tv_clk_gate( false );


#ifdef CONFIG_CPU_FREQ_S5PV210
	    s5pv210_set_cpufreq_level(NORMAL_TABLE);
#endif /* CONFIG_CPU_FREQ_S5PV210 */
    }

    mutex_unlock(mutex_for_fo);
    BASEPRINTK("()--\n");
    return 0;
}
示例#11
0
void s5p_handle_cable(void)
{
    char env_buf[120];
    char *envp[2];
    int env_offset = 0;

#if defined (CONFIG_S5PC110_DEMPSEY_BOARD)				//MHL v1 //NAGSM_Android_SEL_Kernel_Aakash_20101130

#else
    if(s5ptv_status.tvout_param.out_mode != TVOUT_OUTPUT_HDMI && s5ptv_status.tvout_param.out_mode != TVOUT_OUTPUT_HDMI_RGB)
        return;
#endif

    bool previous_hpd_status = s5ptv_status.hpd_status;
#ifdef CONFIG_HDMI_HPD
    s5ptv_status.hpd_status= s5p_hpd_get_state();
#else
    return;
#endif
    
    memset(env_buf, 0, sizeof(env_buf));

    if(previous_hpd_status == s5ptv_status.hpd_status)
    {
        BASEPRINTK("same hpd_status value: %d\n", previous_hpd_status);
        return;
    }

    if(s5ptv_status.hpd_status)
    {
        BASEPRINTK("\n hdmi cable is connected \n");			
        if(s5ptv_status.suspend_status)
            return;

#if 0
    #ifdef CONFIG_CPU_FREQ
    #ifdef CONFIG_CPU_MAX_FREQ_1GHZ // 2010.3.9.
        s5pc110_lock_dvfs_high_level(DVFS_LOCK_TOKEN_4, 3);
    #else
        s5pc110_lock_dvfs_high_level(DVFS_LOCK_TOKEN_4, 2);    
    #endif
    #endif
#endif

    #ifdef CONFIG_PM_PWR_GATING
        s5p_tv_clk_gate( true );
        tv_phy_power( true );
    #endif
        /* tv on */
        if ( s5ptv_status.tvout_output_enable )
                _s5p_tv_if_start();

        /* video layer start */
        if ( s5ptv_status.vp_layer_enable )
                _s5p_vlayer_start();

        /* grp0 layer start */
        if ( s5ptv_status.grp_layer_enable[0] )
                _s5p_grp_start(VM_GPR0_LAYER);

        /* grp1 layer start */
        if ( s5ptv_status.grp_layer_enable[1] )
                _s5p_grp_start(VM_GPR1_LAYER);

        sprintf(env_buf, "HDMI_STATE=online");
        envp[env_offset++] = env_buf;
        envp[env_offset] = NULL;
        kobject_uevent_env(&(s5p_tvout[0].dev.kobj), KOBJ_CHANGE, envp);
    }
    else{
        BASEPRINTK("\n hdmi cable is disconnected \n");
        
        if(s5ptv_status.suspend_status)
            return;

        sprintf(env_buf, "HDMI_STATE=offline");
        envp[env_offset++] = env_buf;
        envp[env_offset] = NULL;
        kobject_uevent_env(&(s5p_tvout[0].dev.kobj), KOBJ_CHANGE, envp);

        if ( s5ptv_status.vp_layer_enable ) {
            _s5p_vlayer_stop();
            s5ptv_status.vp_layer_enable = true;

        }

        /* grp0 layer stop */
        if ( s5ptv_status.grp_layer_enable[0] ) {
            _s5p_grp_stop(VM_GPR0_LAYER);
            s5ptv_status.grp_layer_enable[VM_GPR0_LAYER] = true;
        }

        /* grp1 layer stop */
        if ( s5ptv_status.grp_layer_enable[1] ) {
            _s5p_grp_stop(VM_GPR1_LAYER);
            s5ptv_status.grp_layer_enable[VM_GPR0_LAYER] = true;
        }

        /* tv off */
        if ( s5ptv_status.tvout_output_enable ) {
            _s5p_tv_if_stop();
            s5ptv_status.tvout_output_enable = true;
            s5ptv_status.tvout_param_available = true;
        }

    #ifdef CONFIG_PM_PWR_GATING
        /* clk & power off */
        s5p_tv_clk_gate( false );
        tv_phy_power( false );
    #endif

#if 0
    #ifdef CONFIG_CPU_FREQ
        s5pc110_unlock_dvfs_high_level(DVFS_LOCK_TOKEN_4);
    #endif
#endif    
    }
        
}