Loading drivers/devfreq/governor_gpubw_mon.c +15 −0 Original line number Diff line number Diff line Loading @@ -53,6 +53,12 @@ static int devfreq_gpubw_get_target(struct devfreq *df, int act_level; int norm_cycles; int gpu_percent; /* * Normalized AB should at max usage be the gpu_bimc frequency in MHz. * Start with a reasonable value and let the system push it up to max. */ static int norm_ab_max = 300; int norm_ab; stats.private_data = &b; Loading Loading @@ -97,6 +103,15 @@ static int devfreq_gpubw_get_target(struct devfreq *df, bus_profile->flag = DEVFREQ_FLAG_SLOW_HINT; } /* Re-calculate the AB percentage for a new IB vote */ if (bus_profile->flag) { norm_ab = (unsigned int)priv->bus.ram_time / (unsigned int) priv->bus.total_time; if (norm_ab > norm_ab_max) norm_ab_max = norm_ab; bus_profile->percent_ab = (100 * norm_ab) / norm_ab_max; } priv->bus.total_time = 0; priv->bus.gpu_time = 0; priv->bus.ram_time = 0; Loading Loading
drivers/devfreq/governor_gpubw_mon.c +15 −0 Original line number Diff line number Diff line Loading @@ -53,6 +53,12 @@ static int devfreq_gpubw_get_target(struct devfreq *df, int act_level; int norm_cycles; int gpu_percent; /* * Normalized AB should at max usage be the gpu_bimc frequency in MHz. * Start with a reasonable value and let the system push it up to max. */ static int norm_ab_max = 300; int norm_ab; stats.private_data = &b; Loading Loading @@ -97,6 +103,15 @@ static int devfreq_gpubw_get_target(struct devfreq *df, bus_profile->flag = DEVFREQ_FLAG_SLOW_HINT; } /* Re-calculate the AB percentage for a new IB vote */ if (bus_profile->flag) { norm_ab = (unsigned int)priv->bus.ram_time / (unsigned int) priv->bus.total_time; if (norm_ab > norm_ab_max) norm_ab_max = norm_ab; bus_profile->percent_ab = (100 * norm_ab) / norm_ab_max; } priv->bus.total_time = 0; priv->bus.gpu_time = 0; priv->bus.ram_time = 0; Loading