summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2021-11-29 07:13:23 -0800
committerLinux Build Service Account <lnxbuild@localhost>2021-11-29 07:13:23 -0800
commit1a45165b9a1dcc07c60a9513deab09d6da717288 (patch)
tree4e787f6cfe8ec01af4a7850a9443852f9403c435
parent2e497d0353d9fb5cac3b0e7d61bedeeab15387d9 (diff)
parent2827bd1b71b657d7e8cb070d7f25baa889775a44 (diff)
Merge 2827bd1b71b657d7e8cb070d7f25baa889775a44 on remote branch
Change-Id: I47bed760ba98ae85384a6ce033bdce8de650dc58
-rw-r--r--composer/hwc_display.cpp25
-rw-r--r--composer/hwc_display.h2
-rw-r--r--composer/hwc_display_builtin.cpp15
-rw-r--r--composer/hwc_display_builtin.h1
-rw-r--r--gralloc/gr_utils.cpp15
-rw-r--r--sdm/include/core/display_interface.h2
-rw-r--r--sdm/libs/core/drm/hw_device_drm.cpp4
7 files changed, 32 insertions, 32 deletions
diff --git a/composer/hwc_display.cpp b/composer/hwc_display.cpp
index e0074945..560dd33c 100644
--- a/composer/hwc_display.cpp
+++ b/composer/hwc_display.cpp
@@ -519,6 +519,16 @@ int HWCDisplay::Init() {
return -EINVAL;
}
+ bool is_primary_ = display_intf_->IsPrimaryDisplay();
+ if (is_primary_) {
+ 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_);
+ }
+ }
+
UpdateConfigs();
tone_mapper_ = new HWCToneMapper(buffer_allocator_);
@@ -556,11 +566,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;
+ }
}
}
@@ -578,7 +595,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/composer/hwc_display.h b/composer/hwc_display.h
index e42443c8..9bcb581a 100644
--- a/composer/hwc_display.h
+++ b/composer/hwc_display.h
@@ -542,6 +542,7 @@ class HWCDisplay : public DisplayEventHandler {
bool client_connected_ = true;
bool pending_config_ = false;
bool has_client_composition_ = false;
+ bool smart_panel_config_ = 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;
@@ -559,6 +560,7 @@ class HWCDisplay : public DisplayEventHandler {
int32_t client_dataspace_ = 0;
hwc_region_t client_damage_region_ = {};
bool display_idle_ = false;
+ bool enable_poms_during_doze_ = false;
private:
void DumpInputBuffers(void);
diff --git a/composer/hwc_display_builtin.cpp b/composer/hwc_display_builtin.cpp
index 86a149ba..9f313075 100644
--- a/composer/hwc_display_builtin.cpp
+++ b/composer/hwc_display_builtin.cpp
@@ -153,13 +153,6 @@ int HWCDisplayBuiltIn::Init() {
&window_rect_.right, &window_rect_.bottom) != kErrorUndefined;
DLOGI("Window rect : [%f %f %f %f]", window_rect_.left, window_rect_.top,
window_rect_.right, window_rect_.bottom);
-
- 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_);
- }
}
value = 0;
@@ -1474,13 +1467,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_;
}
int HWCDisplayBuiltIn::Deinit() {
diff --git a/composer/hwc_display_builtin.h b/composer/hwc_display_builtin.h
index e1a2d25d..6790dda7 100644
--- a/composer/hwc_display_builtin.h
+++ b/composer/hwc_display_builtin.h
@@ -206,7 +206,6 @@ class HWCDisplayBuiltIn : public HWCDisplay, public SyncTask<LayerStitchTaskCode
void *output_buffer_base_ = nullptr;
bool pending_refresh_ = true;
bool enable_optimize_refresh_ = false;
- bool enable_poms_during_doze_ = false;
// Members for 1 frame capture in a client provided buffer
bool frame_capture_buffer_queued_ = false;
diff --git a/gralloc/gr_utils.cpp b/gralloc/gr_utils.cpp
index d9559122..7c6265ed 100644
--- a/gralloc/gr_utils.cpp
+++ b/gralloc/gr_utils.cpp
@@ -1080,17 +1080,12 @@ void GetAlignedWidthAndHeight(const BufferInfo &info, unsigned int *alignedw,
// Below should be only YUV family
switch (format) {
case HAL_PIXEL_FORMAT_YCrCb_420_SP:
- /*
- * Todo: relook this alignment again
- * Change made to unblock the software EIS feature from camera
- * Currently using same alignment as camera doing
- */
- aligned_w = INT(VENUS_Y_STRIDE(COLOR_FMT_NV21, width));
- aligned_h = INT(VENUS_Y_SCANLINES(COLOR_FMT_NV21, height));
- break;
case HAL_PIXEL_FORMAT_YCbCr_420_SP:
- aligned_w = INT(VENUS_Y_STRIDE(COLOR_FMT_NV12, width));
- aligned_h = INT(VENUS_Y_SCANLINES(COLOR_FMT_NV12, height));
+ if (AdrenoMemInfo::GetInstance() == nullptr) {
+ return;
+ }
+ alignment = AdrenoMemInfo::GetInstance()->GetGpuPixelAlignment();
+ aligned_w = ALIGN(width, alignment);
break;
case HAL_PIXEL_FORMAT_YCrCb_420_SP_ADRENO:
aligned_w = ALIGN(width, alignment);
diff --git a/sdm/include/core/display_interface.h b/sdm/include/core/display_interface.h
index bc86c213..9b6fa232 100644
--- a/sdm/include/core/display_interface.h
+++ b/sdm/include/core/display_interface.h
@@ -232,7 +232,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/core/drm/hw_device_drm.cpp b/sdm/libs/core/drm/hw_device_drm.cpp
index 3c80d911..ac726fc9 100644
--- a/sdm/libs/core/drm/hw_device_drm.cpp
+++ b/sdm/libs/core/drm/hw_device_drm.cpp
@@ -651,14 +651,14 @@ DisplayError HWDeviceDRM::PopulateDisplayAttributes(uint32_t index) {
DLOGI("Display attributes[%d]: WxH: %dx%d, DPI: %fx%f, FPS: %d, LM_SPLIT: %d, V_BACK_PORCH: %d," \
" V_FRONT_PORCH: %d, V_PULSE_WIDTH: %d, V_TOTAL: %d, H_TOTAL: %d, CLK: %dKHZ," \
- " TOPOLOGY: %d, HW_SPLIT: %d", index, display_attributes_[index].x_pixels,
+ " TOPOLOGY: %d, HW_SPLIT: %d SMART_PANEL: %d", index, display_attributes_[index].x_pixels,
display_attributes_[index].y_pixels, display_attributes_[index].x_dpi,
display_attributes_[index].y_dpi, display_attributes_[index].fps,
display_attributes_[index].is_device_split, display_attributes_[index].v_back_porch,
display_attributes_[index].v_front_porch, display_attributes_[index].v_pulse_width,
display_attributes_[index].v_total, display_attributes_[index].h_total,
display_attributes_[index].clock_khz, display_attributes_[index].topology,
- mixer_attributes_.split_type);
+ mixer_attributes_.split_type, display_attributes_[index].smart_panel);
return kErrorNone;
}