hwc: do not allow gsc downscaling by exactly max_downscale
authorGreg Hackmann <ghackmann@google.com>
Fri, 27 Sep 2013 17:23:41 +0000 (10:23 -0700)
committerGreg Hackmann <ghackmann@google.com>
Fri, 27 Sep 2013 17:23:43 +0000 (10:23 -0700)
The Gscaler registers do not have enough bits to represent downscaling
by exactly 16x

Bug: 10946861

Change-Id: I6a9921193d9188bca2344815c29863c550c5e3dd
Signed-off-by: Greg Hackmann <ghackmann@google.com>
libhwc/hwc.cpp

index d5a76032cc4e2d2ee655d1718f413aeec9c53c1f..546b047283cae6625d8dd2a94362e1b5d669d2e8 100644 (file)
@@ -401,11 +401,11 @@ static bool exynos5_supports_gscaler(hwc_layer_1_t &layer, int format,
             dst_crop_w_aligned(dest_w) &&
             handle->stride <= max_w &&
             handle->stride % GSC_W_ALIGNMENT == 0 &&
-            src_w <= dest_w * max_downscale &&
+            src_w < dest_w * max_downscale &&
             dest_w <= src_w * max_upscale &&
             handle->vstride <= max_h &&
             handle->vstride % GSC_H_ALIGNMENT == 0 &&
-            src_h <= dest_h * max_downscale &&
+            src_h < dest_h * max_downscale &&
             dest_h <= src_h * max_upscale &&
             // per 46.2
             (!rot90or270 || layer.sourceCrop.top % 2 == 0) &&