/* * This function is 'get_target_freq' API for the governor. * It just calls an external function that should be registered * by KGSL driver to get and return a value for frequency. */ static int devfreq_vbif_get_freq(struct devfreq *df, unsigned long *freq, u32 *flag) { if (extern_get_bw) { *freq = extern_get_bw(); return 0; } else { return -ENODEV; } }
/* * This function is 'get_target_freq' API for the governor. * It just calls an external function that should be registered * by KGSL driver to get and return a value for frequency. */ static int devfreq_vbif_get_freq(struct devfreq *df, unsigned long *freq, u32 *flag) { /* If the IB isn't set yet, check if it should be non-zero. */ if (!dev_ib && extern_get_bw) { dev_ib = extern_get_bw(); if (dev_ab) *dev_ab = dev_ib / 4; } *freq = dev_ib; return 0; }