diff options
author | Jean-Baptiste Queru <jbq@google.com> | 2012-12-03 18:17:14 -0800 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2012-12-03 18:17:14 -0800 |
commit | 32f08e77913e7938f5982276a3c44d93d8091498 (patch) | |
tree | 24390eb368f1a19bfe23dcdfacba308a6dc25c2e | |
parent | 015960eb1f62f682432137441737d8440a871536 (diff) | |
parent | 646975c9e41ec806ac6547b123dbaaf89859f1d4 (diff) | |
download | omap4xxx-omapzoom-32f08e77913e7938f5982276a3c44d93d8091498.tar.gz |
Merge "Panda: Set lcd_xpy to 1 if the x/y res and dimensions are not set"tools_r22jb-mr1.1-dev-plus-aospjb-mr1-dev-plus-aosp
-rw-r--r-- | hwc/hwc.c | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -2054,8 +2054,15 @@ static int omap4_hwc_device_open(const hw_module_t* module, const char* name, err = -errno; goto done; } - hwc_dev->ext.lcd_xpy = (float) hwc_dev->fb_dis.width_in_mm / hwc_dev->fb_dis.timings.x_res / - hwc_dev->fb_dis.height_in_mm * hwc_dev->fb_dis.timings.y_res; + + if (hwc_dev->fb_dis.timings.x_res && hwc_dev->fb_dis.height_in_mm) { + hwc_dev->ext.lcd_xpy = (float) + hwc_dev->fb_dis.width_in_mm / hwc_dev->fb_dis.timings.x_res / + hwc_dev->fb_dis.height_in_mm * hwc_dev->fb_dis.timings.y_res; + } else { + ALOGE("x resolution or the height is not populated setting lcd_xpy to 1.0\n"); + hwc_dev->ext.lcd_xpy = 1.0; + } if (pipe(hwc_dev->pipe_fds) == -1) { ALOGE("failed to event pipe (%d): %m", errno); |