Merge "msm: kgsl: Move VBIF register programming to device start"

This commit is contained in:
Linux Build Service Account 2014-08-15 04:51:26 -07:00 committed by Gerrit - the friendly Code Review server
commit bb8eb36eee
2 changed files with 24 additions and 16 deletions

View file

@ -1054,6 +1054,30 @@ static int _adreno_start(struct adreno_device *adreno_dev)
if (regulator_left_on)
_soft_reset(adreno_dev);
if (device->pwrctrl.bus_control) {
/* VBIF waiting for RAM */
if (!adreno_dev->starved_ram_lo) {
status |= adreno_perfcounter_get(adreno_dev,
KGSL_PERFCOUNTER_GROUP_VBIF_PWR, 0,
&adreno_dev->starved_ram_lo, NULL,
PERFCOUNTER_FLAG_KERNEL);
}
/* VBIF DDR cycles */
if (!adreno_dev->ram_cycles_lo) {
status |= adreno_perfcounter_get(adreno_dev,
KGSL_PERFCOUNTER_GROUP_VBIF,
VBIF_AXI_TOTAL_BEATS,
&adreno_dev->ram_cycles_lo, NULL,
PERFCOUNTER_FLAG_KERNEL);
}
}
if (status) {
KGSL_DRV_ERR(device,
"Unable to get perf counters for Bus DCVS\n");
goto error_mmu_off;
}
/* Restore performance counter registers with saved values */
adreno_perfcounter_restore(adreno_dev);

View file

@ -50,7 +50,6 @@ static inline int active_countable(unsigned int countable)
int adreno_perfcounter_init(struct adreno_device *adreno_dev)
{
int ret = 0;
struct kgsl_device *device = &adreno_dev->dev;
struct adreno_perfcounters *counters = ADRENO_PERFCOUNTERS(adreno_dev);
struct adreno_gpudev *gpudev = ADRENO_GPU_DEVICE(adreno_dev);
@ -71,21 +70,6 @@ int adreno_perfcounter_init(struct adreno_device *adreno_dev)
ret = adreno_perfcounter_get(adreno_dev, KGSL_PERFCOUNTER_GROUP_PWR, 1,
NULL, NULL, PERFCOUNTER_FLAG_KERNEL);
if (device->pwrctrl.bus_control) {
/* VBIF waiting for RAM */
ret |= adreno_perfcounter_get(adreno_dev,
KGSL_PERFCOUNTER_GROUP_VBIF_PWR, 0,
&adreno_dev->starved_ram_lo, NULL,
PERFCOUNTER_FLAG_KERNEL);
/* VBIF DDR cycles */
ret |= adreno_perfcounter_get(adreno_dev,
KGSL_PERFCOUNTER_GROUP_VBIF,
VBIF_AXI_TOTAL_BEATS,
&adreno_dev->ram_cycles_lo, NULL,
PERFCOUNTER_FLAG_KERNEL);
}
/* Default performance counter profiling to false */
adreno_dev->profile.enabled = false;
return ret;