static void mali_dvfs_work_handler(struct work_struct *w) { bMaliDvfsRun=1; MALI_DEBUG_PRINT(3, ("=== mali_dvfs_work_handler\n")); if (!mali_dvfs_status(mali_dvfs_utilization)) MALI_DEBUG_PRINT(1,( "error on mali dvfs status in mali_dvfs_work_handler")); bMaliDvfsRun=0; }
static void mali_dvfs_work_handler(struct work_struct *w) { int change_clk = 0; int change_step = 0; bMaliDvfsRun=1; /* dvfs table change when clock was changed */ if (step0_clk != mali_dvfs[0].clock) { MALI_PRINT(("::: step0_clk change to %d Mhz\n", step0_clk)); change_clk = step0_clk; change_step = 0; step0_clk = change_dvfs_tableset(change_clk, change_step); } #if (MALI_DVFS_STEPS > 1) if (step1_clk != mali_dvfs[1].clock) { MALI_PRINT(("::: step1_clk change to %d Mhz\n", step1_clk)); change_clk = step1_clk; change_step = 1; step1_clk = change_dvfs_tableset(change_clk, change_step); } if (step0_up != mali_dvfs_threshold[0].upthreshold) { MALI_PRINT(("::: step0_up change to %d %\n", step0_up)); mali_dvfs_threshold[0].upthreshold = step0_up; } if (step1_down != mali_dvfs_threshold[1].downthreshold) { MALI_PRINT((":::step1_down change to %d %\n", step1_down)); mali_dvfs_threshold[1].downthreshold = step1_down; } #if (MALI_DVFS_STEPS > 2) if (step2_clk != mali_dvfs[2].clock) { MALI_PRINT(("::: step2_clk change to %d Mhz\n", step2_clk)); change_clk = step2_clk; change_step = 2; step2_clk = change_dvfs_tableset(change_clk, change_step); } if (step1_up != mali_dvfs_threshold[1].upthreshold) { MALI_PRINT((":::step1_up change to %d %\n", step1_up)); mali_dvfs_threshold[1].upthreshold = step1_up; } if (step2_down != mali_dvfs_threshold[2].downthreshold) { MALI_PRINT((":::step2_down change to %d %\n", step2_down)); mali_dvfs_threshold[2].downthreshold = step2_down; } #if (MALI_DVFS_STEPS > 3) if (step3_clk != mali_dvfs[3].clock) { MALI_PRINT(("::: step3_clk change to %d Mhz\n", step3_clk)); change_clk = step3_clk; change_step = 3; step3_clk = change_dvfs_tableset(change_clk, change_step); } if (step2_up != mali_dvfs_threshold[2].upthreshold) { MALI_PRINT((":::step2_up change to %d %\n", step2_up)); mali_dvfs_threshold[2].upthreshold = step2_up; } if (step3_down != mali_dvfs_threshold[3].downthreshold) { MALI_PRINT((":::step3_down change to %d %\n", step3_down)); mali_dvfs_threshold[3].downthreshold = step3_down; } #endif #endif #endif #ifdef DEBUG mali_dvfs[0].vol = step0_vol; mali_dvfs[1].vol = step1_vol; mali_dvfs[2].vol = step2_vol; mali_dvfs[3].vol = step3_vol; #endif MALI_DEBUG_PRINT(3, ("=== mali_dvfs_work_handler\n")); if (!mali_dvfs_status(mali_dvfs_utilization)) MALI_DEBUG_PRINT(1,( "error on mali dvfs status in mali_dvfs_work_handler")); bMaliDvfsRun=0; }