static int mali_driver_resume_scheduler(struct device *dev)
{
	/* MALI_SEC */
	mali_platform_power_mode_change(MALI_POWER_MODE_ON);
	mali_pm_os_resume();
	return 0;
}
Ejemplo n.º 2
0
static void mali_late_resume_handler(struct early_suspend *h)
{
   MALI_DEBUG_PRINT(1, ("[%s] enable_clock\n", __FUNCTION__)); 
   enable_clock(MT_CG_DISP0_SMI_COMMON, "MFG");
   enable_clock(MT_CG_MFG_G3D, "MFG");
   mali_pm_os_resume();
}
static ssize_t power_power_events_write(struct file *filp, const char __user *ubuf, size_t cnt, loff_t *ppos)
{
	if (!strncmp(ubuf, mali_power_events[_MALI_DEVICE_SUSPEND], strlen(mali_power_events[_MALI_DEVICE_SUSPEND]) - 1)) {
		mali_pm_os_suspend(MALI_TRUE);
	} else if (!strncmp(ubuf, mali_power_events[_MALI_DEVICE_RESUME], strlen(mali_power_events[_MALI_DEVICE_RESUME]) - 1)) {
		mali_pm_os_resume();
	} else if (!strncmp(ubuf, mali_power_events[_MALI_DEVICE_DVFS_PAUSE], strlen(mali_power_events[_MALI_DEVICE_DVFS_PAUSE]) - 1)) {
		mali_dev_pause();
	} else if (!strncmp(ubuf, mali_power_events[_MALI_DEVICE_DVFS_RESUME], strlen(mali_power_events[_MALI_DEVICE_DVFS_RESUME]) - 1)) {
		mali_dev_resume();
	}
	*ppos += cnt;
	return cnt;
}
static void mali_late_resume_handler(struct early_suspend *h)
{
#if 1
   MALI_DEBUG_PRINT(1, ("[%s] enable_clock\n", __FUNCTION__)); 
   trace_printk("[GPU power] MFG ON\n");
   enable_clock(MT_CG_DISP0_SMI_COMMON, "MFG");
   enable_clock(MT_CG_MFG_G3D, "MFG");
#else
   if (!clock_is_on(MT_CG_MFG_PDN_BG3D_SW_CG))
   {
      enable_clock(MT_CG_MFG_PDN_BG3D_SW_CG, "G3D_DRV");
      MALI_DEBUG_PRINT(1, ("[%s] enable_clock\n", __FUNCTION__)); 
   }
#endif
   mali_pm_os_resume();
}
Ejemplo n.º 5
0
static int mali_pwr_suspend_notifier(struct notifier_block *nb,unsigned long event,void* dummy)
{
	switch (event)
	{
		case PM_SUSPEND_PREPARE:
			MALI_DEBUG_PRINT(2, ("mali_pwr_suspend_notifier(PM_SUSPEND_PREPARE) called\n"));
			mali_pm_os_suspend();
			break;
		case PM_POST_SUSPEND:
			MALI_DEBUG_PRINT(2, ("mali_pwr_suspend_notifier(PM_SUSPEND_PREPARE) called\n"));
			mali_pm_os_resume();
			break;
		default:
			break;
	}
	return 0;
}
static ssize_t power_events_write(struct file *filp, const char __user *ubuf, size_t cnt, loff_t *ppos)
{
	
	memset(pwr_buf,0,POWER_BUFFER_SIZE);
	virtual_power_status_register = 0;
	if (!strncmp(ubuf,mali_power_events[_MALI_DEVICE_SUSPEND],strlen(mali_power_events[_MALI_DEVICE_SUSPEND])))
	{
		mali_pm_os_suspend();
		/* @@@@ assuming currently suspend is successful later on to tune as per previous*/
		virtual_power_status_register =1;

	}
	else if (!strncmp(ubuf,mali_power_events[_MALI_DEVICE_RESUME],strlen(mali_power_events[_MALI_DEVICE_RESUME])))
	{
		mali_pm_os_resume();

		/* @@@@ assuming currently resume is successful later on to tune as per previous */
		virtual_power_status_register = 1;
	}
	else if (!strncmp(ubuf,mali_power_events[_MALI_DEVICE_DVFS_PAUSE],strlen(mali_power_events[_MALI_DEVICE_DVFS_PAUSE])))
	{
		mali_bool power_on;
		mali_dev_pause(&power_on);
		if (!power_on)
		{
			virtual_power_status_register = 2;
			mali_dev_resume();		
		}
		else
		{
			/*  @@@@ assuming currently resume is successful later on to tune as per previous */
			virtual_power_status_register =1;
		}
	}
	else if (!strncmp(ubuf,mali_power_events[_MALI_DEVICE_DVFS_RESUME],strlen(mali_power_events[_MALI_DEVICE_DVFS_RESUME])))
	{
		mali_dev_resume();
		/*  @@@@ assuming currently resume is successful later on to tune as per previous */
		virtual_power_status_register = 1;
                
	}
	*ppos += cnt;
	sprintf(pwr_buf, "%d",virtual_power_status_register);
	return cnt;
}
Ejemplo n.º 7
0
static int mali_pwr_suspend_notifier(struct notifier_block *nb,unsigned long event,void* dummy)
{
    int err = 0;
    switch (event)
    {
    case PM_SUSPEND_PREPARE:
        mali_pm_os_suspend();
        err = mali_os_suspend(&(mali_platform_device->dev));
        break;

    case PM_POST_SUSPEND:
        err = mali_os_resume(&(mali_platform_device->dev));
        mali_pm_os_resume();
        break;
    default:
        break;
    }
    return err;
}
static int mali_driver_resume_scheduler(struct device *dev)
{
	mali_pm_os_resume();
	return 0;
}
Ejemplo n.º 9
0
static int mali_os_resume(struct device *dev)
{
	MALI_DEBUG_PRINT(3, ("mali_os_resume(new) called\n"));
	mali_pm_os_resume();
	return 0; /* all ok */
}
Ejemplo n.º 10
0
static int mali_os_resume(struct platform_device *pdev)
{
	MALI_DEBUG_PRINT(3, ("mali_os_resume(old) called\n"));
	mali_pm_os_resume();
	return 0; /* all ok */
}
void mali_dev_resume(void)
{
	mali_pm_os_resume();
}