DV: display black at smpte mode [2/2]
authoryao liu <yao.liu@amlogic.com>
Tue, 26 Nov 2019 01:34:39 +0000 (09:34 +0800)
committerTao Zeng <tao.zeng@amlogic.com>
Mon, 9 Dec 2019 13:19:33 +0000 (06:19 -0700)
PD#SWPL-16027

Problem:
last_dst_format is wrong, it is DOVI even if on HDR TV

Solution:
Correct last_dst_format

Verify:
sm1

Change-Id: I77648ca989d3ff552cb4040d9f859d970eac7d98
Signed-off-by: yao liu <yao.liu@amlogic.com>
(cherry picked from commit ad3efd046fc08b6784cdd5184260edfc2acc85f4)

drivers/amlogic/media/enhancement/amdolby_vision/amdolby_vision.c

index 19e6396b3e111e45314a3f84e5646a65df21b065..97915a74cde16c8f9734b0aaf000fea115784325 100644 (file)
@@ -7751,7 +7751,6 @@ int register_dv_functions(const struct dolby_vision_func_s *func)
                dolby_vision_wait_on = false;
                dolby_vision_wait_init = false;
                dolby_vision_on_in_uboot = 0;
-               last_dst_format = FORMAT_DOVI;
        }
 
        if ((!p_funcs_stb || !p_funcs_tv) && func) {
@@ -8174,6 +8173,7 @@ unsigned int dolby_vision_check_enable(void)
                                dolby_vision_mode = dv_mode;
                                dolby_vision_status = DV_PROCESS;
                                dolby_vision_ll_policy = DOLBY_VISION_LL_YUV422;
+                               last_dst_format = FORMAT_DOVI;
                                pr_info("dovi enable in uboot and mode is LL 422\n");
                        } else if ((READ_VPP_DV_REG(DOLBY_CORE3_DIAG_CTRL)
                                & 0xff) == 0x3) {
@@ -8183,6 +8183,7 @@ unsigned int dolby_vision_check_enable(void)
                                dolby_vision_mode = dv_mode;
                                dolby_vision_status = DV_PROCESS;
                                dolby_vision_ll_policy = DOLBY_VISION_LL_RGB444;
+                               last_dst_format = FORMAT_DOVI;
                                pr_info("dovi enable in uboot and mode is LL RGB\n");
                        } else {
                                if (READ_VPP_DV_REG(DOLBY_CORE3_REG_START + 1)
@@ -8194,6 +8195,7 @@ unsigned int dolby_vision_check_enable(void)
                                        dolby_vision_mode = dv_mode;
                                        dolby_vision_status = HDR_PROCESS;
                                        pr_info("dovi enable in uboot and mode is HDR10\n");
+                                       last_dst_format = FORMAT_HDR10;
                                } else if (READ_VPP_DV_REG(DOLBY_CORE3_REG_START
                                        + 1) == 4) {
                                        /*SDR mode*/
@@ -8202,6 +8204,7 @@ unsigned int dolby_vision_check_enable(void)
                                        dolby_vision_mode = dv_mode;
                                        dolby_vision_status = SDR_PROCESS;
                                        pr_info("dovi enable in uboot and mode is SDR\n");
+                                       last_dst_format = FORMAT_SDR;
                                } else {
                                        /*STANDARD RGB444 mode*/
                                        dv_mode = dv_mode_table[2];
@@ -8210,6 +8213,7 @@ unsigned int dolby_vision_check_enable(void)
                                        dolby_vision_status = DV_PROCESS;
                                        dolby_vision_ll_policy =
                                                DOLBY_VISION_LL_DISABLE;
+                                       last_dst_format = FORMAT_DOVI;
                                        pr_info("dovi enable in uboot and mode is DV ST\n");
                                }
                        }