author | Nanxin Qin <nanxin.qin@amlogic.com> | 2017-04-11 13:32:48 (GMT) |
---|---|---|
committer | Nanxin Qin <nanxin.qin@amlogic.com> | 2017-04-11 13:44:44 (GMT) |
commit | 9090e35a2333b5b6a3994735d89dd11976712d98 (patch) | |
tree | 612935976c1ce3254ed526060d0f09eec8db9edf | |
parent | 15464d4044ba7dc9f3ec416e0f2349cd8274d30b (diff) | |
download | media-9090e35a2333b5b6a3994735d89dd11976712d98.zip media-9090e35a2333b5b6a3994735d89dd11976712d98.tar.gz media-9090e35a2333b5b6a3994735d89dd11976712d98.tar.bz2 |
fixed the issue of the media clock unable to on/off
Change-Id: Ibc6c4898dde9655f6164261a6605fef749dd93da
Signed-off-by: Nanxin Qin <nanxin.qin@amlogic.com>
-rw-r--r-- | drivers/common/media_clock/clk/clkgx.c | 13 | ||||
-rw-r--r-- | drivers/stream_input/amports/amstream.c | 4 |
2 files changed, 9 insertions, 8 deletions
diff --git a/drivers/common/media_clock/clk/clkgx.c b/drivers/common/media_clock/clk/clkgx.c index 119a046..52fad39 100644 --- a/drivers/common/media_clock/clk/clkgx.c +++ b/drivers/common/media_clock/clk/clkgx.c @@ -504,12 +504,12 @@ static int vdec_clock_set(int clk) static void vdec_clock_on(void) { - VDEC1_CLOCK_ON(); + clk_prepare_enable(gclk.vdec_clk); } static void vdec_clock_off(void) { - VDEC1_CLOCK_OFF(); + clk_disable_unprepare(gclk.vdec_clk); clock_real_clk[VDEC_1] = 0; gp_pll_release(gp_pll_user_vdec); } @@ -523,12 +523,12 @@ static int hcodec_clock_set(int clk) static void hcodec_clock_on(void) { - HCODEC_CLOCK_ON(); + clk_prepare_enable(gclk.hcodec_clk); } static void hcodec_clock_off(void) { - HCODEC_CLOCK_OFF(); + clk_disable_unprepare(gclk.hcodec_clk); } static int gp_pll_user_cb_hevc(struct gp_pll_user_handle_s *user, int event) @@ -611,12 +611,13 @@ static int hevc_clock_set(int clk) static void hevc_clock_on(void) { - HEVC_CLOCK_ON(); + clk_prepare_enable(gclk.hevc_clk); + WRITE_VREG(DOS_GCLK_EN3, 0xffffffff); } static void hevc_clock_off(void) { - HEVC_CLOCK_OFF(); + clk_disable_unprepare(gclk.hevc_clk); gp_pll_release(gp_pll_user_hevc); clock_real_clk[VDEC_HEVC] = 0; } diff --git a/drivers/stream_input/amports/amstream.c b/drivers/stream_input/amports/amstream.c index 9545755..bfd9e5a 100644 --- a/drivers/stream_input/amports/amstream.c +++ b/drivers/stream_input/amports/amstream.c @@ -1607,10 +1607,10 @@ static int amstream_release(struct inode *inode, struct file *file) if (port->type & PORT_TYPE_VIDEO) { if (get_cpu_type() >= MESON_CPU_MAJOR_ID_M8) { #ifndef CONFIG_MULTI_DEC - /*if (has_hevc_vdec()) + if (has_hevc_vdec()) vdec_poweroff(VDEC_HEVC); - vdec_poweroff(VDEC_1);*/ + vdec_poweroff(VDEC_1); #else if ((port->type & PORT_TYPE_MPTS) && ((port->flag & PORT_FLAG_VFORMAT) == 0)) { |