summaryrefslogtreecommitdiff
path: root/mali_kbase/mali_kbase_pm.c
diff options
context:
space:
mode:
authorSiddharth Kapoor <ksiddharth@google.com>2021-11-26 19:02:16 +0800
committerSiddharth Kapoor <ksiddharth@google.com>2021-12-06 11:32:22 +0800
commit93dab6a30cedaf7e6307492cbaa5f651514a7764 (patch)
tree8290861c9f9c7144bc8ee907089a063f6a6041d0 /mali_kbase/mali_kbase_pm.c
parente2249eb4503b74f19f9081b3e68fcbc824afdc10 (diff)
parent0c596dc70431fa2c70021fa1685e3efc969a852d (diff)
downloadgpu-93dab6a30cedaf7e6307492cbaa5f651514a7764.tar.gz
Merge r34p0-00dev1 from upstream into android-gs-pixel-5.10-gs101
Change-Id: I051ad3af9ac645fb8585219c48210df424a27807 Signed-off-by: Siddharth Kapoor <ksiddharth@google.com>
Diffstat (limited to 'mali_kbase/mali_kbase_pm.c')
-rw-r--r--mali_kbase/mali_kbase_pm.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/mali_kbase/mali_kbase_pm.c b/mali_kbase/mali_kbase_pm.c
index 74edb92..4771263 100644
--- a/mali_kbase/mali_kbase_pm.c
+++ b/mali_kbase/mali_kbase_pm.c
@@ -26,6 +26,7 @@
#include <mali_kbase.h>
#include <gpu/mali_kbase_gpu_regmap.h>
#include <mali_kbase_vinstr.h>
+#include <mali_kbase_kinstr_prfcnt.h>
#include <mali_kbase_hwcnt_context.h>
#include <mali_kbase_pm.h>
@@ -76,13 +77,13 @@ int kbase_pm_context_active_handle_suspend(struct kbase_device *kbdev,
case KBASE_PM_SUSPEND_HANDLER_DONT_REACTIVATE:
if (kbdev->pm.active_count != 0)
break;
- /* FALLTHROUGH */
+ fallthrough;
case KBASE_PM_SUSPEND_HANDLER_DONT_INCREASE:
kbase_pm_unlock(kbdev);
return 1;
case KBASE_PM_SUSPEND_HANDLER_NOT_POSSIBLE:
- /* FALLTHROUGH */
+ fallthrough;
default:
KBASE_DEBUG_ASSERT_MSG(false, "unreachable");
break;
@@ -147,10 +148,11 @@ void kbase_pm_driver_suspend(struct kbase_device *kbdev)
{
KBASE_DEBUG_ASSERT(kbdev);
- /* Suspend vinstr. This blocks until the vinstr worker and timer are
- * no longer running.
+ /* Suspend HW counter intermediaries. This blocks until workers and timers
+ * are no longer running.
*/
kbase_vinstr_suspend(kbdev->vinstr_ctx);
+ kbase_kinstr_prfcnt_suspend(kbdev->kinstr_prfcnt_ctx);
/* Disable GPU hardware counters.
* This call will block until counters are disabled.
@@ -266,8 +268,9 @@ void kbase_pm_driver_resume(struct kbase_device *kbdev, bool arb_gpu_start)
spin_unlock_irqrestore(&kbdev->hwaccess_lock, flags);
#endif
- /* Resume vinstr */
+ /* Resume HW counters intermediaries. */
kbase_vinstr_resume(kbdev->vinstr_ctx);
+ kbase_kinstr_prfcnt_resume(kbdev->kinstr_prfcnt_ctx);
}
void kbase_pm_suspend(struct kbase_device *kbdev)