From: Kasin Lee Date: Sun, 4 Jan 2015 07:28:51 +0000 (+0800) Subject: PD #00001: For G9TV X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a3b4d0a13fd8653b6ca220da8e96282ae61aa156;p=GitHub%2FLineageOS%2FG12%2Fandroid_hardware_amlogic_kernel-modules_mali-driver.git PD #00001: For G9TV Change-Id: I2b210c764ad5c2cfe1dc0c3c30095b54b5726742 --- diff --git a/mali/platform/meson_m450/platform_g9tv.c b/mali/platform/meson_m450/platform_g9tv.c index f70e0b4..dcfd0e3 100755 --- a/mali/platform/meson_m450/platform_g9tv.c +++ b/mali/platform/meson_m450/platform_g9tv.c @@ -64,7 +64,7 @@ static mali_dvfs_threshold_table mali_dvfs_table[]={ { 1, 1, 3, 108, 205}, /* for 318.7 */ { 2, 2, 3, 150, 215}, /* for 425.0 */ { 3, 3, 3, 170, 253}, /* for 510.0 */ - { 4, 4, 3, 230, 256}, /* for 637.5 */ + { 4, 4, 3, 230, 255}, /* for 637.5 */ { 0, 0, 3, 0, 0} }; @@ -75,6 +75,7 @@ static mali_plat_info_t mali_plat_data = { .turbo_clock = 4, /* reserved clock src. */ .def_clock = 2, /* gpu clock used most of time.*/ .cfg_clock = CFG_CLOCK, /* max gpu clock. */ + .cfg_clock_bkup = CFG_CLOCK, .cfg_min_clock = CFG_MIN_CLOCK, .sc_mpp = 3, /* number of pp used most of time.*/ @@ -123,11 +124,12 @@ mali_plat_info_t* get_mali_plat_data(void) { int get_mali_freq_level(int freq) { - int i = 0, level = -1; int mali_freq_num; + int i = 0, level = -1; if(freq < 0) return level; + mali_freq_num = mali_plat_data.dvfs_table_size - 1; if(freq <= mali_plat_data.clk_sample[0]) level = mali_freq_num-1; @@ -165,7 +167,6 @@ static void set_limit_mali_freq(u32 idx) return; 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(); } @@ -240,6 +241,7 @@ static int mali_cri_light_suspend(size_t param) struct mali_pmu_core *pmu; ret = 0; + mali_pm_statue = 1; device = (struct device *)param; pmu = mali_pmu_get_global_pmu_core(); @@ -272,6 +274,7 @@ static int mali_cri_light_resume(size_t param) /* Need to notify Mali driver about this event */ ret = device->driver->pm->runtime_resume(device); } + mali_pm_statue = 0; return ret; } @@ -330,14 +333,14 @@ int mali_light_suspend(struct device *device) /* clock scaling. Kasin..*/ ret = mali_clock_critical(mali_cri_light_suspend, (size_t)device); - + disable_clock(); return ret; } int mali_light_resume(struct device *device) { int ret = 0; - + enable_clock(); ret = mali_clock_critical(mali_cri_light_resume, (size_t)device); #ifdef CONFIG_MALI400_PROFILING _mali_osk_profiling_add_event(MALI_PROFILING_EVENT_TYPE_SINGLE | @@ -416,4 +419,3 @@ void mali_post_init(void) vh264_4k2k_register_module_callback(mali_4k2k_enter, mali_4k2k_exit); #endif /* CONFIG_AM_VDEC_H264_4K2K */ } -