msm: kgsl: Get active count in KGSL_PROP_PWRCTRL setproperty

KGSL_PROP_PWRCTRL setproperty enables hang detection, this involves
enabling performance counters. Get active count to access performace
counter hardware.

Change-Id: I175c6461ea51aa4a69ef9196495de04ef6a9c4b5
Signed-off-by: Tarun Karra <tkarra@codeaurora.org>
This commit is contained in:
Tarun Karra 2014-06-03 21:13:47 -07:00
parent c1d445170d
commit c6b823ecbe

View file

@ -2730,8 +2730,11 @@ static int adreno_setproperty(struct kgsl_device_private *dev_priv,
device->pwrctrl.ctrl_flags = 0; device->pwrctrl.ctrl_flags = 0;
adreno_dev->fast_hang_detect = 1; adreno_dev->fast_hang_detect = 1;
if (gpudev->fault_detect_start) if (gpudev->fault_detect_start &&
!kgsl_active_count_get(&adreno_dev->dev)) {
gpudev->fault_detect_start(adreno_dev); gpudev->fault_detect_start(adreno_dev);
kgsl_active_count_put(&adreno_dev->dev);
}
kgsl_pwrscale_enable(device); kgsl_pwrscale_enable(device);
} else { } else {