summaryrefslogtreecommitdiff
path: root/exynos
diff options
context:
space:
mode:
authorTobias Jakobi <tjakobi@math.uni-bielefeld.de>2015-09-08 17:22:27 +0200
committerEmil Velikov <emil.l.velikov@gmail.com>2015-09-21 17:43:14 +0100
commit9017619714eb432fa9bb1e94139cc2ad40fc7001 (patch)
tree57b30a900c9a45c25c7e96dc1527c786888c1836 /exynos
parenta8dc2e75cfb2acecae7cb7aeefa20b9c92abd297 (diff)
downloadlibdrm-9017619714eb432fa9bb1e94139cc2ad40fc7001.tar.gz
libdrm-9017619714eb432fa9bb1e94139cc2ad40fc7001.tar.bz2
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,
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: