Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 34eb0582 authored by Harshdeep Dhatt's avatar Harshdeep Dhatt
Browse files

devfreq: Remove extra gpu bus ib vote



Targets which send the bus ib vote via gmu do not need
to send the bus ib vote from cpu.

Change-Id: If54d4840335aefbd2c3fec1b4c62bfa7f38e8940
Signed-off-by: default avatarHarshdeep Dhatt <hdhatt@codeaurora.org>
parent 7e1fc2b2
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -47,15 +47,13 @@ void devfreq_vbif_register_callback(getbw_func func, void *data)
	extern_get_bw_data = data;
}

int devfreq_vbif_update_bw(unsigned long ib, unsigned long ab)
int devfreq_vbif_update_bw(void)
{
	int ret = 0;

	mutex_lock(&df_lock);
	if (df) {
		mutex_lock(&df->lock);
		dev_ib = ib;
		*dev_ab = ab;
		ret = update_devfreq(df);
		mutex_unlock(&df->lock);
	}
@@ -82,7 +80,10 @@ static int devfreq_vbif_ev_handler(struct devfreq *devfreq,

		mutex_unlock(&df_lock);

		ret = devfreq_vbif_update_bw(0, 0);
		dev_ib = 0;
		*dev_ab = 0;

		ret = devfreq_vbif_update_bw();
		if (ret) {
			pr_err("Unable to update BW! Gov start failed!\n");
			return ret;
+15 −6
Original line number Diff line number Diff line
@@ -55,6 +55,7 @@ static const char * const clocks[] = {
static unsigned long ib_votes[KGSL_MAX_BUSLEVELS];
static int last_vote_buslevel;
static int max_vote_buslevel;
static unsigned long last_ab;

static void kgsl_pwrctrl_clk(struct kgsl_device *device, int state,
					int requested_state);
@@ -118,8 +119,14 @@ static void _record_pwrevent(struct kgsl_device *device,
 */
static void kgsl_get_bw(unsigned long *ib, unsigned long *ab, void *data)
{
	struct kgsl_device *device = (struct kgsl_device *)data;

	if (gmu_core_scales_bandwidth(device))
		*ib = 0;
	else
		*ib = ib_votes[last_vote_buslevel];
	*ab = 0;

	*ab = last_ab;
}
#endif

@@ -198,13 +205,13 @@ static unsigned int _adjust_pwrlevel(struct kgsl_pwrctrl *pwr, int level,
}

#ifdef CONFIG_DEVFREQ_GOV_QCOM_GPUBW_MON
static void kgsl_pwrctrl_vbif_update(unsigned long ab)
static void kgsl_pwrctrl_vbif_update(void)
{
	/* ask a governor to vote on behalf of us */
	devfreq_vbif_update_bw(ib_votes[last_vote_buslevel], ab);
	devfreq_vbif_update_bw();
}
#else
static void kgsl_pwrctrl_vbif_update(unsigned long ab)
static void kgsl_pwrctrl_vbif_update(void)
{
}
#endif
@@ -296,9 +303,11 @@ void kgsl_pwrctrl_buslevel_update(struct kgsl_device *device,
	/* buslevel is the IB vote, update the AB */
	_ab_buslevel_update(pwr, &ab);

	last_ab = ab;

	kgsl_bus_scale_request(device, buslevel);

	kgsl_pwrctrl_vbif_update(ab);
	kgsl_pwrctrl_vbif_update();
}
EXPORT_SYMBOL(kgsl_pwrctrl_buslevel_update);

+1 −1
Original line number Diff line number Diff line
@@ -84,7 +84,7 @@ struct msm_busmon_extended_profile {

typedef void(*getbw_func)(unsigned long *, unsigned long *, void *);

int devfreq_vbif_update_bw(unsigned long ib, unsigned long ab);
int devfreq_vbif_update_bw(void);
void devfreq_vbif_register_callback(getbw_func func, void *data);

#endif