diff --git a/drivers/amlogic/media_modules/common/media_clock/clk/clkgx.c b/drivers/amlogic/media_modules/common/media_clock/clk/clkgx.c index 70f33a817d79..cb4c9701e1bb 100644 --- a/drivers/amlogic/media_modules/common/media_clock/clk/clkgx.c +++ b/drivers/amlogic/media_modules/common/media_clock/clk/clkgx.c @@ -14,7 +14,7 @@ * more details. * */ - +#define DEBUG #include #include #include @@ -42,7 +42,7 @@ struct clk_mux_s gclk; void vdec1_set_clk(int source, int div) { - pr_info("vdec1_set_clk %d, %d\n", source, div); + pr_debug("vdec1_set_clk %d, %d\n", source, div); WRITE_HHI_REG_BITS(HHI_VDEC_CLK_CNTL, (source << 9) | (div - 1), 0, 16); } EXPORT_SYMBOL(vdec1_set_clk); @@ -63,7 +63,7 @@ EXPORT_SYMBOL(vdec2_set_clk); void hevc_set_clk(int source, int div) { - pr_info("hevc_set_clk %d, %d\n", source, div); + pr_debug("hevc_set_clk %d, %d\n", source, div); WRITE_HHI_REG_BITS(HHI_VDEC2_CLK_CNTL, (source << 9) | (div - 1), 16, 16); } @@ -414,7 +414,7 @@ static int vdec_clock_set(int clk) clock_real_clk[VDEC_1] = clk; - pr_info("vdec mux clock is %lu Hz\n", + pr_debug("vdec mux clock is %lu Hz\n", clk_get_rate(gclk.vdec_mux_node->clk)); return clk; @@ -453,7 +453,7 @@ static int hevc_clock_set(int clk) clock_real_clk[VDEC_HEVC] = clk; - pr_info("hevc mux clock is %lu Hz\n", + pr_debug("hevc mux clock is %lu Hz\n", clk_get_rate(gclk.hevc_mux_node->clk)); return clk; @@ -487,7 +487,7 @@ static int hcodec_clock_set(int clk) clock_real_clk[VDEC_HCODEC] = clk; - pr_info("hcodec mux clock is %lu Hz\n", + pr_debug("hcodec mux clock is %lu Hz\n", clk_get_rate(gclk.hcodec_mux_node->clk)); return clk; @@ -502,7 +502,7 @@ static void vdec_clock_on(void) gclk.vdec_mux_node->ref_count++; mutex_unlock(&gclk.vdec_mux_node->mutex); - pr_info("the %-15s clock on, ref cnt: %d\n", + pr_debug("the %-15s clock on, ref cnt: %d\n", gclk.vdec_mux_node->name, gclk.vdec_mux_node->ref_count); } @@ -517,7 +517,7 @@ static void vdec_clock_off(void) clock_real_clk[VDEC_1] = 0; mutex_unlock(&gclk.vdec_mux_node->mutex); - pr_info("the %-15s clock off, ref cnt: %d\n", + pr_debug("the %-15s clock off, ref cnt: %d\n", gclk.vdec_mux_node->name, gclk.vdec_mux_node->ref_count); } @@ -531,7 +531,7 @@ static void hcodec_clock_on(void) gclk.hcodec_mux_node->ref_count++; mutex_unlock(&gclk.hcodec_mux_node->mutex); - pr_info("the %-15s clock on, ref cnt: %d\n", + pr_debug("the %-15s clock on, ref cnt: %d\n", gclk.hcodec_mux_node->name, gclk.hcodec_mux_node->ref_count); } @@ -545,7 +545,7 @@ static void hcodec_clock_off(void) mutex_unlock(&gclk.hcodec_mux_node->mutex); - pr_info("the %-15s clock off, ref cnt: %d\n", + pr_debug("the %-15s clock off, ref cnt: %d\n", gclk.hcodec_mux_node->name, gclk.hcodec_mux_node->ref_count); } @@ -560,7 +560,7 @@ static void hevc_clock_on(void) WRITE_VREG(DOS_GCLK_EN3, 0xffffffff); mutex_unlock(&gclk.hevc_mux_node->mutex); - pr_info("the %-15s clock on, ref cnt: %d\n", + pr_debug("the %-15s clock on, ref cnt: %d\n", gclk.hevc_mux_node->name, gclk.hevc_mux_node->ref_count); } @@ -575,7 +575,7 @@ static void hevc_clock_off(void) clock_real_clk[VDEC_HEVC] = 0; mutex_unlock(&gclk.hevc_mux_node->mutex); - pr_info("the %-15s clock off, ref cnt: %d\n", + pr_debug("the %-15s clock off, ref cnt: %d\n", gclk.hevc_mux_node->name, gclk.hevc_mux_node->ref_count); } diff --git a/drivers/amlogic/media_modules/common/media_clock/switch/amports_gate.c b/drivers/amlogic/media_modules/common/media_clock/switch/amports_gate.c index 5584be66b552..53d3665f5ac8 100644 --- a/drivers/amlogic/media_modules/common/media_clock/switch/amports_gate.c +++ b/drivers/amlogic/media_modules/common/media_clock/switch/amports_gate.c @@ -14,6 +14,7 @@ * more details. * */ +#define DEBUG #include #include #include @@ -109,7 +110,7 @@ static int amports_gate_clk(struct gate_switch_node *gate_node, int enable) gate_node->ref_count++; if (DEBUG_REF) - pr_info("the %-15s clock on, ref cnt: %d\n", + pr_debug("the %-15s clock on, ref cnt: %d\n", gate_node->name, gate_node->ref_count); } else { gate_node->ref_count--; @@ -117,7 +118,7 @@ static int amports_gate_clk(struct gate_switch_node *gate_node, int enable) clk_disable_unprepare(gate_node->clk); if (DEBUG_REF) - pr_info("the %-15s clock off, ref cnt: %d\n", + pr_debug("the %-15s clock off, ref cnt: %d\n", gate_node->name, gate_node->ref_count); } mutex_unlock(&gate_node->mutex); diff --git a/drivers/amlogic/media_modules/frame_provider/decoder/h264/vh264.c b/drivers/amlogic/media_modules/frame_provider/decoder/h264/vh264.c index 574bc0c67bb7..8ca52f6b8516 100644 --- a/drivers/amlogic/media_modules/frame_provider/decoder/h264/vh264.c +++ b/drivers/amlogic/media_modules/frame_provider/decoder/h264/vh264.c @@ -15,6 +15,7 @@ * */ +#define DEBUG #include #include #include @@ -2430,7 +2431,7 @@ static int vh264_local_init(void) tvp_flag); } pr_info - ("H264 sysinfo: %dx%d duration=%d, pts_outside=%d, ", + ("H264 sysinfo: %dx%d duration=%d, pts_outside=%d \n", frame_width, frame_height, frame_dur, pts_outside); pr_debug("sync_outside=%d, use_idr_framerate=%d\n", sync_outside, use_idr_framerate); @@ -2557,8 +2558,6 @@ static s32 vh264_init(void) if (0 != ret) return -ret; - - ret = vh264_local_init(); if (ret < 0) return ret; diff --git a/drivers/amlogic/media_modules/frame_provider/decoder/h264_multi/h264_dpb.c b/drivers/amlogic/media_modules/frame_provider/decoder/h264_multi/h264_dpb.c index 89aa74fe767d..a18fa79cf7ee 100644 --- a/drivers/amlogic/media_modules/frame_provider/decoder/h264_multi/h264_dpb.c +++ b/drivers/amlogic/media_modules/frame_provider/decoder/h264_multi/h264_dpb.c @@ -1,3 +1,4 @@ +#define DEBUG #include #include #include @@ -21,7 +22,7 @@ int dpb_print(int index, int debug_flag, const char *fmt, ...) va_start(args, fmt); len = sprintf(buf, "%d: ", index); vsnprintf(buf + len, 512-len, fmt, args); - pr_info("%s", buf); + pr_debug("%s", buf); va_end(args); } return 0; diff --git a/drivers/amlogic/media_modules/frame_provider/decoder/h264_multi/vmh264.c b/drivers/amlogic/media_modules/frame_provider/decoder/h264_multi/vmh264.c index 9a32496ba8f6..eb4982cbfa64 100644 --- a/drivers/amlogic/media_modules/frame_provider/decoder/h264_multi/vmh264.c +++ b/drivers/amlogic/media_modules/frame_provider/decoder/h264_multi/vmh264.c @@ -14,7 +14,7 @@ * more details. * */ - +#define DEBUG #include #include #include @@ -2935,9 +2935,8 @@ static int vh264_set_params(struct vdec_h264_hw_s *hw, reg_val = param4; level_idc = reg_val & 0xff; max_reference_size = (reg_val >> 8) & 0xff; - dpb_print(DECODE_ID(hw), 0, - "mb height/widht/total: %x/%x/%x level_idc %x max_ref_num %x\n", - mb_height, mb_width, mb_total, + pr_info("%d: mb height/widht/total: %x/%x/%x level_idc %x max_ref_num %x\n", + DECODE_ID(hw), mb_height, mb_width, mb_total, level_idc, max_reference_size); p_H264_Dpb->colocated_buf_size = mb_total * 96; @@ -2966,9 +2965,8 @@ static int vh264_set_params(struct vdec_h264_hw_s *hw, if (hw->no_poc_reorder_flag) hw->dpb.reorder_pic_num = 1; - dpb_print(DECODE_ID(hw), 0, - "%s active_buf_spec_num %d reorder_pic_num %d collocate_buf_num %d\r\n", - __func__, active_buffer_spec_num, + pr_debug("%d: %s active_buf_spec_num %d reorder_pic_num %d collocate_buf_num %d\r\n", + DECODE_ID(hw), __func__, active_buffer_spec_num, hw->dpb.reorder_pic_num, hw->max_reference_size); @@ -4172,7 +4170,7 @@ static void check_timer_func(unsigned long arg) if (vdec->next_status == VDEC_STATUS_DISCONNECTED) { hw->dec_result = DEC_RESULT_FORCE_EXIT; vdec_schedule_work(&hw->work); - pr_info("vdec requested to be disconnected\n"); + pr_debug("vdec requested to be disconnected\n"); return; } @@ -4419,9 +4417,9 @@ static void vh264_local_init(struct vdec_h264_hw_s *hw) } pr_info - ("H264 sysinfo: %dx%d duration=%d, pts_outside=%d, ", + ("H264 sysinfo: %dx%d duration=%d, pts_outside=%d\n", hw->frame_width, hw->frame_height, hw->frame_dur, hw->pts_outside); - pr_info("sync_outside=%d, use_idr_framerate=%d\n", + pr_debug("sync_outside=%d, use_idr_framerate=%d\n", hw->sync_outside, hw->use_idr_framerate); if (i_only_flag & 0x100) hw->i_only = i_only_flag & 0xff; @@ -4525,7 +4523,7 @@ static s32 vh264_init(struct vdec_h264_hw_s *hw) int fw_size = 0x1000 * 16; struct firmware_s *fw = NULL; - pr_info("start load orignal firmware ...\n"); + pr_debug("start load orignal firmware ...\n"); fw = vmalloc(sizeof(struct firmware_s) + fw_size); if (IS_ERR_OR_NULL(fw)) @@ -4602,7 +4600,7 @@ static s32 vh264_init(struct vdec_h264_hw_s *hw) return -ENOMEM; } - pr_info("%s, vaddr=%lx phy_addr=%p\n", + pr_debug("%s, vaddr=%lx phy_addr=%p\n", __func__, hw->lmem_addr, (void *)hw->lmem_addr_remap); } @@ -5294,7 +5292,7 @@ int ammvdec_h264_mmu_init(struct vdec_h264_hw_s *hw) int tvp_flag = vdec_secure(hw_to_vdec(hw)) ? CODEC_MM_FLAGS_TVP : 0; - pr_info("ammvdec_h264_mmu_init tvp = 0x%x mmu_enable %d\n", + pr_debug("ammvdec_h264_mmu_init tvp = 0x%x mmu_enable %d\n", tvp_flag, mmu_enable); if (mmu_enable && !hw->mmu_box) { hw->mmu_box = decoder_mmu_box_alloc_box(DRIVER_NAME, @@ -5464,7 +5462,7 @@ static int ammvdec_h264_probe(struct platform_device *pdev) (u32)sei_data_buffer_remap); */ } #endif - pr_info("ammvdec_h264 mem-addr=%lx,buff_offset=%x,buf_start=%lx\n", + pr_debug("ammvdec_h264 mem-addr=%lx,buff_offset=%x,buf_start=%lx\n", pdata->mem_start, hw->buf_offset, hw->cma_alloc_addr); diff --git a/drivers/amlogic/media_modules/frame_provider/decoder/h265/vh265.c b/drivers/amlogic/media_modules/frame_provider/decoder/h265/vh265.c index 35519e2c50d6..1bdde61b8905 100644 --- a/drivers/amlogic/media_modules/frame_provider/decoder/h265/vh265.c +++ b/drivers/amlogic/media_modules/frame_provider/decoder/h265/vh265.c @@ -14,7 +14,7 @@ * more details. * */ - +#define DEBUG #include #include #include @@ -1713,7 +1713,7 @@ static int hevc_print(struct hevc_state_s *hevc, if (hevc) len = sprintf(buf, "[%d]", hevc->index); vsnprintf(buf + len, HEVC_PRINT_BUF - len, fmt, args); - pr_info("%s", buf); + pr_debug("%s", buf); va_end(args); #ifdef CONFIG_AMLOGIC_MEDIA_MULTI_DEC } diff --git a/drivers/amlogic/media_modules/frame_provider/decoder/utils/decoder_bmmu_box.c b/drivers/amlogic/media_modules/frame_provider/decoder/utils/decoder_bmmu_box.c index 6fb7ccbf9c19..6425ae7b4be5 100644 --- a/drivers/amlogic/media_modules/frame_provider/decoder/utils/decoder_bmmu_box.c +++ b/drivers/amlogic/media_modules/frame_provider/decoder/utils/decoder_bmmu_box.c @@ -14,6 +14,7 @@ * more details. * */ +#define DEBUG #include #include #include @@ -85,7 +86,7 @@ void *decoder_bmmu_box_alloc_box(const char *name, tvp_flags = (mem_flags & CODEC_MM_FLAGS_TVP) ? CODEC_MM_FLAGS_TVP : 0; - pr_info("decoder_bmmu_box_alloc_box, tvp_flags = %x\n", tvp_flags); + pr_debug("decoder_bmmu_box_alloc_box, tvp_flags = %x\n", tvp_flags); size = sizeof(struct decoder_bmmu_box) + sizeof(struct codec_mm_s *) * max_num; diff --git a/drivers/amlogic/media_modules/frame_provider/decoder/utils/decoder_mmu_box.c b/drivers/amlogic/media_modules/frame_provider/decoder/utils/decoder_mmu_box.c index e7339d02180a..c0f1cd619df0 100644 --- a/drivers/amlogic/media_modules/frame_provider/decoder/utils/decoder_mmu_box.c +++ b/drivers/amlogic/media_modules/frame_provider/decoder/utils/decoder_mmu_box.c @@ -86,7 +86,7 @@ void *decoder_mmu_box_alloc_box(const char *name, struct decoder_mmu_box *box; int size; - pr_info("decoder_mmu_box_alloc_box, mem_flags = 0x%x\n", mem_flags); + pr_debug("decoder_mmu_box_alloc_box, mem_flags = 0x%x\n", mem_flags); size = sizeof(struct decoder_mmu_box) + sizeof(struct codec_mm_scatter *) * diff --git a/drivers/amlogic/media_modules/frame_provider/decoder/utils/vdec.c b/drivers/amlogic/media_modules/frame_provider/decoder/utils/vdec.c index a58f2ceea573..3fd7ef4d148a 100644 --- a/drivers/amlogic/media_modules/frame_provider/decoder/utils/vdec.c +++ b/drivers/amlogic/media_modules/frame_provider/decoder/utils/vdec.c @@ -14,7 +14,7 @@ * more details. * */ - +#define DEBUG #include #include #include @@ -383,7 +383,7 @@ struct vdec_s *vdec_create(struct stream_port_s *port, } } - pr_info("vdec_create instance %p, total %d\n", vdec, + pr_debug("vdec_create instance %p, total %d\n", vdec, atomic_read(&vdec_core->vdec_nr)); //trace_vdec_create(vdec); /*DEBUG_TMP*/ @@ -1296,7 +1296,7 @@ s32 vdec_init(struct vdec_s *vdec, int is_4k) */ if (vdec_stream_based(vdec) && !vdec_dual(vdec)) { if (vdec_core->vfm_vdec == NULL) { - pr_info("vdec_init set vfm decoder %p\n", vdec); + pr_debug("vdec_init set vfm decoder %p\n", vdec); vdec_core->vfm_vdec = vdec; } else { pr_info("vdec_init vfm path busy.\n"); @@ -1435,7 +1435,7 @@ s32 vdec_init(struct vdec_s *vdec, int is_4k) goto error; } - pr_info("vfm map %s created\n", vdec->vfm_map_id); + pr_debug("vfm map %s created\n", vdec->vfm_map_id); /* *assume IONVIDEO driver already have a few vframe_receiver @@ -1479,7 +1479,7 @@ s32 vdec_init(struct vdec_s *vdec, int is_4k) } } - pr_info("vdec_init, vf_provider_name = %s\n", p->vf_provider_name); + pr_debug("vdec_init, vf_provider_name = %s\n", p->vf_provider_name); vdec_input_prepare_bufs(/*prepared buffer for fast playing.*/ &vdec->input, vdec->sys_info->width, @@ -1536,7 +1536,7 @@ void vdec_release(struct vdec_s *vdec) inited_vcodec_num--; mutex_unlock(&vdec_mutex); - pr_info("vdec_release instance %p, total %d\n", vdec, + pr_debug("vdec_release instance %p, total %d\n", vdec, atomic_read(&vdec_core->vdec_nr)); } EXPORT_SYMBOL(vdec_release); @@ -2365,7 +2365,7 @@ int vdec_source_changed(int format, int width, int height, int fps) on_setting = 1; ret = vdec_source_changed_for_clk_set(format, width, height, fps); - pr_info("vdec1 video changed to %d x %d %d fps clk->%dMHZ\n", + pr_debug("vdec1 video changed to %d x %d %d fps clk->%dMHZ\n", width, height, fps, vdec_clk_get(VDEC_1)); on_setting = 0; return ret; @@ -2436,7 +2436,7 @@ int vdec2_source_changed(int format, int width, int height, int fps) on_setting = 1; ret = vdec_source_changed_for_clk_set(format, width, height, fps); - pr_info("vdec2 video changed to %d x %d %d fps clk->%dMHZ\n", + pr_debug("vdec2 video changed to %d x %d %d fps clk->%dMHZ\n", width, height, fps, vdec_clk_get(VDEC_2)); on_setting = 0; return ret; @@ -2459,7 +2459,7 @@ int hevc_source_changed(int format, int width, int height, int fps) on_setting = 1; ret = vdec_source_changed_for_clk_set(format, width, height, fps); - pr_info("hevc video changed to %d x %d %d fps clk->%dMHZ\n", + pr_debug("hevc video changed to %d x %d %d fps clk->%dMHZ\n", width, height, fps, vdec_clk_get(VDEC_HEVC)); on_setting = 0; @@ -2775,7 +2775,7 @@ EXPORT_SYMBOL(vdec_request_threaded_irq); s32 vdec_request_irq(enum vdec_irq_num num, irq_handler_t handler, const char *devname, void *dev) { - pr_info("vdec_request_irq %p, %s\n", handler, devname); + pr_debug("vdec_request_irq %p, %s\n", handler, devname); return vdec_request_threaded_irq(num, handler, diff --git a/drivers/amlogic/media_modules/frame_provider/decoder/vp9/vvp9.c b/drivers/amlogic/media_modules/frame_provider/decoder/vp9/vvp9.c index ae07e1fc7316..4e49119f9237 100644 --- a/drivers/amlogic/media_modules/frame_provider/decoder/vp9/vvp9.c +++ b/drivers/amlogic/media_modules/frame_provider/decoder/vp9/vvp9.c @@ -14,6 +14,7 @@ * more details. * */ +#define DEBUG #include #include #include @@ -2095,7 +2096,7 @@ int vp9_bufmgr_init(struct VP9Decoder_s *pbi, struct BuffInfo_s *buf_spec_i, pbi->used_4k_num = -1; cm->cur_fb_idx_mmu = INVALID_IDX; #endif - pr_info + pr_debug ("After vp9_bufmgr_init, prev_fb_idx : %d, new_fb_idx : %d\r\n", cm->prev_fb_idx, cm->new_fb_idx); pbi->need_resync = 1; @@ -6227,7 +6228,7 @@ static void vvp9_put_timer_func(unsigned long arg) == VDEC_STATUS_DISCONNECTED) { pbi->dec_result = DEC_RESULT_FORCE_EXIT; vdec_schedule_work(&pbi->work); - pr_info( + pr_debug( "vdec requested to be disconnected\n"); return; } @@ -6803,7 +6804,7 @@ static int amvdec_vp9_probe(struct platform_device *pdev) #ifndef MULTI_INSTANCE_SUPPORT int i; #endif - pr_info("%s\n", __func__); + pr_debug("%s\n", __func__); mutex_lock(&vvp9_mutex); memcpy(&BUF[0], &pbi->m_BUF[0], sizeof(struct BUF_s) * MAX_BUF_NUM); diff --git a/drivers/amlogic/media_modules/stream_input/amports/amstream.c b/drivers/amlogic/media_modules/stream_input/amports/amstream.c index d2d7d16b3f72..ea5be0fb0107 100644 --- a/drivers/amlogic/media_modules/stream_input/amports/amstream.c +++ b/drivers/amlogic/media_modules/stream_input/amports/amstream.c @@ -14,7 +14,7 @@ * more details. * */ - +#define DEBUG #include #include #include @@ -1360,7 +1360,7 @@ void reset_userdata_fifo(int bInit) last_read_wi = userdata_poc_wi; mutex_unlock(&userdata_mutex); - pr_info("reset_userdata_fifo, bInit=%d, wi=%d, ri=%d, rp=%d, wp=%d\n", + pr_debug("reset_userdata_fifo, bInit=%d, wi=%d, ri=%d, rp=%d, wp=%d\n", bInit, wi, ri, rp, wp); } EXPORT_SYMBOL(reset_userdata_fifo); @@ -2159,14 +2159,14 @@ static long amstream_ioctl_set(struct port_priv_s *priv, ulong arg) break; case AMSTREAM_SET_DRMMODE: if (parm.data_32 == 1) { - pr_err("set drmmode\n"); + pr_debug("set drmmode\n"); this->flag |= PORT_FLAG_DRM; if ((this->type & PORT_TYPE_VIDEO) && (priv->vdec)) priv->vdec->port_flag |= PORT_FLAG_DRM; } else { this->flag &= (~PORT_FLAG_DRM); - pr_err("no drmmode\n"); + pr_debug("no drmmode\n"); } break; case AMSTREAM_SET_APTS: { diff --git a/drivers/amlogic/media_modules/stream_input/parser/streambuf.c b/drivers/amlogic/media_modules/stream_input/parser/streambuf.c index 3a5b223fd45d..c321d84bd344 100644 --- a/drivers/amlogic/media_modules/stream_input/parser/streambuf.c +++ b/drivers/amlogic/media_modules/stream_input/parser/streambuf.c @@ -14,7 +14,7 @@ * more details. * */ - +#define DEBUG #include #include #include @@ -106,7 +106,7 @@ static s32 _stbuf_alloc(struct stream_buf_s *buf, bool is_secure) buf->is_secure = is_secure; - pr_info("%s stbuf alloced at %p, secure = %d, size = %d\n", + pr_debug("%s stbuf alloced at %p, secure = %d, size = %d\n", (buf->type == BUF_TYPE_HEVC) ? "HEVC" : (buf->type == BUF_TYPE_VIDEO) ? "Video" : (buf->type == BUF_TYPE_AUDIO) ? "Audio" :