summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorqctecmdr <qctecmdr@localhost>2022-08-07 20:35:47 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2022-08-07 20:35:47 -0700
commit388677ba0ba51150bf4ef9edde4140e8f86a02bf (patch)
treed2558c02cf168b88d269951a726ba27c9d685ddf
parent0bc1803916d6f80ac1e96f6f93829c8d5d39a51c (diff)
parente64fe72529c09af83f8eeefa4d4014ab8edc644b (diff)
Merge "composer: Control large composition hint with the property"
-rw-r--r--composer/hwc_display_builtin.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/composer/hwc_display_builtin.cpp b/composer/hwc_display_builtin.cpp
index fbff70bb..da768d82 100644
--- a/composer/hwc_display_builtin.cpp
+++ b/composer/hwc_display_builtin.cpp
@@ -1337,10 +1337,8 @@ int HWCDisplayBuiltIn::PostInit() {
}
bool HWCDisplayBuiltIn::NeedsLargeCompPerfHint() {
- if (!cpu_hint_ || !perf_hint_large_comp_cycle_) {
- DLOGV_IF(kTagResources, "cpu_hint_:%d not initialized or property:%d not set",
- !cpu_hint_, !perf_hint_large_comp_cycle_);
-
+ if (!cpu_hint_) {
+ DLOGV_IF(kTagResources, "CPU hint is not initialized");
return false;
}
@@ -1492,8 +1490,12 @@ HWC2::Error HWCDisplayBuiltIn::CommitOrPrepare(bool validate_only,
auto status = HWCDisplay::CommitOrPrepare(validate_only, out_retire_fence, out_num_types,
out_num_requests, needs_commit);
- bool needs_hint = NeedsLargeCompPerfHint();
- HandleLargeCompositionHint(!needs_hint);
+
+ if (perf_hint_large_comp_cycle_) {
+ bool needs_hint = NeedsLargeCompPerfHint();
+ HandleLargeCompositionHint(!needs_hint);
+ }
+
return status;
}