From 615f9964c8db839fc0cb8ab9639da19bf4bb4704 Mon Sep 17 00:00:00 2001 From: "zhilei.wu" Date: Wed, 28 Mar 2018 14:59:41 +0800 Subject: [PATCH] ge2d: disable src2 alpha with notsupport src2_alp PD#162344: ge2d: disable src2 alpha with notsupport src2_alp Change-Id: I049568f57c328ed6128e95ee83c6974226c36544 Signed-off-by: zhilei.wu --- drivers/amlogic/media/common/ge2d/ge2d_hw.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/amlogic/media/common/ge2d/ge2d_hw.c b/drivers/amlogic/media/common/ge2d/ge2d_hw.c index 8e82314..78e141e 100644 --- a/drivers/amlogic/media/common/ge2d/ge2d_hw.c +++ b/drivers/amlogic/media/common/ge2d/ge2d_hw.c @@ -750,9 +750,11 @@ void ge2d_set_dp_gen(struct ge2d_dp_gen_s *cfg) ge2d_reg_set_bits(GE2D_GEN_CTRL2, cfg->src1_gb_alpha_en, 29, 1); #ifdef CONFIG_GE2D_SRC2 - ge2d_reg_set_bits(GE2D_GEN_CTRL5, cfg->src2_gb_alpha, 0, 8); - ge2d_reg_set_bits(GE2D_GEN_CTRL5, - cfg->src2_gb_alpha_en, 8, 1); + if (ge2d_meson_dev.src2_alp == 1) { + ge2d_reg_set_bits(GE2D_GEN_CTRL5, cfg->src2_gb_alpha, 0, 8); + ge2d_reg_set_bits(GE2D_GEN_CTRL5, + cfg->src2_gb_alpha_en, 8, 1); + } #endif ge2d_reg_write(GE2D_ALU_CONST_COLOR, cfg->alu_const_color); ge2d_reg_write(GE2D_SRC1_KEY, cfg->src1_key); -- 2.7.4