summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKrishna Srinivas <krisrini@codeaurora.org>2016-08-24 16:44:16 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2016-08-28 12:05:41 -0700
commit7b5fe87e3052fe6802e380c649d845b887eaa486 (patch)
tree5efc0ef29ea2d4d0b27dddfd1c835688e3d8c57f
parenta30e90d920ffba0cfd0b7c6bf69dbe85587ce198 (diff)
downloadandroid_hardware_qcom_display-7b5fe87e3052fe6802e380c649d845b887eaa486.tar.gz
android_hardware_qcom_display-7b5fe87e3052fe6802e380c649d845b887eaa486.tar.bz2
android_hardware_qcom_display-7b5fe87e3052fe6802e380c649d845b887eaa486.zip
libhdmi: set sync polarity based on HDMI mode
Populate the screen info polarity based on the current HDMI mode timing info. Change-Id: I947d2afb0e998dd302f5d91bbf329b8b07172eb8
-rw-r--r--sdm/libs/core/fb/hw_hdmi.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/sdm/libs/core/fb/hw_hdmi.cpp b/sdm/libs/core/fb/hw_hdmi.cpp
index 05b0d0dde..3c176077c 100644
--- a/sdm/libs/core/fb/hw_hdmi.cpp
+++ b/sdm/libs/core/fb/hw_hdmi.cpp
@@ -75,6 +75,16 @@ static bool MapHDMIDisplayTiming(const msm_hdmi_mode_timing_info *mode,
info->grayscale = V4L2_PIX_FMT_NV12;
}
+ if (!mode->active_low_h)
+ info->sync |= FB_SYNC_HOR_HIGH_ACT;
+ else
+ info->sync &= ~FB_SYNC_HOR_HIGH_ACT;
+
+ if (!mode->active_low_v)
+ info->sync |= FB_SYNC_VERT_HIGH_ACT;
+ else
+ info->sync &= ~FB_SYNC_VERT_HIGH_ACT;
+
return true;
}