aboutsummaryrefslogtreecommitdiffstats
path: root/exynos
diff options
context:
space:
mode:
authorTobias Jakobi2014-06-01 11:04:05 -0500
committerRob Clark2014-06-20 14:53:01 -0500
commit3001c232d14a07153c36a0722e196041d6536d30 (patch)
treeade1d2f0b846015b9c4df097c496513543a0dc0c /exynos
parent63f51fc4d34814c80d452e03814b5b495548987b (diff)
downloadexternal-libdrm-3001c232d14a07153c36a0722e196041d6536d30.tar.gz
external-libdrm-3001c232d14a07153c36a0722e196041d6536d30.tar.xz
external-libdrm-3001c232d14a07153c36a0722e196041d6536d30.zip
exynos: fix G2D_DOUBLE_TO_FIXED for non-integer input
The hardware accepts scaling factors formatted in a fixed-point format. The current macro casts to integer first, then multiplies by the fp conversion factor. This does not make any sense. In particular, truly 'fractional' inputs, like 1.5, won't work that way. Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de> Signed-off-by: Inki Dae <inki.dae@samsung.com>
Diffstat (limited to 'exynos')
-rw-r--r--exynos/fimg2d.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/exynos/fimg2d.h b/exynos/fimg2d.h
index 1aac378d..4785e2f0 100644
--- a/exynos/fimg2d.h
+++ b/exynos/fimg2d.h
@@ -25,7 +25,7 @@
25#define G2D_MAX_CMD_LIST_NR 64 25#define G2D_MAX_CMD_LIST_NR 64
26#define G2D_PLANE_MAX_NR 2 26#define G2D_PLANE_MAX_NR 2
27 27
28#define G2D_DOUBLE_TO_FIXED(d) ((unsigned int)(d) * 65536.0) 28#define G2D_DOUBLE_TO_FIXED(d) ((unsigned int)((d) * 65536.0))
29 29
30enum e_g2d_color_mode { 30enum e_g2d_color_mode {
31 /* COLOR FORMAT */ 31 /* COLOR FORMAT */