static const char kbase_drv_name[] = KBASE_DRV_NAME;
static int kbase_dev_nr;
+#ifdef CONFIG_MALI_MIDGARD_DVFS
+extern int mali_pm_statue;
+#endif
static DEFINE_MUTEX(kbase_dev_list_lock);
static LIST_HEAD(kbase_dev_list);
(LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0))
devfreq_suspend_device(kbdev->devfreq);
#endif
+#if defined(CONFIG_MALI_MIDGARD_DVFS)
+ mali_pm_statue = 1;
+#endif
kbase_pm_suspend(kbdev);
return 0;
#if defined(CONFIG_PM_DEVFREQ) && \
(LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0))
devfreq_resume_device(kbdev->devfreq);
+#endif
+#if defined(CONFIG_MALI_MIDGARD_DVFS)
+ mali_pm_statue = 0;
#endif
return 0;
}
(LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0))
devfreq_suspend_device(kbdev->devfreq);
#endif
+#if defined(CONFIG_MALI_MIDGARD_DVFS)
+ mali_pm_statue = 1;
+#endif
if (kbdev->pm.backend.callback_power_runtime_off) {
kbdev->pm.backend.callback_power_runtime_off(kbdev);
(LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0))
devfreq_resume_device(kbdev->devfreq);
#endif
+#if defined(CONFIG_MALI_MIDGARD_DVFS)
+ mali_pm_statue = 0;
+#endif
return ret;
}
//static u32 mali_extr_sample_backup = 0;
struct timeval start;
struct timeval end;
+int mali_pm_statue = 0;
int mali_clock_init_clk_tree(struct platform_device* pdev)
{
u32 get_mali_freq(u32 idx)
{
-#ifndef MESON_DRV_BRING
- return pmali_plat->clk_sample[idx];
-#else
if (!mali_pm_statue) {
return pmali_plat->clk_sample[idx];
} else {
return 0;
}
-#endif
}
void set_str_src(u32 data)
static mali_plat_info_t* pmali_plat = NULL;
#endif
static int scaling_mode = MALI_PP_FS_SCALING;
+extern int mali_pm_statue;
//static int scaling_mode = MALI_SCALING_DISABLE;
//static int scaling_mode = MALI_PP_SCALING;
void mali_gpu_utilization_callback(int utilization_pp)
{
#ifndef CONFIG_MALI_DVFS
-#ifdef MESON_DRV_BRING
if (mali_pm_statue)
return;
-#endif
switch (scaling_mode) {
case MALI_PP_FS_SCALING: