diff options
author | Lajos Molnar <lajos@ti.com> | 2011-10-13 23:46:04 -0500 |
---|---|---|
committer | Iliyan Malchev <malchev@google.com> | 2011-10-17 19:32:30 -0700 |
commit | e9858ecc1d41ff5bd81651e6b405c1ad9b3de4ba (patch) | |
tree | 3c32fdbac86936820cb8895235eab470cc39bcc1 | |
parent | 02150d77cba303ea6c532fa740910fbab5e3e1cc (diff) | |
download | omap4xxx-omapzoom-e9858ecc1d41ff5bd81651e6b405c1ad9b3de4ba.tar.gz |
hwc: add tolerance to video aspect ratio changes
Slight changes in the aspect ratio of the external layer occur
when the layer is resized on screen due to rounding errors.
Add tolerance, so we do not reconfigure HDMI due to these slight
changes.
Change-Id: I4b1b4c5dfb80ebbd83e26eb78dd86269b756307c
-rw-r--r-- | hwc/hwc.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -1113,7 +1113,8 @@ static int omap4_hwc_prepare(struct hwc_composer_device *dev, hwc_layer_list_t* /* adjust hdmi mode based on resolution */ if (xres != hwc_dev->ext.last_xres_used || yres != hwc_dev->ext.last_yres_used || - xpy != hwc_dev->ext.last_xpy) { + xpy < hwc_dev->ext.last_xpy * (1.f - ASPECT_RATIO_TOLERANCE) || + xpy * (1.f - ASPECT_RATIO_TOLERANCE) > hwc_dev->ext.last_xpy) { LOGD("set up HDMI for %d*%d\n", xres, yres); if (omap4_hwc_set_best_hdmi_mode(hwc_dev, xres, yres, xpy)) { o->cfg.enabled = 0; |