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>
main
Tobias Jakobi 2015-09-08 17:22:27 +02:00 committed by Emil Velikov
parent a8dc2e75cf
commit 9017619714
1 changed files with 2 additions and 12 deletions

View File

@ -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_SELECT_REG, G2D_SELECT_MODE_NORMAL);
g2d_add_cmd(ctx, DST_COLOR_MODE_REG, dst->color_mode); g2d_add_cmd(ctx, DST_COLOR_MODE_REG, dst->color_mode);
if (dst->buf_type == G2D_IMGBUF_USERPTR) g2d_add_base_addr(ctx, dst, g2d_dst);
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_cmd(ctx, DST_STRIDE_REG, dst->stride); g2d_add_cmd(ctx, DST_STRIDE_REG, dst->stride);
g2d_add_cmd(ctx, SRC_SELECT_REG, src->select_mode); 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) { switch (src->select_mode) {
case G2D_SELECT_MODE_NORMAL: case G2D_SELECT_MODE_NORMAL:
if (src->buf_type == G2D_IMGBUF_USERPTR) g2d_add_base_addr(ctx, src, g2d_src);
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_cmd(ctx, SRC_STRIDE_REG, src->stride); g2d_add_cmd(ctx, SRC_STRIDE_REG, src->stride);
break; break;
case G2D_SELECT_MODE_FGCOLOR: case G2D_SELECT_MODE_FGCOLOR: