sdm: Fix compilation errors.
Change-Id: I5155bc649492caac3d2cb0873ab6b90d95c35201
This commit is contained in:
@@ -89,6 +89,7 @@ namespace sdm {
|
|||||||
const int kThreadPriorityUrgent = -9;
|
const int kThreadPriorityUrgent = -9;
|
||||||
const int kMaxRotatePerLayer = 2;
|
const int kMaxRotatePerLayer = 2;
|
||||||
const uint32_t kMaxBlitTargetLayers = 2;
|
const uint32_t kMaxBlitTargetLayers = 2;
|
||||||
|
const int kPageSize = 4096;
|
||||||
|
|
||||||
typedef void * Handle;
|
typedef void * Handle;
|
||||||
|
|
||||||
|
|||||||
@@ -169,7 +169,7 @@ DisplayError HWHDMI::GetNumDisplayAttributes(uint32_t *count) {
|
|||||||
|
|
||||||
DisplayError HWHDMI::ReadEDIDInfo() {
|
DisplayError HWHDMI::ReadEDIDInfo() {
|
||||||
ssize_t length = -1;
|
ssize_t length = -1;
|
||||||
char edid_str[PAGE_SIZE] = {'\0'};
|
char edid_str[kPageSize] = {'\0'};
|
||||||
char edid_path[kMaxStringLength] = {'\0'};
|
char edid_path[kMaxStringLength] = {'\0'};
|
||||||
snprintf(edid_path, sizeof(edid_path), "%s%d/edid_modes", fb_path_, fb_node_index_);
|
snprintf(edid_path, sizeof(edid_path), "%s%d/edid_modes", fb_path_, fb_node_index_);
|
||||||
int edid_file = Sys::open_(edid_path, O_RDONLY);
|
int edid_file = Sys::open_(edid_path, O_RDONLY);
|
||||||
@@ -440,7 +440,7 @@ DisplayError HWHDMI::SetPPFeatures(PPFeaturesConfig &feature_list) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int HWHDMI::OpenResolutionFile(int file_mode) {
|
int HWHDMI::OpenResolutionFile(int file_mode) {
|
||||||
char file_path[PATH_MAX];
|
char file_path[kMaxStringLength];
|
||||||
memset(file_path, 0, sizeof(file_path));
|
memset(file_path, 0, sizeof(file_path));
|
||||||
snprintf(file_path , sizeof(file_path), "%s%d/res_info", fb_path_, fb_node_index_);
|
snprintf(file_path , sizeof(file_path), "%s%d/res_info", fb_path_, fb_node_index_);
|
||||||
|
|
||||||
@@ -455,7 +455,7 @@ int HWHDMI::OpenResolutionFile(int file_mode) {
|
|||||||
|
|
||||||
// Method to request HDMI driver to write a new page of timing info into res_info node
|
// Method to request HDMI driver to write a new page of timing info into res_info node
|
||||||
void HWHDMI::RequestNewPage(uint32_t page_number) {
|
void HWHDMI::RequestNewPage(uint32_t page_number) {
|
||||||
char page_string[PAGE_SIZE];
|
char page_string[kPageSize];
|
||||||
int fd = OpenResolutionFile(O_WRONLY);
|
int fd = OpenResolutionFile(O_WRONLY);
|
||||||
if (fd < 0) {
|
if (fd < 0) {
|
||||||
return;
|
return;
|
||||||
@@ -481,7 +481,7 @@ bool HWHDMI::ReadResolutionFile(char *config_buffer) {
|
|||||||
return false;
|
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;
|
is_file_read = true;
|
||||||
}
|
}
|
||||||
close(fd);
|
close(fd);
|
||||||
@@ -499,14 +499,14 @@ DisplayError HWHDMI::ReadTimingInfo() {
|
|||||||
uint32_t size = sizeof(msm_hdmi_mode_timing_info);
|
uint32_t size = sizeof(msm_hdmi_mode_timing_info);
|
||||||
|
|
||||||
while (true) {
|
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);
|
msm_hdmi_mode_timing_info *info = reinterpret_cast<msm_hdmi_mode_timing_info *>(config_buffer);
|
||||||
|
|
||||||
if (!ReadResolutionFile(config_buffer)) {
|
if (!ReadResolutionFile(config_buffer)) {
|
||||||
break;
|
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;
|
supported_video_modes_[config_index] = *info;
|
||||||
size += sizeof(msm_hdmi_mode_timing_info);
|
size += sizeof(msm_hdmi_mode_timing_info);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user