dv: update the hsize and vsize of dv core 2 [1/1]
authorYi Zhou <yi.zhou@amlogic.com>
Tue, 18 Dec 2018 06:56:48 +0000 (14:56 +0800)
committerLuan Yuan <luan.yuan@amlogic.com>
Thu, 20 Dec 2018 03:25:33 +0000 (11:25 +0800)
PD#SWPL-3223

Problem:
get parameters from vpp blend to core 2 is error

Solution:
we get the parameters from OSD blend instead vpp blend

Verify:
u212

Change-Id: I31a5e4cf90b5d665cfd291aab5554d311ec19346
Signed-off-by: Yi Zhou <yi.zhou@amlogic.com>
drivers/amlogic/media/osd/osd_hw.c

index 6896b4c..6e8cd34 100644 (file)
@@ -7310,18 +7310,18 @@ static void set_blend_reg(struct layer_blend_reg_s *blend_reg)
                }
 #endif
        }
-       dv_core2_vsize = (blend_reg->vpp_osd1_blend_v_scope & 0xfff)
-               - ((blend_reg->vpp_osd1_blend_v_scope >> 16) & 0xfff) + 1;
-       dv_core2_hsize = (blend_reg->vpp_osd1_blend_h_scope & 0xfff)
-               - ((blend_reg->vpp_osd1_blend_h_scope >> 16) & 0xfff) + 1;
+
+       dv_core2_vsize = (blend_reg->osd_blend_blend0_size >> 16) & 0xfff;
+       dv_core2_hsize = blend_reg->osd_blend_blend0_size & 0xfff;
+
        if (osd_hw.osd_meson_dev.has_dolby_vision) {
                VSYNCOSD_WR_MPEG_REG(
                        DOLBY_CORE2A_SWAP_CTRL1,
-                       ((dv_core2_vsize + 0x40) << 16)
-                       | (dv_core2_hsize + 0x80 + 0));
+                       ((dv_core2_hsize + 0x40) << 16)
+                       | (dv_core2_vsize + 0x80 + 0));
                VSYNCOSD_WR_MPEG_REG(
                        DOLBY_CORE2A_SWAP_CTRL2,
-                       (dv_core2_vsize << 16) | (dv_core2_hsize + 0));
+                       (dv_core2_hsize << 16) | (dv_core2_vsize + 0));
 #ifdef CONFIG_AMLOGIC_MEDIA_ENHANCEMENT_DOLBYVISION
                update_graphic_width_height(dv_core2_vsize, dv_core2_hsize);
 #endif