Ejemplo n.º 1
0
static void kbase_device_runtime_workqueue_callback(struct work_struct *work)
{
    int result;
    struct kbase_device *kbdev;

    kbdev = container_of(work, struct kbase_device, runtime_pm_workqueue.work);
    /********************************************
     *
     *  This is workaround about occurred kernel panic when you turn off the system.
     *
     *  System kernel will call the "__pm_runtime_disable" when you turn off the system.
     *  After that function, System kernel do not run the runtimePM API more.
     *
     *  So, this code is check the "dev->power.disable_depth" value is not zero.
     *
    ********************************************/

    if(kbdev->osdev.dev->power.disable_depth > 0)
        return;

    mutex_lock(&runtime_pm_lock);
    result = pm_runtime_suspend(kbdev->osdev.dev);
    kbase_platform_clock_off(kbdev);
    mutex_unlock(&runtime_pm_lock);

#if MALI_GATOR_SUPPORT
    kbase_trace_mali_timeline_event(GATOR_MAKE_EVENT(ACTIVITY_RTPM_CHANGED, ACTIVITY_RTPM));
#endif
#if MALI_RTPM_DEBUG
    printk( "kbase_device_runtime_workqueue_callback, usage_count=%d\n", atomic_read(&kbdev->osdev.dev->power.usage_count));
#endif

    if(result < 0 && result != -EAGAIN)
        printk("pm_runtime_put_sync failed (%d)\n", result);
}
Ejemplo n.º 2
0
static void pm_callback_runtime_off(kbase_device *kbdev)
{
	kbase_platform_clock_off(kbdev);
#ifdef CONFIG_MALI_T6XX_DVFS
	//if (kbase_platform_dvfs_enable(false, MALI_DVFS_CURRENT_FREQ)!= MALI_TRUE)
	//	printk("[err] disabling dvfs is faled\n");
#endif
}
Ejemplo n.º 3
0
static void pm_callback_runtime_off(kbase_device *kbdev)
{
	sec_debug_aux_log(SEC_DEBUG_AUXLOG_CPU_BUS_CLOCK_CHANGE,
		"g3d turn off++++");
	kbase_platform_clock_off(kbdev);
#ifdef CONFIG_MALI_T6XX_DVFS
	//if (kbase_platform_dvfs_enable(false, MALI_DVFS_CURRENT_FREQ) != MALI_TRUE)
	//	printk("[err] disabling dvfs is faled\n");
#endif
	sec_debug_aux_log(SEC_DEBUG_AUXLOG_CPU_BUS_CLOCK_CHANGE,
		"g3d turn off---");
}