From: Tobias Jakobi Date: Sun, 1 Jun 2014 16:04:06 +0000 (+0200) Subject: exynos: fix scaling factor computation in g2d_copy_with_scale X-Git-Tag: libdrm-2.4.55~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e8c3c1358ecaf4e90f7d43762357ae6f8e2022b6;p=platform%2Fupstream%2Flibdrm.git exynos: fix scaling factor computation in g2d_copy_with_scale When division of source and destination width yields the scaling factor for the x-coordinate, then it should be source/destination _height_ for y. Signed-off-by: Tobias Jakobi Signed-off-by: Inki Dae --- diff --git a/exynos/exynos_fimg2d.c b/exynos/exynos_fimg2d.c index a565910..fc281b6 100644 --- a/exynos/exynos_fimg2d.c +++ b/exynos/exynos_fimg2d.c @@ -451,7 +451,7 @@ int g2d_copy_with_scale(struct g2d_context *ctx, struct g2d_image *src, else { scale = 1; scale_x = (double)src_w / (double)dst_w; - scale_y = (double)src_w / (double)dst_h; + scale_y = (double)src_h / (double)dst_h; } if (src_x + src_w > src->width)