aboutsummaryrefslogtreecommitdiffstats
path: root/exynos
diff options
context:
space:
mode:
authorTobias Jakobi2015-03-11 14:38:42 -0500
committerEmil Velikov2015-03-16 17:18:05 -0500
commit89037326ca6012ba18be29dc6587e11617164400 (patch)
treebf817207b707e89b9026733b6be656376c52413c /exynos
parent03c9cccfa03b999874f794c02ddce7e7dfb04c93 (diff)
downloadexternal-libdrm-89037326ca6012ba18be29dc6587e11617164400.tar.gz
external-libdrm-89037326ca6012ba18be29dc6587e11617164400.tar.xz
external-libdrm-89037326ca6012ba18be29dc6587e11617164400.zip
exynos: honor the repeat mode in g2d_copy_with_scale
This is useful when the default repeat mode, which is 'repeat' produces artifacts at the borders of the copied image. Choose the 'pad' mode to make use of the color of the destination image. In my usage case the destination is the framebuffer, which is solid filled with a background color. Scaling with 'pad' mode would then just do the right thing and also produces nice borders on the output. Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de> Reviewed-by: Inki Dae <inki.dae@samsung.com> Tested-by: Joonyoung Shim <jy0922.shim@samsung.com>
Diffstat (limited to 'exynos')
-rw-r--r--exynos/exynos_fimg2d.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/exynos/exynos_fimg2d.c b/exynos/exynos_fimg2d.c
index 20c31790..5f9e9a71 100644
--- a/exynos/exynos_fimg2d.c
+++ b/exynos/exynos_fimg2d.c
@@ -462,6 +462,11 @@ g2d_copy_with_scale(struct g2d_context *ctx, struct g2d_image *src,
462 462
463 g2d_add_cmd(ctx, SRC_SELECT_REG, G2D_SELECT_MODE_NORMAL); 463 g2d_add_cmd(ctx, SRC_SELECT_REG, G2D_SELECT_MODE_NORMAL);
464 g2d_add_cmd(ctx, SRC_COLOR_MODE_REG, src->color_mode); 464 g2d_add_cmd(ctx, SRC_COLOR_MODE_REG, src->color_mode);
465
466 g2d_add_cmd(ctx, SRC_REPEAT_MODE_REG, src->repeat_mode);
467 if (src->repeat_mode == G2D_REPEAT_MODE_PAD)
468 g2d_add_cmd(ctx, SRC_PAD_VALUE_REG, dst->color);
469
465 g2d_add_base_addr(ctx, src, g2d_src); 470 g2d_add_base_addr(ctx, src, g2d_src);
466 g2d_add_cmd(ctx, SRC_STRIDE_REG, src->stride); 471 g2d_add_cmd(ctx, SRC_STRIDE_REG, src->stride);
467 472