From 1d7e78d7877f054f7b96d6a35d50255e76aed44f Mon Sep 17 00:00:00 2001 From: Tobias Jakobi Date: Tue, 24 Feb 2015 15:20:40 +0100 Subject: exynos: replace G2D_DOUBLE_TO_FIXED macro with function This also avoids the floating point conversion steps and just uses pure integer arithmetic. Since the G2D hardware scaling approach is a bit unintuitive, document it in the function as well. v2: Explicitly mention the normalization constant. v3: Use common commenting style as pointed out by Emil Velikov . Signed-off-by: Tobias Jakobi Reviewed-by: Emil Velikov Tested-by: Joonyoung Shim --- exynos/fimg2d.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'exynos/fimg2d.h') diff --git a/exynos/fimg2d.h b/exynos/fimg2d.h index 4785e2f0..8e0321cf 100644 --- a/exynos/fimg2d.h +++ b/exynos/fimg2d.h @@ -25,8 +25,6 @@ #define G2D_MAX_CMD_LIST_NR 64 #define G2D_PLANE_MAX_NR 2 -#define G2D_DOUBLE_TO_FIXED(d) ((unsigned int)((d) * 65536.0)) - enum e_g2d_color_mode { /* COLOR FORMAT */ G2D_COLOR_FMT_XRGB8888, -- cgit v1.2.3