mirror of
https://github.com/rd-stuffs/msm-4.14.git
synced 2025-02-20 11:45:48 +08:00
Merge "msm: kgsl: Use the GMU for bus DCVS"
This commit is contained in:
commit
3a71af90a0
@ -593,7 +593,7 @@ err_ret:
|
||||
|
||||
/*
|
||||
* gmu_dcvs_set() - request GMU to change GPU frequency and/or bandwidth.
|
||||
* @gmu: Pointer to GMU device
|
||||
* @device: Pointer to the device
|
||||
* @gpu_pwrlevel: index to GPU DCVS table used by KGSL
|
||||
* @bus_level: index to GPU bus table used by KGSL
|
||||
*
|
||||
@ -618,9 +618,10 @@ static int gmu_dcvs_set(struct kgsl_device *device,
|
||||
if (bus_level < gmu->num_bwlevels && bus_level > 0)
|
||||
req.bw = bus_level;
|
||||
|
||||
/* GMU will vote for slumber levels through the sleep sequence */
|
||||
if ((req.freq == INVALID_DCVS_IDX) &&
|
||||
(req.bw == INVALID_DCVS_IDX))
|
||||
return -EINVAL;
|
||||
return 0;
|
||||
|
||||
if (ADRENO_QUIRK(adreno_dev, ADRENO_QUIRK_HFI_USE_REG)) {
|
||||
int ret = gmu_dev_ops->rpmh_gpu_pwrctrl(adreno_dev,
|
||||
@ -638,6 +639,9 @@ static int gmu_dcvs_set(struct kgsl_device *device,
|
||||
return ret;
|
||||
}
|
||||
|
||||
if (!test_bit(GMU_HFI_ON, &gmu->flags))
|
||||
return 0;
|
||||
|
||||
return hfi_send_req(gmu, H2F_MSG_GX_BW_PERF_VOTE, &req);
|
||||
}
|
||||
|
||||
|
@ -27,6 +27,7 @@
|
||||
#include "kgsl_pwrscale.h"
|
||||
#include "kgsl_device.h"
|
||||
#include "kgsl_trace.h"
|
||||
#include "kgsl_gmu_core.h"
|
||||
|
||||
#define KGSL_PWRFLAGS_POWER_ON 0
|
||||
#define KGSL_PWRFLAGS_CLK_ON 1
|
||||
@ -226,12 +227,10 @@ static int kgsl_bus_scale_request(struct kgsl_device *device,
|
||||
|
||||
/* GMU scales BW */
|
||||
if (gmu_core_gpmu_isenabled(device))
|
||||
return 0;
|
||||
|
||||
if (pwr->pcl) {
|
||||
ret = gmu_core_dcvs_set(device, INVALID_DCVS_IDX, buslevel);
|
||||
else if (pwr->pcl)
|
||||
/* Linux bus driver scales BW */
|
||||
ret = msm_bus_scale_client_update_request(pwr->pcl, buslevel);
|
||||
}
|
||||
|
||||
if (ret)
|
||||
KGSL_PWR_ERR(device, "GPU BW scaling failure: %d\n", ret);
|
||||
|
Loading…
x
Reference in New Issue
Block a user