aboutsummaryrefslogtreecommitdiffstats
path: root/exynos
diff options
context:
space:
mode:
authorTobias Jakobi2015-09-08 10:22:27 -0500
committerEmil Velikov2015-09-21 11:43:14 -0500
commit9017619714eb432fa9bb1e94139cc2ad40fc7001 (patch)
tree57b30a900c9a45c25c7e96dc1527c786888c1836 /exynos
parenta8dc2e75cfb2acecae7cb7aeefa20b9c92abd297 (diff)
downloadexternal-libdrm-9017619714eb432fa9bb1e94139cc2ad40fc7001.tar.gz
external-libdrm-9017619714eb432fa9bb1e94139cc2ad40fc7001.tar.xz
external-libdrm-9017619714eb432fa9bb1e94139cc2ad40fc7001.zip
exynos/fimg2d: simplify base address submission in g2d_scale_and_blend()
Use g2d_add_base_addr() for source and destination base address just like all other calls. Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Diffstat (limited to 'exynos')
-rw-r--r--exynos/exynos_fimg2d.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/exynos/exynos_fimg2d.c b/exynos/exynos_fimg2d.c
index 4a88e0c0..85b2317b 100644
--- a/exynos/exynos_fimg2d.c
+++ b/exynos/exynos_fimg2d.c
@@ -672,12 +672,7 @@ g2d_scale_and_blend(struct g2d_context *ctx, struct g2d_image *src,
672 g2d_add_cmd(ctx, DST_SELECT_REG, G2D_SELECT_MODE_NORMAL); 672 g2d_add_cmd(ctx, DST_SELECT_REG, G2D_SELECT_MODE_NORMAL);
673 673
674 g2d_add_cmd(ctx, DST_COLOR_MODE_REG, dst->color_mode); 674 g2d_add_cmd(ctx, DST_COLOR_MODE_REG, dst->color_mode);
675 if (dst->buf_type == G2D_IMGBUF_USERPTR) 675 g2d_add_base_addr(ctx, dst, g2d_dst);
676 g2d_add_cmd(ctx, DST_BASE_ADDR_REG | G2D_BUF_USERPTR,
677 (unsigned long)&dst->user_ptr[0]);
678 else
679 g2d_add_cmd(ctx, DST_BASE_ADDR_REG, dst->bo[0]);
680
681 g2d_add_cmd(ctx, DST_STRIDE_REG, dst->stride); 676 g2d_add_cmd(ctx, DST_STRIDE_REG, dst->stride);
682 677
683 g2d_add_cmd(ctx, SRC_SELECT_REG, src->select_mode); 678 g2d_add_cmd(ctx, SRC_SELECT_REG, src->select_mode);
@@ -685,12 +680,7 @@ g2d_scale_and_blend(struct g2d_context *ctx, struct g2d_image *src,
685 680
686 switch (src->select_mode) { 681 switch (src->select_mode) {
687 case G2D_SELECT_MODE_NORMAL: 682 case G2D_SELECT_MODE_NORMAL:
688 if (src->buf_type == G2D_IMGBUF_USERPTR) 683 g2d_add_base_addr(ctx, src, g2d_src);
689 g2d_add_cmd(ctx, SRC_BASE_ADDR_REG | G2D_BUF_USERPTR,
690 (unsigned long)&src->user_ptr[0]);
691 else
692 g2d_add_cmd(ctx, SRC_BASE_ADDR_REG, src->bo[0]);
693
694 g2d_add_cmd(ctx, SRC_STRIDE_REG, src->stride); 684 g2d_add_cmd(ctx, SRC_STRIDE_REG, src->stride);
695 break; 685 break;
696 case G2D_SELECT_MODE_FGCOLOR: 686 case G2D_SELECT_MODE_FGCOLOR: