diff mbox

[v2,15/15] exynos: fimg2d: introduce G2D_OP_INTERPOLATE

Message ID 1424096780-7559-2-git-send-email-tjakobi@math.uni-bielefeld.de (mailing list archive)
State New, archived
Headers show

Commit Message

Tobias Jakobi Feb. 16, 2015, 2:26 p.m. UTC
This sets up the blending equation in the following way:
out = src * src_alpha + dst * (1 - src_alpha)

Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
---
 exynos/exynos_fimg2d.c | 4 ++++
 exynos/exynos_fimg2d.h | 1 +
 2 files changed, 5 insertions(+)
diff mbox

Patch

diff --git a/exynos/exynos_fimg2d.c b/exynos/exynos_fimg2d.c
index 126a15d..18d5b89 100644
--- a/exynos/exynos_fimg2d.c
+++ b/exynos/exynos_fimg2d.c
@@ -85,6 +85,10 @@  static unsigned int g2d_get_blend_op(enum e_g2d_op op)
 		SET_BF(val, G2D_COEFF_MODE_ONE, 0, 0, 0,
 				G2D_COEFF_MODE_SRC_ALPHA, 1, 0, 0);
 		break;
+	case G2D_OP_INTERPOLATE:
+		SET_BF(val, G2D_COEFF_MODE_SRC_ALPHA, 0, 0, 0,
+				G2D_COEFF_MODE_SRC_ALPHA, 1, 0, 0);
+		break;
 	default:
 		fprintf(stderr, "Not support operation(%d).\n", op);
 		SET_BF(val, G2D_COEFF_MODE_ONE, 0, 0, 0, G2D_COEFF_MODE_ZERO,
diff --git a/exynos/exynos_fimg2d.h b/exynos/exynos_fimg2d.h
index 78cff47..79e6907 100644
--- a/exynos/exynos_fimg2d.h
+++ b/exynos/exynos_fimg2d.h
@@ -149,6 +149,7 @@  enum e_g2d_op {
 	G2D_OP_SRC			= 0x01,
 	G2D_OP_DST			= 0x02,
 	G2D_OP_OVER			= 0x03,
+	G2D_OP_INTERPOLATE		= 0x04,
 	G2D_OP_DISJOINT_CLEAR		= 0x10,
 	G2D_OP_DISJOINT_SRC		= 0x11,
 	G2D_OP_DISJOINT_DST		= 0x12,