#include <common/mali_kernel_common.h>
#include <common/mali_osk_profiling.h>
#include <common/mali_pmu.h>
+#include <linux/mali/mali_utgard.h>
static int mali_os_suspend(struct device *device)
{
int ret = 0;
MALI_DEBUG_PRINT(4, ("mali_os_resume() called\n"));
+
ret = mali_deep_resume(device);
return ret;
int ret = 0;
MALI_DEBUG_PRINT(4, ("mali_os_thaw() called\n"));
+ enable_clock();
+ mali_pmu_powerup();
if (NULL != device->driver &&
NULL != device->driver->pm &&
return ret;
}
+static int mali_os_restore(struct device *device)
+{
+ MALI_DEBUG_PRINT(4, ("mali_os_thaw() called\n"));
+ mali_dev_restore();
+ return mali_os_resume(device);
+}
+
#ifdef CONFIG_PM_RUNTIME
static int mali_runtime_suspend(struct device *device)
{
.resume = mali_os_resume,
.freeze = mali_os_freeze,
.thaw = mali_os_thaw,
+ .restore = mali_os_restore,
#ifdef CONFIG_PM_RUNTIME
.runtime_suspend = mali_runtime_suspend,
.runtime_resume = mali_runtime_resume,
/* for frequency reporter in DS-5 streamline. */
u32 get_current_frequency(void);
+void mali_dev_restore(void);
extern int mali_pm_statue;
#endif /* __ARM_CORE_SCALING_H__ */
struct mali_pmu_core *pmu;
ret = 0;
- mali_pm_statue = 0;
+ mali_pm_statue = 1;
device = (struct device *)param;
pmu = mali_pmu_get_global_pmu_core();
/* Need to notify Mali driver about this event */
ret = device->driver->pm->runtime_resume(device);
}
- mali_pm_statue = 1;
+ mali_pm_statue = 0;
return ret;
}
if (idx > mali_plat_data.turbo_clock || idx < mali_plat_data.scale_info.minclk)
return;
mali_plat_data.scale_info.maxclk= idx;
+
revise_mali_rt();
}
struct mali_pmu_core *pmu;
ret = 0;
- mali_pm_statue = 0;
+ mali_pm_statue = 1;
device = (struct device *)param;
pmu = mali_pmu_get_global_pmu_core();
/* Need to notify Mali driver about this event */
ret = device->driver->pm->runtime_resume(device);
}
- mali_pm_statue = 1;
+ mali_pm_statue = 0;
return ret;
}
break;
}
}
+
+void mali_dev_restore(void)
+{
+ mali_dvfs_threshold_table * pdvfs = pmali_plat->dvfs_table;
+
+ //mali_perf_set_num_pp_cores(num_cores_enabled);
+ mali_clock_set(pdvfs[currentStep].freq_index);
+}