mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-08 12:58:12 -04:00
Merge "msm: kgsl: Don't send same bus vote repeatedly"
This commit is contained in:
commit
3df7f60dd2
3 changed files with 25 additions and 6 deletions
|
|
@ -15,9 +15,17 @@ static int interconnect_bus_set(struct kgsl_device *device, int level,
|
|||
{
|
||||
struct kgsl_pwrctrl *pwr = &device->pwrctrl;
|
||||
|
||||
if ((level == pwr->cur_buslevel) && (ab == pwr->cur_ab))
|
||||
return 0;
|
||||
|
||||
pwr->cur_buslevel = level;
|
||||
pwr->cur_ab = ab;
|
||||
|
||||
icc_set_bw(pwr->icc_path, MBps_to_icc(ab),
|
||||
kBps_to_icc(pwr->ddr_table[level]));
|
||||
|
||||
trace_kgsl_buslevel(device, pwr->active_pwrlevel, level);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -63,8 +71,6 @@ void kgsl_bus_update(struct kgsl_device *device, bool on)
|
|||
pwr->bus_percent_ab = 0;
|
||||
pwr->bus_ab_mbytes = 0;
|
||||
}
|
||||
trace_kgsl_buslevel(device, pwr->active_pwrlevel, buslevel);
|
||||
pwr->cur_buslevel = buslevel;
|
||||
|
||||
/* buslevel is the IB vote, update the AB */
|
||||
ab = _ab_buslevel_update(pwr, pwr->ddr_table[buslevel]);
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@
|
|||
#include "kgsl_bus.h"
|
||||
#include "kgsl_device.h"
|
||||
#include "kgsl_gmu.h"
|
||||
#include "kgsl_trace.h"
|
||||
#include "kgsl_util.h"
|
||||
|
||||
struct gmu_iommu_context {
|
||||
|
|
@ -1264,12 +1265,22 @@ static int gmu_bus_set(struct kgsl_device *device, int buslevel,
|
|||
u32 ab)
|
||||
{
|
||||
struct kgsl_pwrctrl *pwr = &device->pwrctrl;
|
||||
int ret;
|
||||
int ret = 0;
|
||||
|
||||
ret = gmu_core_dcvs_set(device, INVALID_DCVS_IDX, buslevel);
|
||||
if (buslevel != pwr->cur_buslevel) {
|
||||
ret = gmu_core_dcvs_set(device, INVALID_DCVS_IDX, buslevel);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
if (!ret)
|
||||
pwr->cur_buslevel = buslevel;
|
||||
|
||||
trace_kgsl_buslevel(device, pwr->active_pwrlevel, buslevel);
|
||||
}
|
||||
|
||||
if (ab != pwr->cur_ab) {
|
||||
icc_set_bw(pwr->icc_path, MBps_to_icc(ab), 0);
|
||||
pwr->cur_ab = ab;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
/*
|
||||
* Copyright (c) 2010-2019, The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2010-2020, The Linux Foundation. All rights reserved.
|
||||
*/
|
||||
#ifndef __KGSL_PWRCTRL_H
|
||||
#define __KGSL_PWRCTRL_H
|
||||
|
|
@ -163,6 +163,8 @@ struct kgsl_pwrctrl {
|
|||
const char *tzone_name;
|
||||
/** @icc_path: Interconnect path for the GPU (if applicable) */
|
||||
struct icc_path *icc_path;
|
||||
/** cur_ab: The last ab voted by the driver */
|
||||
u32 cur_ab;
|
||||
};
|
||||
|
||||
int kgsl_pwrctrl_init(struct kgsl_device *device);
|
||||
|
|
|
|||
Loading…
Reference in a new issue