diff options
-rw-r--r-- | sdm/libs/core/fb/hw_hdmi.cpp | 14 |
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_); |