diff options
author | Sidath Senanayake <sidaths@google.com> | 2016-11-09 14:14:45 +0100 |
---|---|---|
committer | Sidath Senanayake <sidaths@google.com> | 2016-11-09 14:14:45 +0100 |
commit | 192bd796c27ac6eb9443af4b7e027294316f7c5b (patch) | |
tree | af0b7bd546062b6bbc6c32af91009f0f185fe6f4 /mali_kbase/mali_kbase_pm.c | |
parent | 823a760515e356dfef47c691d827d8ba795ce2a4 (diff) | |
download | gpu-192bd796c27ac6eb9443af4b7e027294316f7c5b.tar.gz |
Mali Bifrost DDK r1p0 KMD
Provenance:
9f8289b33 (collaborate/EAC/b_r1p0)
BX304L01B-BU-00000-r1p0-01rel0
BX304L06A-BU-00000-r1p0-01rel0
BX304X07X-BU-00000-r1p0-01bet0
Signed-off-by: Sidath Senanayake <sidaths@google.com>
Change-Id: I1559e84ef1f3853e66978a6c12307e766b31e30f
Diffstat (limited to 'mali_kbase/mali_kbase_pm.c')
-rw-r--r-- | mali_kbase/mali_kbase_pm.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/mali_kbase/mali_kbase_pm.c b/mali_kbase/mali_kbase_pm.c index 261441f..97d5434 100644 --- a/mali_kbase/mali_kbase_pm.c +++ b/mali_kbase/mali_kbase_pm.c @@ -1,6 +1,6 @@ /* * - * (C) COPYRIGHT 2010-2015 ARM Limited. All rights reserved. + * (C) COPYRIGHT 2010-2016 ARM Limited. All rights reserved. * * This program is free software and is provided to you under the terms of the * GNU General Public License version 2 as published by the Free Software @@ -21,10 +21,10 @@ * @file mali_kbase_pm.c * Base kernel power management APIs */ + #include <mali_kbase.h> #include <mali_midg_regmap.h> -#include <mali_kbase_config_defaults.h> -#include <mali_kbase_instr.h> +#include <mali_kbase_vinstr.h> #include <mali_kbase_pm.h> @@ -151,6 +151,10 @@ void kbase_pm_suspend(struct kbase_device *kbdev) { KBASE_DEBUG_ASSERT(kbdev); + /* Suspend vinstr. + * This call will block until vinstr is suspended. */ + kbase_vinstr_suspend(kbdev->vinstr_ctx); + mutex_lock(&kbdev->pm.lock); KBASE_DEBUG_ASSERT(!kbase_pm_is_suspending(kbdev)); kbdev->pm.suspending = true; @@ -164,9 +168,6 @@ void kbase_pm_suspend(struct kbase_device *kbdev) * the PM active count references */ kbasep_js_suspend(kbdev); - /* Suspend any counter collection that might be happening */ - kbase_instr_hwcnt_suspend(kbdev); - /* Wait for the active count to reach zero. This is not the same as * waiting for a power down, since not all policies power down when this * reaches zero. */ @@ -186,9 +187,6 @@ void kbase_pm_resume(struct kbase_device *kbdev) /* Initial active call, to power on the GPU/cores if needed */ kbase_pm_context_active(kbdev); - /* Re-enable instrumentation, if it was previously disabled */ - kbase_instr_hwcnt_resume(kbdev); - /* Resume any blocked atoms (which may cause contexts to be scheduled in * and dependent atoms to run) */ kbase_resume_suspended_soft_jobs(kbdev); @@ -200,5 +198,8 @@ void kbase_pm_resume(struct kbase_device *kbdev) /* Matching idle call, to power off the GPU/cores if we didn't actually * need it and the policy doesn't want it on */ kbase_pm_context_idle(kbdev); + + /* Resume vinstr operation */ + kbase_vinstr_resume(kbdev->vinstr_ctx); } |