summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBaldev Sahu <bsahu@codeaurora.org>2021-09-27 10:33:45 +0530
committerGerrit - the friendly Code Review server <code-review@localhost>2021-10-14 00:49:50 -0700
commit75d4a00b6480a315fc1956a4fc8e20cf64e2ec3b (patch)
tree8fd0f039ad157c436c1fd2555564fcb62b2426e8
parent533cb619ee8e9a5727320e56046a04784c8bc0aa (diff)
hwc2: Do not report cmd mode config if its same as video
Do not report cmd mode config to SF if its w/h/fps are same a video mode config for video mode panel. Change-Id: I0819b937b1818655c6fe7d119308c465011beb6b
-rw-r--r--sdm/include/core/display_interface.h2
-rw-r--r--sdm/libs/hwc2/hwc_display.cpp15
-rw-r--r--sdm/libs/hwc2/hwc_display.h2
-rw-r--r--sdm/libs/hwc2/hwc_display_builtin.cpp24
-rw-r--r--sdm/libs/hwc2/hwc_display_builtin.h1
5 files changed, 23 insertions, 21 deletions
diff --git a/sdm/include/core/display_interface.h b/sdm/include/core/display_interface.h
index 8341f528..4ef6fe98 100644
--- a/sdm/include/core/display_interface.h
+++ b/sdm/include/core/display_interface.h
@@ -219,7 +219,7 @@ struct DisplayConfigVariableInfo : public DisplayConfigGroupInfo {
bool operator==(const DisplayConfigVariableInfo& info) const {
return ((x_pixels == info.x_pixels) && (y_pixels == info.y_pixels) && (x_dpi == info.x_dpi) &&
(y_dpi == info.y_dpi) && (fps == info.fps) && (vsync_period_ns == info.vsync_period_ns)
- && (is_yuv == info.is_yuv) && (smart_panel == info.smart_panel));
+ && (is_yuv == info.is_yuv));
}
};
diff --git a/sdm/libs/hwc2/hwc_display.cpp b/sdm/libs/hwc2/hwc_display.cpp
index 937c0a78..2b67f8fd 100644
--- a/sdm/libs/hwc2/hwc_display.cpp
+++ b/sdm/libs/hwc2/hwc_display.cpp
@@ -550,11 +550,18 @@ void HWCDisplay::UpdateConfigs() {
DisplayConfigVariableInfo info = {};
GetDisplayAttributesForConfig(INT(i), &info);
bool config_exists = false;
+
+ if (!smart_panel_config_ && info.smart_panel) {
+ smart_panel_config_ = true;
+ }
+
for (auto &config : variable_config_map_) {
if (config.second == info) {
- config_exists = true;
- hwc_config_map_.at(i) = config.first;
- break;
+ if (enable_poms_during_doze_ || (config.second.smart_panel == info.smart_panel)) {
+ config_exists = true;
+ hwc_config_map_.at(i) = config.first;
+ break;
+ }
}
}
@@ -566,7 +573,7 @@ void HWCDisplay::UpdateConfigs() {
// Update num config count.
num_configs_ = UINT32(variable_config_map_.size());
- DLOGI("num_configs = %d", num_configs_);
+ DLOGI("num_configs = %d smart_panel_config_ = %d", num_configs_, smart_panel_config_);
}
int HWCDisplay::Deinit() {
diff --git a/sdm/libs/hwc2/hwc_display.h b/sdm/libs/hwc2/hwc_display.h
index 056ab6ec..01dd66c5 100644
--- a/sdm/libs/hwc2/hwc_display.h
+++ b/sdm/libs/hwc2/hwc_display.h
@@ -469,6 +469,8 @@ class HWCDisplay : public DisplayEventHandler {
bool fast_path_composition_ = false;
bool client_connected_ = true;
bool pending_config_ = false;
+ bool smart_panel_config_ = false;
+ bool enable_poms_during_doze_ = false;
uint32_t vsyncs_to_apply_rate_change_ = 1;
hwc2_config_t pending_refresh_rate_config_ = UINT_MAX;
int64_t pending_refresh_rate_refresh_time_ = INT64_MAX;
diff --git a/sdm/libs/hwc2/hwc_display_builtin.cpp b/sdm/libs/hwc2/hwc_display_builtin.cpp
index bbec3f75..235cab95 100644
--- a/sdm/libs/hwc2/hwc_display_builtin.cpp
+++ b/sdm/libs/hwc2/hwc_display_builtin.cpp
@@ -157,6 +157,13 @@ int HWCDisplayBuiltIn::Init() {
use_metadata_refresh_rate_ = false;
}
+ int value = 0;
+ HWCDebugHandler::Get()->GetProperty(ENABLE_POMS_DURING_DOZE, &value);
+ enable_poms_during_doze_ = (value == 1);
+ if (enable_poms_during_doze_) {
+ DLOGI("Enable POMS during Doze mode %" PRIu64 , id_);
+ }
+
int status = HWCDisplay::Init();
if (status) {
return status;
@@ -166,20 +173,13 @@ int HWCDisplayBuiltIn::Init() {
HWCDebugHandler::Get()->GetProperty(ENABLE_DEFAULT_COLOR_MODE,
&default_mode_status_);
- int value = 0;
+ value = 0;
HWCDebugHandler::Get()->GetProperty(ENABLE_OPTIMIZE_REFRESH, &value);
enable_optimize_refresh_ = (value == 1);
if (enable_optimize_refresh_) {
DLOGI("Drop redundant drawcycles %d", id_);
}
- value = 0;
- HWCDebugHandler::Get()->GetProperty(ENABLE_POMS_DURING_DOZE, &value);
- enable_poms_during_doze_ = (value == 1);
- if (enable_poms_during_doze_) {
- DLOGI("Enable POMS during Doze mode %" PRIu64 , id_);
- }
-
int vsyncs = 0;
HWCDebugHandler::Get()->GetProperty(DEFER_FPS_FRAME_COUNT, &vsyncs);
if (vsyncs > 0) {
@@ -1064,13 +1064,7 @@ bool HWCDisplayBuiltIn::HasSmartPanelConfig(void) {
return IsSmartPanelConfig(config);
}
- for (auto &config : variable_config_map_) {
- if (config.second.smart_panel) {
- return true;
- }
- }
-
- return false;
+ return smart_panel_config_;
}
} // namespace sdm
diff --git a/sdm/libs/hwc2/hwc_display_builtin.h b/sdm/libs/hwc2/hwc_display_builtin.h
index 232c31a1..d3b0661d 100644
--- a/sdm/libs/hwc2/hwc_display_builtin.h
+++ b/sdm/libs/hwc2/hwc_display_builtin.h
@@ -151,7 +151,6 @@ class HWCDisplayBuiltIn : public HWCDisplay {
bool pending_refresh_ = true;
bool enable_optimize_refresh_ = false;
bool hdr_present_ = false;
- bool enable_poms_during_doze_ = false;
// Members for 1 frame capture in a client provided buffer
bool frame_capture_buffer_queued_ = false;