From b374761293e5cbe4ffb726793e120ffb626c5714 Mon Sep 17 00:00:00 2001 From: Jian Cao Date: Thu, 10 Jan 2019 16:55:53 +0800 Subject: [PATCH] ge2d: fix strechblit issue for GE2D [1/2] PD#SWPL-4075 Problem: dst data is not normal by using strechblit function such as 1920x1080 --> 640x360 Solution: add bit width restriction for horizontal scaler initial phase Verify: verified on g12b-w400 Change-Id: Ibcd85cc08f49254e90100beb952e711736531134 Signed-off-by: Jian Cao --- drivers/amlogic/media/common/ge2d/ge2d_hw.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/amlogic/media/common/ge2d/ge2d_hw.c b/drivers/amlogic/media/common/ge2d/ge2d_hw.c index 85d5657f0081..497fbf8f9f79 100644 --- a/drivers/amlogic/media/common/ge2d/ge2d_hw.c +++ b/drivers/amlogic/media/common/ge2d/ge2d_hw.c @@ -977,7 +977,7 @@ void ge2d_set_cmd(struct ge2d_cmd_s *cfg) ge2d_reg_write(GE2D_HSC_INI_CTRL, (cfg->hsc_rpt_p0_num << 29) | (cfg->hsc_adv_num << 24) | - (cfg->hsc_ini_phase << 0) + ((cfg->hsc_ini_phase & 0xffffff) << 0) ); #else ge2d_reg_write(GE2D_HSC_ADV_CTRL, @@ -986,7 +986,7 @@ void ge2d_set_cmd(struct ge2d_cmd_s *cfg) ); ge2d_reg_write(GE2D_HSC_INI_CTRL, (cfg->hsc_rpt_p0_num << 29) | - (cfg->hsc_ini_phase << 0) + ((cfg->hsc_ini_phase & 0xffffff) << 0) ); #endif -- 2.34.1