Use g2d_add_base_addr() for source and destination base
address just like all other calls.

Signed-off-by: Tobias Jakobi <tjak...@math.uni-bielefeld.de>
---
 exynos/exynos_fimg2d.c | 14 ++------------
 1 file changed, 2 insertions(+), 12 deletions(-)

diff --git a/exynos/exynos_fimg2d.c b/exynos/exynos_fimg2d.c
index 4a88e0c..85b2317 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,
                g2d_add_cmd(ctx, DST_SELECT_REG, G2D_SELECT_MODE_NORMAL);
 
        g2d_add_cmd(ctx, DST_COLOR_MODE_REG, dst->color_mode);
-       if (dst->buf_type == G2D_IMGBUF_USERPTR)
-               g2d_add_cmd(ctx, DST_BASE_ADDR_REG | G2D_BUF_USERPTR,
-                               (unsigned long)&dst->user_ptr[0]);
-       else
-               g2d_add_cmd(ctx, DST_BASE_ADDR_REG, dst->bo[0]);
-
+       g2d_add_base_addr(ctx, dst, g2d_dst);
        g2d_add_cmd(ctx, DST_STRIDE_REG, dst->stride);
 
        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,
 
        switch (src->select_mode) {
        case G2D_SELECT_MODE_NORMAL:
-               if (src->buf_type == G2D_IMGBUF_USERPTR)
-                       g2d_add_cmd(ctx, SRC_BASE_ADDR_REG | G2D_BUF_USERPTR,
-                                       (unsigned long)&src->user_ptr[0]);
-               else
-                       g2d_add_cmd(ctx, SRC_BASE_ADDR_REG, src->bo[0]);
-
+               g2d_add_base_addr(ctx, src, g2d_src);
                g2d_add_cmd(ctx, SRC_STRIDE_REG, src->stride);
                break;
        case G2D_SELECT_MODE_FGCOLOR:
-- 
2.0.5

--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to