vdec: fix sc2 hevcf clk ref count error. [1/1]
authorshihong.zheng <shihong.zheng@amlogic.com>
Fri, 17 Jul 2020 12:50:04 +0000 (20:50 +0800)
committerHui Zhang <hui.zhang@amlogic.com>
Wed, 22 Jul 2020 13:47:37 +0000 (06:47 -0700)
PD#SWPL-25656

Problem:
hevcf clk ref count error.

Solution:
fix sc2 hevc frone clock gate node name.

Verify:
AH219

Change-Id: I897b1ee4810e39fc2eebe095980c1ddea5250a27
Signed-off-by: shihong.zheng <shihong.zheng@amlogic.com>
(cherry picked from commit 5482101b4f327d9d27adf42cef6747e5f02a459e)

drivers/frame_provider/decoder/utils/vdec_power_ctrl.c

index fd1f29b04078ab70f3df88c746f099cd4281122d..12b81a0f7a452ae50e8110e7911d62d31d5fb551 100644 (file)
@@ -136,7 +136,10 @@ static void pm_vdec_clock_on(int id)
                hcodec_clock_enable();
        } else if (id == VDEC_HEVC) {
                /* enable hevc clock */
-               amports_switch_gate("clk_hevc_mux", 1);
+               if (get_cpu_major_id() >= AM_MESON_CPU_MAJOR_ID_SC2)
+                       amports_switch_gate("clk_hevcf_mux", 1);
+               else
+                       amports_switch_gate("clk_hevc_mux", 1);
                if (get_cpu_major_id() >= AM_MESON_CPU_MAJOR_ID_G12A)
                        amports_switch_gate("clk_hevcb_mux", 1);
                hevc_clock_hi_enable();