summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRamkumar Radhakrishnan <ramkumar@codeaurora.org>2016-08-26 17:38:28 -0700
committerRamkumar Radhakrishnan <ramkumar@codeaurora.org>2016-08-26 18:27:07 -0700
commita30e90d920ffba0cfd0b7c6bf69dbe85587ce198 (patch)
tree701a94c97bc118d6d90389320df5ef593fa94af0
parent36644524adb7e804d8e4df1f26c44843be455923 (diff)
downloadandroid_hardware_qcom_display-a30e90d920ffba0cfd0b7c6bf69dbe85587ce198.tar.gz
android_hardware_qcom_display-a30e90d920ffba0cfd0b7c6bf69dbe85587ce198.tar.bz2
android_hardware_qcom_display-a30e90d920ffba0cfd0b7c6bf69dbe85587ce198.zip
sdm: Handle HDMI mode change with different pixel format
Notify pixel format change through put vscreeninfo ioctl while changing the hdmi mode in DRC feature. Change-Id: I4a786566440a60505cefcbb2dbe4ea08cc0c6322
-rw-r--r--sdm/libs/core/fb/hw_hdmi.cpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/sdm/libs/core/fb/hw_hdmi.cpp b/sdm/libs/core/fb/hw_hdmi.cpp
index 6fb727197..05b0d0dde 100644
--- a/sdm/libs/core/fb/hw_hdmi.cpp
+++ b/sdm/libs/core/fb/hw_hdmi.cpp
@@ -733,8 +733,7 @@ DisplayError HWHDMI::GetDynamicFrameRateMode(uint32_t refresh_rate, uint32_t *mo
for (i = 0; i < hdmi_mode_count_; i++) {
msm_hdmi_mode_timing_info *timing_mode = &supported_video_modes_[i];
if (cur->active_h == timing_mode->active_h &&
- cur->active_v == timing_mode->active_v &&
- cur->pixel_formats == timing_mode->pixel_formats ) {
+ cur->active_v == timing_mode->active_v) {
int cur_refresh_rate_diff = static_cast<int>(timing_mode->refresh_rate) -
static_cast<int>(refresh_rate);
if (abs(pre_refresh_rate_diff) > abs(cur_refresh_rate_diff)) {
@@ -750,6 +749,12 @@ DisplayError HWHDMI::GetDynamicFrameRateMode(uint32_t refresh_rate, uint32_t *mo
GetConfigIndex(dst->video_format, config_index);
+ // When there is a change in pixel format set the mode using FBIOPUT_VSCREENINFO info ioctl.
+ if (cur->pixel_formats != dst->pixel_formats) {
+ *mode = kModeSuspendResume;
+ return kErrorNone;
+ }
+
data->hor_front_porch = dst->front_porch_h;
data->hor_back_porch = dst->back_porch_h;
data->hor_pulse_width = dst->pulse_width_h;
@@ -796,6 +801,11 @@ DisplayError HWHDMI::SetRefreshRate(uint32_t refresh_rate) {
return error;
}
+ if (mode == kModeSuspendResume) {
+ SetDisplayAttributes(config_index);
+ return kErrorNone;
+ }
+
snprintf(mode_path, sizeof(mode_path), "%s%d/msm_fb_dfps_mode", fb_path_, fb_node_index_);
snprintf(node_path, sizeof(node_path), "%s%d/dynamic_fps", fb_path_, fb_node_index_);