dv: set avi info limited range when dv output hdr mode [1/1]
authorYi Zhou <yi.zhou@amlogic.com>
Tue, 6 Nov 2018 11:43:35 +0000 (19:43 +0800)
committerJianxin Pan <jianxin.pan@amlogic.com>
Fri, 16 Nov 2018 15:33:24 +0000 (07:33 -0800)
PD#SWPL-1127

Problem:
when dv output hdr mode, the quantization range is default value
instead of limited range

Solution:
set quantization range to limited range in avi info

Verify:
t962e (txlx)

Change-Id: Ib4fbeb1c7efcedd7194143772ee5c663284a1c77
Signed-off-by: Yi Zhou <yi.zhou@amlogic.com>
drivers/amlogic/media/enhancement/amdolby_vision/amdolby_vision.c
drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hdmi_tx_main.c

index 0ad833f..f982410 100644 (file)
@@ -1556,8 +1556,7 @@ static int dolby_core1_set(
                                /* vd2 to core1 */
                                0, 17, 1);
        } else {
-               if (get_cpu_type() ==
-                       MESON_CPU_MAJOR_ID_G12A)
+               if (is_meson_g12())
                        VSYNC_WR_MPEG_REG_BITS(
                                DOLBY_PATH_CTRL,
                                /* vd2 to core1 */
index 2a02fce..e5bffc0 100644 (file)
@@ -1337,6 +1337,9 @@ static void hdmitx_set_drm_pkt(struct master_display_info_s *data)
                        hdev->hdmi_current_hdr_mode = 3;
        }
 
+       hdev->HWOp.CntlConfig(hdev, CONF_AVI_Q01,
+               RGB_RANGE_LIM);
+
        switch (hdev->hdmi_current_hdr_mode) {
        case 1:
                /*standard HDR*/