Merge "sdm: Add a property to disable scalar"
diff --git a/libqdutils/display_config.cpp b/libqdutils/display_config.cpp
index a4381df..3941137 100644
--- a/libqdutils/display_config.cpp
+++ b/libqdutils/display_config.cpp
@@ -280,6 +280,8 @@
return err;
}
+}// namespace
+
// ----------------------------------------------------------------------------
// Screen refresh for native daemons linking dynamically to libqdutils
// ----------------------------------------------------------------------------
@@ -288,5 +290,3 @@
ret = screenRefresh();
return ret;
}
-
-}// namespace
diff --git a/sdm/include/utils/constants.h b/sdm/include/utils/constants.h
index a73bce6..57c5a86 100644
--- a/sdm/include/utils/constants.h
+++ b/sdm/include/utils/constants.h
@@ -89,6 +89,7 @@
const int kThreadPriorityUrgent = -9;
const int kMaxRotatePerLayer = 2;
const uint32_t kMaxBlitTargetLayers = 2;
+ const int kPageSize = 4096;
typedef void * Handle;
diff --git a/sdm/libs/core/fb/hw_hdmi.cpp b/sdm/libs/core/fb/hw_hdmi.cpp
index 44b0053..b1dc544 100644
--- a/sdm/libs/core/fb/hw_hdmi.cpp
+++ b/sdm/libs/core/fb/hw_hdmi.cpp
@@ -169,7 +169,7 @@
DisplayError HWHDMI::ReadEDIDInfo() {
ssize_t length = -1;
- char edid_str[PAGE_SIZE] = {'\0'};
+ char edid_str[kPageSize] = {'\0'};
char edid_path[kMaxStringLength] = {'\0'};
snprintf(edid_path, sizeof(edid_path), "%s%d/edid_modes", fb_path_, fb_node_index_);
int edid_file = Sys::open_(edid_path, O_RDONLY);
@@ -440,7 +440,7 @@
}
int HWHDMI::OpenResolutionFile(int file_mode) {
- char file_path[PATH_MAX];
+ char file_path[kMaxStringLength];
memset(file_path, 0, sizeof(file_path));
snprintf(file_path , sizeof(file_path), "%s%d/res_info", fb_path_, fb_node_index_);
@@ -455,7 +455,7 @@
// Method to request HDMI driver to write a new page of timing info into res_info node
void HWHDMI::RequestNewPage(uint32_t page_number) {
- char page_string[PAGE_SIZE];
+ char page_string[kPageSize];
int fd = OpenResolutionFile(O_WRONLY);
if (fd < 0) {
return;
@@ -481,7 +481,7 @@
return false;
}
- if ((bytes_read = Sys::pread_(fd, config_buffer, PAGE_SIZE, 0)) != 0) {
+ if ((bytes_read = Sys::pread_(fd, config_buffer, kPageSize, 0)) != 0) {
is_file_read = true;
}
close(fd);
@@ -499,14 +499,14 @@
uint32_t size = sizeof(msm_hdmi_mode_timing_info);
while (true) {
- char config_buffer[PAGE_SIZE] = {0};
+ char config_buffer[kPageSize] = {0};
msm_hdmi_mode_timing_info *info = reinterpret_cast<msm_hdmi_mode_timing_info *>(config_buffer);
if (!ReadResolutionFile(config_buffer)) {
break;
}
- while (info->video_format && size < PAGE_SIZE && config_index < hdmi_mode_count_) {
+ while (info->video_format && size < kPageSize && config_index < hdmi_mode_count_) {
supported_video_modes_[config_index] = *info;
size += sizeof(msm_hdmi_mode_timing_info);