From d4735dc7995caebf8ddda24a31f76dfdd199873b Mon Sep 17 00:00:00 2001 From: "hyesoo.yu" Date: Fri, 15 Sep 2017 17:34:08 +0900 Subject: [PATCH] [COMMON] g2d: fix unintended sign extension Multiplying crop_w and crop_h could be promoted in type signed 32bit, then signed extended to type unsigned long long, so fix signed extension. Change-Id: Id10e2c04fef0ab1a682bc5b65c7d86e2da256725 Signed-off-by: hyesoo.yu --- drivers/gpu/exynos/g2d/g2d_perf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/exynos/g2d/g2d_perf.c b/drivers/gpu/exynos/g2d/g2d_perf.c index b60ed1160bf0..e9e613cde160 100644 --- a/drivers/gpu/exynos/g2d/g2d_perf.c +++ b/drivers/gpu/exynos/g2d/g2d_perf.c @@ -72,7 +72,7 @@ static u32 perf_basis[PPC_SC] = {1024, 1023, 256, 113, 64, 0}; static char perf_index_sc(struct g2d_performance_layer_data *layer) { u32 ratio = (((u64)layer->window_w * layer->window_h) << 10) / - (layer->crop_w * layer->crop_h); + ((u32)layer->crop_w * layer->crop_h); int i; for (i = 0; i < PPC_SC; i++) { -- 2.20.1