msm: kgsl: Reduce unnecessary calls to _wake

If the device is already ACTIVE do not call _wake.

Change-Id: I2ae3956eb1bbc0a8bc0f1c147547aeed601622aa
Signed-off-by: Lucille Sylvester <lsylvest@codeaurora.org>
This commit is contained in:
Lucille Sylvester
2013-06-18 09:58:22 -06:00
committed by Jeremy Gebben
parent c03d8fea08
commit 90e47f42d9
+2 -1
View File
@@ -1505,7 +1505,8 @@ int kgsl_active_count_get(struct kgsl_device *device)
int ret = 0;
BUG_ON(!mutex_is_locked(&device->mutex));
if (device->active_cnt == 0) {
if (device->active_cnt == 0 &&
device->state != KGSL_STATE_ACTIVE) {
mutex_unlock(&device->mutex);
wait_for_completion(&device->hwaccess_gate);
wait_for_completion(&device->ft_gate);