int gpu_dvfs_calculate_env_data(struct kbase_device *kbdev) { struct exynos_context *platform = (struct exynos_context *) kbdev->platform_context; DVFS_ASSERT(platform); gpu_dvfs_update_utilization(kbdev); gpu_dvfs_update_hwc(kbdev); return 0; }
static void gpu_dvfs_event_proc(struct work_struct *q) { int freq = 0; struct kbase_device *kbdev = pkbdev; struct exynos_context *platform; platform = (struct exynos_context *) kbdev->platform_context; if (!platform) return; #ifdef CONFIG_MALI_HWCNT_UTIL gpu_dvfs_update_hwc(kbdev); #endif mutex_lock(&platform->gpu_dvfs_handler_lock); if (gpu_control_state_set(kbdev, GPU_CONTROL_IS_POWER_ON, 0)) { freq = gpu_get_target_freq(); gpu_set_target_freq(freq); } mutex_unlock(&platform->gpu_dvfs_handler_lock); }