From c0b4a4f1a8b088964ded32dfee294b9199c71534 Mon Sep 17 00:00:00 2001 From: Greg Hackmann Date: Fri, 27 Sep 2013 10:23:41 -0700 Subject: [PATCH] hwc: do not allow gsc downscaling by exactly max_downscale The Gscaler registers do not have enough bits to represent downscaling by exactly 16x Bug: 10946861 Change-Id: I6a9921193d9188bca2344815c29863c550c5e3dd Signed-off-by: Greg Hackmann --- libhwc/hwc.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libhwc/hwc.cpp b/libhwc/hwc.cpp index d5a7603..546b047 100644 --- a/libhwc/hwc.cpp +++ b/libhwc/hwc.cpp @@ -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) && -- 2.20.1