From 2f4c502bab571c8bbda09ff50b37505301d379b6 Mon Sep 17 00:00:00 2001 From: Shi Zhongbo Date: Mon, 20 May 2019 17:21:49 +0800 Subject: [PATCH] msm: vidc: revise debug levels Clean up debug log levels as: 1. Revise VIDC_WARN to VIDC_ERR; 2. Revise VIDC_PROF as VIDC_PERF; 3. Mark some one-time logs, e.g most of logs in initialization and deinitialization as VIDC_HIGH; 4. Keep VIDC_PKT; 5. All other logs change to VIDC_LOW; Change-Id: I8fc30f97dc3424da8418aab00e8af074ec8d4ef9 Signed-off-by: Shi Zhongbo --- msm/vidc/hfi_common.c | 276 ++++++++++--------- msm/vidc/hfi_iris2.c | 20 +- msm/vidc/hfi_packetization.c | 16 +- msm/vidc/hfi_response_handler.c | 80 +++--- msm/vidc/msm_cvp_external.c | 56 ++-- msm/vidc/msm_cvp_internal.c | 16 +- msm/vidc/msm_smem.c | 16 +- msm/vidc/msm_v4l2_vidc.c | 12 +- msm/vidc/msm_vdec.c | 26 +- msm/vidc/msm_venc.c | 146 +++++----- msm/vidc/msm_vidc.c | 64 ++--- msm/vidc/msm_vidc_buffer_calculations.c | 8 +- msm/vidc/msm_vidc_bus_iris1.c | 6 +- msm/vidc/msm_vidc_bus_iris2.c | 4 +- msm/vidc/msm_vidc_clocks.c | 100 +++---- msm/vidc/msm_vidc_common.c | 350 ++++++++++++------------ msm/vidc/msm_vidc_debug.c | 22 +- msm/vidc/msm_vidc_debug.h | 35 ++- msm/vidc/msm_vidc_platform.c | 4 +- msm/vidc/msm_vidc_res_parse.c | 80 +++--- 20 files changed, 666 insertions(+), 671 deletions(-) mode change 100644 => 100755 msm/vidc/msm_vidc.c mode change 100644 => 100755 msm/vidc/msm_vidc_clocks.c diff --git a/msm/vidc/hfi_common.c b/msm/vidc/hfi_common.c index 3763385fcffa..cea5b001be71 100644 --- a/msm/vidc/hfi_common.c +++ b/msm/vidc/hfi_common.c @@ -215,7 +215,7 @@ static void __sim_modify_cmd_packet(u8 *packet, struct venus_hfi_device *device) session = __get_session(device, sys_init->session_id); if (!session) { - dprintk(VIDC_DBG, "%s :Invalid session id: %x\n", + dprintk(VIDC_ERR, "%s :Invalid session id: %x\n", __func__, sys_init->session_id); return; } @@ -309,11 +309,11 @@ static int __dsp_send_hfi_queue(struct venus_hfi_device *device) } if (device->dsp_flags & DSP_INIT) { - dprintk(VIDC_DBG, "%s: dsp already inited\n", __func__); + dprintk(VIDC_HIGH, "%s: dsp already inited\n", __func__); return 0; } - dprintk(VIDC_DBG, "%s: hfi queue %#llx size %d\n", + dprintk(VIDC_HIGH, "%s: hfi queue %#llx size %d\n", __func__, device->dsp_iface_q_table.mem_data.dma_handle, device->dsp_iface_q_table.mem_data.size); rc = fastcvpd_video_send_cmd_hfi_queue( @@ -325,7 +325,7 @@ static int __dsp_send_hfi_queue(struct venus_hfi_device *device) } device->dsp_flags |= DSP_INIT; - dprintk(VIDC_DBG, "%s: dsp inited\n", __func__); + dprintk(VIDC_HIGH, "%s: dsp inited\n", __func__); return rc; } @@ -350,7 +350,7 @@ static int __dsp_suspend(struct venus_hfi_device *device, bool force, u32 flags) if (temp->domain == HAL_VIDEO_DOMAIN_CVP) { /* don't suspend if cvp session is not paused */ if (!(temp->flags & SESSION_PAUSE)) { - dprintk(VIDC_DBG, + dprintk(VIDC_HIGH, "%s: cvp session %x not paused\n", __func__, hash32_ptr(temp)); return -EBUSY; @@ -358,7 +358,7 @@ static int __dsp_suspend(struct venus_hfi_device *device, bool force, u32 flags) } } - dprintk(VIDC_DBG, "%s: suspend dsp\n", __func__); + dprintk(VIDC_HIGH, "%s: suspend dsp\n", __func__); rc = fastcvpd_video_suspend(flags); if (rc) { dprintk(VIDC_ERR, "%s: dsp suspend failed with error %d\n", @@ -367,7 +367,7 @@ static int __dsp_suspend(struct venus_hfi_device *device, bool force, u32 flags) } device->dsp_flags |= DSP_SUSPEND; - dprintk(VIDC_DBG, "%s: dsp suspended\n", __func__); + dprintk(VIDC_HIGH, "%s: dsp suspended\n", __func__); return 0; } @@ -379,11 +379,11 @@ static int __dsp_resume(struct venus_hfi_device *device, u32 flags) return 0; if (!(device->dsp_flags & DSP_SUSPEND)) { - dprintk(VIDC_DBG, "%s: dsp not suspended\n", __func__); + dprintk(VIDC_HIGH, "%s: dsp not suspended\n", __func__); return 0; } - dprintk(VIDC_DBG, "%s: resume dsp\n", __func__); + dprintk(VIDC_HIGH, "%s: resume dsp\n", __func__); rc = fastcvpd_video_resume(flags); if (rc) { dprintk(VIDC_ERR, @@ -393,7 +393,7 @@ static int __dsp_resume(struct venus_hfi_device *device, u32 flags) } device->dsp_flags &= ~DSP_SUSPEND; - dprintk(VIDC_DBG, "%s: dsp resumed\n", __func__); + dprintk(VIDC_HIGH, "%s: dsp resumed\n", __func__); return rc; } @@ -405,11 +405,11 @@ static int __dsp_shutdown(struct venus_hfi_device *device, u32 flags) return 0; if (!(device->dsp_flags & DSP_INIT)) { - dprintk(VIDC_DBG, "%s: dsp not inited\n", __func__); + dprintk(VIDC_HIGH, "%s: dsp not inited\n", __func__); return 0; } - dprintk(VIDC_DBG, "%s: shutdown dsp\n", __func__); + dprintk(VIDC_HIGH, "%s: shutdown dsp\n", __func__); rc = fastcvpd_video_shutdown(flags); if (rc) { dprintk(VIDC_ERR, @@ -419,7 +419,7 @@ static int __dsp_shutdown(struct venus_hfi_device *device, u32 flags) } device->dsp_flags &= ~DSP_INIT; - dprintk(VIDC_DBG, "%s: dsp shutdown successful\n", __func__); + dprintk(VIDC_HIGH, "%s: dsp shutdown successful\n", __func__); return rc; } @@ -433,7 +433,7 @@ static int __session_pause(struct venus_hfi_device *device, return 0; session->flags |= SESSION_PAUSE; - dprintk(VIDC_DBG, "%s: cvp session %x paused\n", __func__, + dprintk(VIDC_HIGH, "%s: cvp session %x paused\n", __func__, hash32_ptr(session)); return rc; @@ -449,7 +449,7 @@ static int __session_resume(struct venus_hfi_device *device, return 0; session->flags &= ~SESSION_PAUSE; - dprintk(VIDC_DBG, "%s: cvp session %x resumed\n", __func__, + dprintk(VIDC_HIGH, "%s: cvp session %x resumed\n", __func__, hash32_ptr(session)); rc = __resume(device); @@ -520,12 +520,12 @@ static int __acquire_regulator(struct regulator_info *rinfo, * about it. We can't disable the regulator w/o * getting it back under s/w control */ - dprintk(VIDC_WARN, + dprintk(VIDC_ERR, "Failed to acquire regulator control: %s\n", rinfo->name); } else { - dprintk(VIDC_DBG, + dprintk(VIDC_HIGH, "Acquire regulator control from HW: %s\n", rinfo->name); @@ -533,7 +533,7 @@ static int __acquire_regulator(struct regulator_info *rinfo, } if (!regulator_is_enabled(rinfo->regulator)) { - dprintk(VIDC_WARN, "Regulator is not enabled %s\n", + dprintk(VIDC_ERR, "Regulator is not enabled %s\n", rinfo->name); msm_vidc_res_handle_fatal_hw_error(device->res, true); } @@ -549,11 +549,11 @@ static int __hand_off_regulator(struct regulator_info *rinfo) rc = regulator_set_mode(rinfo->regulator, REGULATOR_MODE_FAST); if (rc) { - dprintk(VIDC_WARN, + dprintk(VIDC_ERR, "Failed to hand off regulator control: %s\n", rinfo->name); } else { - dprintk(VIDC_DBG, + dprintk(VIDC_HIGH, "Hand off regulator control to HW: %s\n", rinfo->name); } @@ -598,7 +598,7 @@ static int __write_queue(struct vidc_iface_q_info *qinfo, u8 *packet, dprintk(VIDC_ERR, "Invalid Params\n"); return -EINVAL; } else if (!qinfo->q_array.align_virtual_addr) { - dprintk(VIDC_WARN, "Queues have already been freed\n"); + dprintk(VIDC_ERR, "Queues have already been freed\n"); return -EINVAL; } @@ -692,7 +692,7 @@ static void __hal_sim_modify_msg_packet(u8 *packet, session = __get_session(device, init_done->session_id); if (!session) { - dprintk(VIDC_DBG, "%s: Invalid session id: %x\n", + dprintk(VIDC_ERR, "%s: Invalid session id: %x\n", __func__, init_done->session_id); return; } @@ -741,7 +741,7 @@ static int __read_queue(struct vidc_iface_q_info *qinfo, u8 *packet, dprintk(VIDC_ERR, "Invalid Params\n"); return -EINVAL; } else if (!qinfo->q_array.align_virtual_addr) { - dprintk(VIDC_WARN, "Queues have already been freed\n"); + dprintk(VIDC_ERR, "Queues have already been freed\n"); return -EINVAL; } @@ -779,7 +779,7 @@ static int __read_queue(struct vidc_iface_q_info *qinfo, u8 *packet, */ mb(); *pb_tx_req_is_set = 0; - dprintk(VIDC_DBG, + dprintk(VIDC_LOW, "%s queue is empty, rx_req = %u, tx_req = %u, read_idx = %u\n", receive_request ? "message" : "debug", queue->qhdr_rx_req, queue->qhdr_tx_req, @@ -818,10 +818,10 @@ static int __read_queue(struct vidc_iface_q_info *qinfo, u8 *packet, new_read_idx << 2); } } else { - dprintk(VIDC_WARN, + dprintk(VIDC_ERR, "BAD packet received, read_idx: %#x, pkt_size: %d\n", read_idx, packet_size_in_words << 2); - dprintk(VIDC_WARN, "Dropping this packet\n"); + dprintk(VIDC_ERR, "Dropping this packet\n"); new_read_idx = write_idx; rc = -ENODATA; } @@ -861,7 +861,7 @@ static int __smem_alloc(struct venus_hfi_device *dev, return -EINVAL; } - dprintk(VIDC_INFO, "start to alloc size: %d, flags: %d\n", size, flags); + dprintk(VIDC_HIGH, "start to alloc size: %d, flags: %d\n", size, flags); rc = msm_smem_alloc( size, align, flags, usage, 1, (void *)dev->res, MSM_VIDC_UNKNOWN, alloc); @@ -871,7 +871,7 @@ static int __smem_alloc(struct venus_hfi_device *dev, goto fail_smem_alloc; } - dprintk(VIDC_DBG, "%s: ptr = %pK, size = %d\n", __func__, + dprintk(VIDC_HIGH, "%s: ptr = %pK, size = %d\n", __func__, alloc->kvaddr, size); mem->mem_size = alloc->size; @@ -907,14 +907,14 @@ void __write_register(struct venus_hfi_device *device, __strict_check(device); if (!device->power_enabled) { - dprintk(VIDC_WARN, + dprintk(VIDC_ERR, "HFI Write register failed : Power is OFF\n"); msm_vidc_res_handle_fatal_hw_error(device->res, true); return; } base_addr = device->hal_data->register_base; - dprintk(VIDC_DBG, "Base addr: %pK, writing to: %#x, Value: %#x...\n", + dprintk(VIDC_LOW, "Base addr: %pK, writing to: %#x, Value: %#x...\n", base_addr, hwiosymaddr, value); base_addr += hwiosymaddr; writel_relaxed(value, base_addr); @@ -938,7 +938,7 @@ int __read_register(struct venus_hfi_device *device, u32 reg) __strict_check(device); if (!device->power_enabled) { - dprintk(VIDC_WARN, + dprintk(VIDC_ERR, "HFI Read register failed : Power is OFF\n"); msm_vidc_res_handle_fatal_hw_error(device->res, true); return -EINVAL; @@ -952,7 +952,7 @@ int __read_register(struct venus_hfi_device *device, u32 reg) * register. */ rmb(); - dprintk(VIDC_DBG, "Base addr: %pK, read from: %#x, value: %#x...\n", + dprintk(VIDC_LOW, "Base addr: %pK, read from: %#x, value: %#x...\n", base_addr, reg, rc); return rc; @@ -983,7 +983,7 @@ static int __vote_bandwidth(struct bus_info *bus, unsigned long freq) /* Bus Driver expects values in Bps */ ab = freq * 1000; - dprintk(VIDC_PROF, "Voting bus %s to ab %llu\n", bus->name, ab); + dprintk(VIDC_PERF, "Voting bus %s to ab %llu\n", bus->name, ab); rc = msm_bus_scale_update_bw(bus->client, ab, 0); if (rc) dprintk(VIDC_ERR, "Failed voting bus %s to ab %llu, rc=%d\n", @@ -1020,7 +1020,7 @@ static int __vote_buses(struct venus_hfi_device *device, unsigned long freq = 0; if (!num_data) { - dprintk(VIDC_DBG, "No vote data available\n"); + dprintk(VIDC_LOW, "No vote data available\n"); goto no_data_count; } else if (!data) { dprintk(VIDC_ERR, "Invalid voting data\n"); @@ -1155,7 +1155,7 @@ static int __tzbsp_set_video_state(enum tzbsp_video_state state) return rc; } - dprintk(VIDC_DBG, "Set state %d, resp %d\n", state, tzbsp_rsp); + dprintk(VIDC_LOW, "Set state %d, resp %d\n", state, tzbsp_rsp); if (tzbsp_rsp) { dprintk(VIDC_ERR, "Failed to set video core state to suspend: %d\n", @@ -1207,11 +1207,11 @@ static int venus_hfi_suspend(void *dev) return -ENOTSUPP; } - dprintk(VIDC_DBG, "Suspending Venus\n"); + dprintk(VIDC_HIGH, "Suspending Venus\n"); mutex_lock(&device->lock); rc = __power_collapse(device, true); if (rc) { - dprintk(VIDC_WARN, "%s: Venus is busy\n", __func__); + dprintk(VIDC_ERR, "%s: Venus is busy\n", __func__); rc = -EBUSY; } mutex_unlock(&device->lock); @@ -1236,7 +1236,7 @@ static int venus_hfi_flush_debug_queue(void *dev) mutex_lock(&device->lock); if (!device->power_enabled) { - dprintk(VIDC_WARN, "%s: venus power off\n", __func__); + dprintk(VIDC_ERR, "%s: venus power off\n", __func__); rc = -EINVAL; goto exit; } @@ -1279,7 +1279,7 @@ static int __set_clk_rate(struct venus_hfi_device *device, "%s: cx_ipeak_update failed!\n", __func__); return rc; } - dprintk(VIDC_PROF, + dprintk(VIDC_PERF, "cx_ipeak_update: up, clk freq = %lu rate = %lu threshold_freq = %lu\n", device->clk_freq, rate, threshold_freq); } @@ -1301,7 +1301,7 @@ static int __set_clk_rate(struct venus_hfi_device *device, "cx_ipeak_update failed! ipeak %pK\n", ipeak); return rc; } - dprintk(VIDC_PROF, + dprintk(VIDC_PERF, "cx_ipeak_update: up, clk freq = %lu rate = %lu threshold_freq = %lu\n", device->clk_freq, rate, threshold_freq); } @@ -1321,7 +1321,7 @@ static int __set_clocks(struct venus_hfi_device *device, u32 freq) return rc; trace_msm_vidc_perf_clock_scale(cl->name, freq); - dprintk(VIDC_PROF, "Scaling clock %s to %u\n", + dprintk(VIDC_PERF, "Scaling clock %s to %u\n", cl->name, freq); } } @@ -1361,8 +1361,6 @@ static int __scale_clocks(struct venus_hfi_device *device) u32 rate = 0; allowed_clks_tbl = device->res->allowed_clks_tbl; - - dprintk(VIDC_DBG, "%s: NULL scale data\n", __func__); rate = device->clk_freq ? device->clk_freq : allowed_clks_tbl[0].clock_rate; @@ -1419,7 +1417,7 @@ static int __iface_cmdq_write_relaxed(struct venus_hfi_device *device, &venus_hfi_pm_work, msecs_to_jiffies( device->res->msm_vidc_pwr_collapse_delay))) { - dprintk(VIDC_DBG, + dprintk(VIDC_LOW, "PM work already scheduled\n"); } } @@ -1465,7 +1463,7 @@ static int __iface_msgq_read(struct venus_hfi_device *device, void *pkt) __strict_check(device); if (!__core_in_valid_state(device)) { - dprintk(VIDC_DBG, "%s - fw not in init state\n", __func__); + dprintk(VIDC_ERR, "%s - fw not in init state\n", __func__); rc = -EINVAL; goto read_error_null; } @@ -1600,7 +1598,7 @@ static int __interface_dsp_queues_init(struct venus_hfi_device *dev) dprintk(VIDC_ERR, "%s: failed dma mapping\n", __func__); goto fail_dma_map; } - dprintk(VIDC_DBG, + dprintk(VIDC_HIGH, "%s: kvaddr %pK dma_handle %#llx iova %#llx size %zd\n", __func__, kvaddr, dma_handle, iova, q_size); @@ -1855,7 +1853,7 @@ static int __interface_queues_init(struct venus_hfi_device *dev) ALIGNED_QDSS_SIZE, 1, SMEM_UNCACHED, HAL_BUFFER_INTERNAL_CMD_QUEUE); if (rc) { - dprintk(VIDC_WARN, + dprintk(VIDC_ERR, "qdss_alloc_fail: QDSS messages logging will not work\n"); dev->qdss.align_device_addr = 0; } else { @@ -1872,7 +1870,7 @@ static int __interface_queues_init(struct venus_hfi_device *dev) ALIGNED_SFR_SIZE, 1, SMEM_UNCACHED, HAL_BUFFER_INTERNAL_CMD_QUEUE); if (rc) { - dprintk(VIDC_WARN, "sfr_alloc_fail: SFR not will work\n"); + dprintk(VIDC_ERR, "sfr_alloc_fail: SFR not will work\n"); dev->sfr.align_device_addr = 0; } else { dev->sfr.align_device_addr = mem_addr->align_device_addr - @@ -1965,7 +1963,7 @@ static int __sys_set_debug(struct venus_hfi_device *device, u32 debug) rc = call_hfi_pkt_op(device, sys_debug_config, pkt, debug); if (rc) { - dprintk(VIDC_WARN, + dprintk(VIDC_ERR, "Debug mode setting to FW failed\n"); return -ENOTEMPTY; } @@ -1985,13 +1983,13 @@ static int __sys_set_coverage(struct venus_hfi_device *device, u32 mode) rc = call_hfi_pkt_op(device, sys_coverage_config, pkt, mode); if (rc) { - dprintk(VIDC_WARN, + dprintk(VIDC_ERR, "Coverage mode setting to FW failed\n"); return -ENOTEMPTY; } if (__iface_cmdq_write(device, pkt)) { - dprintk(VIDC_WARN, "Failed to send coverage pkt to f/w\n"); + dprintk(VIDC_ERR, "Failed to send coverage pkt to f/w\n"); return -ENOTEMPTY; } @@ -2037,7 +2035,7 @@ static int venus_hfi_core_init(void *device) dev = device; - dprintk(VIDC_DBG, "Core initializing\n"); + dprintk(VIDC_HIGH, "Core initializing\n"); mutex_lock(&dev->lock); @@ -2060,7 +2058,7 @@ static int venus_hfi_core_init(void *device) __set_state(dev, VENUS_STATE_INIT); - dprintk(VIDC_DBG, "Dev_Virt: %pa, Reg_Virt: %pK\n", + dprintk(VIDC_HIGH, "Dev_Virt: %pa, Reg_Virt: %pK\n", &dev->hal_data->firmware_base, dev->hal_data->register_base); @@ -2092,7 +2090,7 @@ static int venus_hfi_core_init(void *device) rc = call_hfi_pkt_op(dev, sys_image_version, &version_pkt); if (rc || __iface_cmdq_write(dev, &version_pkt)) - dprintk(VIDC_WARN, "Failed to send image version pkt to f/w\n"); + dprintk(VIDC_ERR, "Failed to send image version pkt to f/w\n"); __sys_set_debug(device, (msm_vidc_debug & FW_LOGMASK) >> FW_LOGSHIFT); @@ -2110,7 +2108,7 @@ static int venus_hfi_core_init(void *device) pm_qos_add_request(&dev->qos, PM_QOS_CPU_DMA_LATENCY, dev->res->pm_qos_latency_us); } - dprintk(VIDC_DBG, "Core inited successfully\n"); + dprintk(VIDC_HIGH, "Core inited successfully\n"); mutex_unlock(&dev->lock); return rc; err_core_init: @@ -2135,7 +2133,7 @@ static int venus_hfi_core_release(void *dev) } mutex_lock(&device->lock); - dprintk(VIDC_DBG, "Core releasing\n"); + dprintk(VIDC_HIGH, "Core releasing\n"); if (device->res->pm_qos_latency_us && pm_qos_request_active(&device->qos)) pm_qos_remove_request(&device->qos); @@ -2150,7 +2148,7 @@ static int venus_hfi_core_release(void *dev) list_for_each_entry_safe(session, next, &device->sess_head, list) list_del(&session->list); - dprintk(VIDC_DBG, "Core released successfully\n"); + dprintk(VIDC_HIGH, "Core released successfully\n"); mutex_unlock(&device->lock); return rc; @@ -2201,7 +2199,7 @@ static void __core_clear_interrupt_common(struct venus_hfi_device *device) if (intr_status & mask) { device->intr_status |= intr_status; device->reg_count++; - dprintk(VIDC_DBG, + dprintk(VIDC_LOW, "INTERRUPT for device: %pK: times: %d interrupt_status: %d\n", device, device->reg_count, intr_status); } else { @@ -2259,7 +2257,7 @@ static int venus_hfi_session_set_property(void *sess, device = session->device; mutex_lock(&device->lock); - dprintk(VIDC_INFO, "in set_prop,with prop id: %#x\n", ptype); + dprintk(VIDC_HIGH, "in set_prop,with prop id: %#x\n", ptype); if (!__is_session_valid(device, session, __func__)) { rc = -EINVAL; goto err_set_prop; @@ -2269,7 +2267,7 @@ static int venus_hfi_session_set_property(void *sess, pkt, session, ptype, pdata, size); if (rc == -ENOTSUPP) { - dprintk(VIDC_DBG, + dprintk(VIDC_ERR, "set property: unsupported prop id: %#x\n", ptype); rc = 0; goto err_set_prop; @@ -2293,9 +2291,9 @@ static void __set_default_sys_properties(struct venus_hfi_device *device) { if (__sys_set_debug(device, (msm_vidc_debug & FW_LOGMASK) >> FW_LOGSHIFT)) - dprintk(VIDC_WARN, "Setting fw_debug msg ON failed\n"); + dprintk(VIDC_ERR, "Setting fw_debug msg ON failed\n"); if (__sys_set_power_control(device, true)) - dprintk(VIDC_WARN, "Setting h/w power collapse ON failed\n"); + dprintk(VIDC_ERR, "Setting h/w power collapse ON failed\n"); } static void __session_clean(struct hal_session *session) @@ -2304,11 +2302,11 @@ static void __session_clean(struct hal_session *session) struct venus_hfi_device *device; if (!session || !session->device) { - dprintk(VIDC_WARN, "%s: invalid params\n", __func__); + dprintk(VIDC_ERR, "%s: invalid params\n", __func__); return; } device = session->device; - dprintk(VIDC_DBG, "deleted the session: %pK\n", session); + dprintk(VIDC_HIGH, "deleted the session: %pK\n", session); /* * session might have been removed from the device list in * core_release, so check and remove if it is in the list @@ -2377,7 +2375,7 @@ static int venus_hfi_session_init(void *device, void *session_id, s->device = dev; s->codec = codec_type; s->domain = session_type; - dprintk(VIDC_DBG, + dprintk(VIDC_HIGH, "%s: inst %pK, session %pK, codec 0x%x, domain 0x%x\n", __func__, session_id, s, s->codec, s->domain); @@ -2450,7 +2448,7 @@ static int venus_hfi_session_end(void *session) if (msm_vidc_fw_coverage) { if (__sys_set_coverage(sess->device, msm_vidc_fw_coverage)) - dprintk(VIDC_WARN, "Fw_coverage msg ON failed\n"); + dprintk(VIDC_ERR, "Fw_coverage msg ON failed\n"); } rc = __send_session_cmd(session, HFI_CMD_SYS_SESSION_END); @@ -2522,7 +2520,7 @@ static int venus_hfi_session_set_buffers(void *sess, goto err_create_pkt; } - dprintk(VIDC_INFO, "set buffers: %#x\n", buffer_info->buffer_type); + dprintk(VIDC_HIGH, "set buffers: %#x\n", buffer_info->buffer_type); if (__iface_cmdq_write(session->device, pkt)) rc = -ENOTEMPTY; @@ -2566,7 +2564,7 @@ static int venus_hfi_session_release_buffers(void *sess, goto err_create_pkt; } - dprintk(VIDC_INFO, "Release buffers: %#x\n", buffer_info->buffer_type); + dprintk(VIDC_HIGH, "Release buffers: %#x\n", buffer_info->buffer_type); if (__iface_cmdq_write(session->device, pkt)) rc = -ENOTEMPTY; @@ -2998,7 +2996,7 @@ static int __check_core_registered(struct hal_device_data core, struct list_head *curr, *next; if (!core.dev_count) { - dprintk(VIDC_INFO, "no device Registered\n"); + dprintk(VIDC_ERR, "no device Registered\n"); return -EINVAL; } @@ -3029,7 +3027,7 @@ static int __check_core_registered(struct hal_device_data core, return 0; } - dprintk(VIDC_INFO, "Device not registered\n"); + dprintk(VIDC_ERR, "Device not registered\n"); return -EINVAL; } return -EINVAL; @@ -3074,14 +3072,13 @@ static void venus_hfi_pm_handler(struct work_struct *work) return; } - dprintk(VIDC_PROF, - "Entering %s\n", __func__); + dprintk(VIDC_HIGH, "Entering %s\n", __func__); /* * It is ok to check this variable outside the lock since * it is being updated in this context only */ if (device->skip_pc_count >= VIDC_MAX_PC_SKIP_COUNT) { - dprintk(VIDC_WARN, "Failed to PC for %d times\n", + dprintk(VIDC_ERR, "Failed to PC for %d times\n", device->skip_pc_count); device->skip_pc_count = 0; __process_fatal_error(device); @@ -3096,19 +3093,19 @@ static void venus_hfi_pm_handler(struct work_struct *work) device->skip_pc_count = 0; /* Cancel pending delayed works if any */ cancel_delayed_work(&venus_hfi_pm_work); - dprintk(VIDC_PROF, "%s: power collapse successful!\n", + dprintk(VIDC_HIGH, "%s: power collapse successful!\n", __func__); break; case -EBUSY: device->skip_pc_count = 0; - dprintk(VIDC_DBG, "%s: retry PC as dsp is busy\n", __func__); + dprintk(VIDC_HIGH, "%s: retry PC as dsp is busy\n", __func__); queue_delayed_work(device->venus_pm_workq, &venus_hfi_pm_work, msecs_to_jiffies( device->res->msm_vidc_pwr_collapse_delay)); break; case -EAGAIN: device->skip_pc_count++; - dprintk(VIDC_WARN, "%s: retry power collapse (count %d)\n", + dprintk(VIDC_ERR, "%s: retry power collapse (count %d)\n", __func__, device->skip_pc_count); queue_delayed_work(device->venus_pm_workq, &venus_hfi_pm_work, msecs_to_jiffies( @@ -3133,20 +3130,20 @@ static int __prepare_pc_common(struct venus_hfi_device *device) idle_status = ctrl_status & BIT(30); if (pc_ready) { - dprintk(VIDC_DBG, "Already in pc_ready state\n"); + dprintk(VIDC_HIGH, "Already in pc_ready state\n"); return 0; } wfi_status = BIT(0) & __read_register(device, WRAPPER_CPU_STATUS); if (!wfi_status || !idle_status) { - dprintk(VIDC_WARN, "Skipping PC, wfi status not set\n"); + dprintk(VIDC_ERR, "Skipping PC, wfi status not set\n"); goto skip_power_off; } rc = __prepare_pc(device); if (rc) { - dprintk(VIDC_WARN, "Failed __prepare_pc %d\n", rc); + dprintk(VIDC_ERR, "Failed __prepare_pc %d\n", rc); goto skip_power_off; } @@ -3168,7 +3165,7 @@ static int __prepare_pc_common(struct venus_hfi_device *device) return rc; skip_power_off: - dprintk(VIDC_WARN, "Skip PC, wfi=%#x, idle=%#x, pcr=%#x, ctrl=%#x)\n", + dprintk(VIDC_ERR, "Skip PC, wfi=%#x, idle=%#x, pcr=%#x, ctrl=%#x)\n", wfi_status, idle_status, pc_ready, ctrl_status); return -EAGAIN; } @@ -3183,13 +3180,13 @@ static int __power_collapse(struct venus_hfi_device *device, bool force) return -EINVAL; } if (!device->power_enabled) { - dprintk(VIDC_DBG, "%s: Power already disabled\n", + dprintk(VIDC_HIGH, "%s: Power already disabled\n", __func__); goto exit; } if (!__core_in_valid_state(device)) { - dprintk(VIDC_WARN, "%s - Core not in init state\n", __func__); + dprintk(VIDC_ERR, "%s - Core not in init state\n", __func__); return -EINVAL; } @@ -3307,7 +3304,7 @@ static bool __is_session_valid(struct venus_hfi_device *device, return true; invalid: - dprintk(VIDC_WARN, "%s: device %pK, invalid session %pK\n", + dprintk(VIDC_ERR, "%s: device %pK, invalid session %pK\n", func, device, session); return false; } @@ -3384,7 +3381,7 @@ static int __response_handler(struct venus_hfi_device *device) rc = hfi_process_msg_packet(device->device_id, (struct vidc_hal_msg_pkt_hdr *)raw_packet, info); if (rc) { - dprintk(VIDC_WARN, + dprintk(VIDC_ERR, "Corrupt/unknown packet found, discarding\n"); --packet_count; continue; @@ -3396,10 +3393,10 @@ static int __response_handler(struct venus_hfi_device *device) __process_sys_error(device); break; case HAL_SYS_RELEASE_RESOURCE_DONE: - dprintk(VIDC_DBG, "Received SYS_RELEASE_RESOURCE\n"); + dprintk(VIDC_HIGH, "Received SYS_RELEASE_RESOURCE\n"); break; case HAL_SYS_INIT_DONE: - dprintk(VIDC_DBG, "Received SYS_INIT_DONE\n"); + dprintk(VIDC_HIGH, "Received SYS_INIT_DONE\n"); break; case HAL_SESSION_LOAD_RESOURCE_DONE: break; @@ -3472,7 +3469,7 @@ static int __response_handler(struct venus_hfi_device *device) if (packet_count >= max_packets && __get_q_size(device, VIDC_IFACEQ_MSGQ_IDX)) { - dprintk(VIDC_WARN, + dprintk(VIDC_ERR, "Too many packets in message queue to handle at once, deferring read\n"); break; } @@ -3509,7 +3506,7 @@ static void venus_hfi_core_work_handler(struct work_struct *work) if (!__core_in_valid_state(device)) { - dprintk(VIDC_DBG, "%s - Core not in init state\n", __func__); + dprintk(VIDC_ERR, "%s - Core not in init state\n", __func__); goto err_no_work; } @@ -3548,7 +3545,7 @@ err_no_work: (i + 1), num_responses); break; } - dprintk(VIDC_DBG, "Processing response %d of %d, type %d\n", + dprintk(VIDC_LOW, "Processing response %d of %d, type %d\n", (i + 1), num_responses, r->response_type); device->callback(r->response_type, &r->response); } @@ -3589,7 +3586,7 @@ static int __init_regs_and_interrupts(struct venus_hfi_device *device, goto err_core_init; } - dprintk(VIDC_DBG, "HAL_DATA will be assigned now\n"); + dprintk(VIDC_HIGH, "HAL_DATA will be assigned now\n"); hal = kzalloc(sizeof(struct hal_data), GFP_KERNEL); if (!hal) { dprintk(VIDC_ERR, "Failed to alloc\n"); @@ -3618,7 +3615,7 @@ static int __init_regs_and_interrupts(struct venus_hfi_device *device, } disable_irq_nosync(res->irq); - dprintk(VIDC_INFO, + dprintk(VIDC_HIGH, "firmware_base = %pa, register_base = %pa, register_size = %d\n", &res->firmware_base, &res->register_base, res->register_size); @@ -3657,7 +3654,7 @@ static inline int __init_clocks(struct venus_hfi_device *device) venus_hfi_for_each_clock(device, cl) { - dprintk(VIDC_DBG, "%s: scalable? %d, count %d\n", + dprintk(VIDC_HIGH, "%s: scalable? %d, count %d\n", cl->name, cl->has_scaling, cl->count); } @@ -3693,7 +3690,7 @@ static int __handle_reset_clk(struct msm_vidc_platform_resources *res, return 0; rst = rst_set->reset_tbl[reset_index].rst; - dprintk(VIDC_DBG, "reset_clk: name %s reset_state %d rst %pK\n", + dprintk(VIDC_HIGH, "reset_clk: name %s reset_state %d rst %pK\n", rst_set->reset_tbl[reset_index].name, state, rst); switch (state) { @@ -3747,17 +3744,17 @@ void __disable_unprepare_clks(struct venus_hfi_device *device) } venus_hfi_for_each_clock_reverse(device, cl) { - dprintk(VIDC_DBG, "Clock: %s disable and unprepare\n", + dprintk(VIDC_HIGH, "Clock: %s disable and unprepare\n", cl->name); rc = clk_set_flags(cl->clk, CLKFLAG_NORETAIN_PERIPH); if (rc) { - dprintk(VIDC_WARN, + dprintk(VIDC_ERR, "Failed set flag NORETAIN_PERIPH %s\n", cl->name); } rc = clk_set_flags(cl->clk, CLKFLAG_NORETAIN_MEM); if (rc) { - dprintk(VIDC_WARN, + dprintk(VIDC_ERR, "Failed set flag NORETAIN_MEM %s\n", cl->name); } @@ -3821,13 +3818,13 @@ static inline int __prepare_enable_clks(struct venus_hfi_device *device) rc = clk_set_flags(cl->clk, CLKFLAG_RETAIN_PERIPH); if (rc) { - dprintk(VIDC_WARN, + dprintk(VIDC_ERR, "Failed set flag RETAIN_PERIPH %s\n", cl->name); } rc = clk_set_flags(cl->clk, CLKFLAG_RETAIN_MEM); if (rc) { - dprintk(VIDC_WARN, + dprintk(VIDC_ERR, "Failed set flag RETAIN_MEM %s\n", cl->name); } @@ -3839,7 +3836,8 @@ static inline int __prepare_enable_clks(struct venus_hfi_device *device) } c++; - dprintk(VIDC_DBG, "Clock: %s prepared and enabled\n", cl->name); + dprintk(VIDC_HIGH, + "Clock: %s prepared and enabled\n", cl->name); } call_venus_op(device, clock_config_on_enable, device); @@ -3882,7 +3880,7 @@ static int __init_bus(struct venus_hfi_device *device) venus_hfi_for_each_bus(device, bus) { if (!strcmp(bus->mode, "msm-vidc-llcc")) { if (msm_vidc_syscache_disable) { - dprintk(VIDC_DBG, + dprintk(VIDC_HIGH, "Skipping LLC bus init %s: %s\n", bus->name, bus->mode); continue; @@ -3964,7 +3962,7 @@ static void __deinit_subcaches(struct venus_hfi_device *device) venus_hfi_for_each_subcache_reverse(device, sinfo) { if (sinfo->subcache) { - dprintk(VIDC_DBG, "deinit_subcaches: %s\n", + dprintk(VIDC_HIGH, "deinit_subcaches: %s\n", sinfo->name); llcc_slice_putd(sinfo->subcache); sinfo->subcache = NULL; @@ -4009,7 +4007,7 @@ static int __init_subcaches(struct venus_hfi_device *device) sinfo->subcache = NULL; goto err_subcache_get; } - dprintk(VIDC_DBG, "init_subcaches: %s\n", + dprintk(VIDC_HIGH, "init_subcaches: %s\n", sinfo->name); } @@ -4055,7 +4053,7 @@ static int __init_resources(struct venus_hfi_device *device, rc = __init_subcaches(device); if (rc) - dprintk(VIDC_WARN, "Failed to init subcaches: %d\n", rc); + dprintk(VIDC_ERR, "Failed to init subcaches: %d\n", rc); return rc; @@ -4095,7 +4093,7 @@ static int __protect_cp_mem(struct venus_hfi_device *device) if (!strcmp(cb->name, "venus_ns")) { desc.args[1] = memprot.cp_size = cb->addr_range.start; - dprintk(VIDC_DBG, "%s memprot.cp_size: %#x\n", + dprintk(VIDC_HIGH, "%s memprot.cp_size: %#x\n", __func__, memprot.cp_size); } @@ -4104,7 +4102,7 @@ static int __protect_cp_mem(struct venus_hfi_device *device) cb->addr_range.start; desc.args[3] = memprot.cp_nonpixel_size = cb->addr_range.size; - dprintk(VIDC_DBG, + dprintk(VIDC_HIGH, "%s memprot.cp_nonpixel_start: %#x size: %#x\n", __func__, memprot.cp_nonpixel_start, memprot.cp_nonpixel_size); @@ -4132,7 +4130,7 @@ static int __disable_regulator(struct regulator_info *rinfo, { int rc = 0; - dprintk(VIDC_DBG, "Disabling regulator %s\n", rinfo->name); + dprintk(VIDC_HIGH, "Disabling regulator %s\n", rinfo->name); /* * This call is needed. Driver needs to acquire the control back @@ -4147,7 +4145,7 @@ static int __disable_regulator(struct regulator_info *rinfo, * about it. We can't disable the regulator w/o * getting it back under s/w control */ - dprintk(VIDC_WARN, + dprintk(VIDC_ERR, "Failed to acquire control on %s\n", rinfo->name); @@ -4156,7 +4154,7 @@ static int __disable_regulator(struct regulator_info *rinfo, rc = regulator_disable(rinfo->regulator); if (rc) { - dprintk(VIDC_WARN, + dprintk(VIDC_ERR, "Failed to disable %s: %d\n", rinfo->name, rc); goto disable_regulator_failed; @@ -4176,7 +4174,7 @@ static int __enable_hw_power_collapse(struct venus_hfi_device *device) rc = __hand_off_regulators(device); if (rc) - dprintk(VIDC_WARN, + dprintk(VIDC_ERR, "%s : Failed to enable HW power collapse %d\n", __func__, rc); return rc; @@ -4187,7 +4185,7 @@ static int __enable_regulators(struct venus_hfi_device *device) int rc = 0, c = 0; struct regulator_info *rinfo; - dprintk(VIDC_DBG, "Enabling regulators\n"); + dprintk(VIDC_HIGH, "Enabling regulators\n"); venus_hfi_for_each_regulator(device, rinfo) { rc = regulator_enable(rinfo->regulator); @@ -4198,7 +4196,7 @@ static int __enable_regulators(struct venus_hfi_device *device) goto err_reg_enable_failed; } - dprintk(VIDC_DBG, "Enabled regulator %s\n", + dprintk(VIDC_HIGH, "Enabled regulator %s\n", rinfo->name); c++; } @@ -4216,7 +4214,7 @@ int __disable_regulators(struct venus_hfi_device *device) { struct regulator_info *rinfo; - dprintk(VIDC_DBG, "Disabling regulators\n"); + dprintk(VIDC_HIGH, "Disabling regulators\n"); venus_hfi_for_each_regulator_reverse(device, rinfo) __disable_regulator(rinfo, device); @@ -4237,17 +4235,17 @@ static int __enable_subcaches(struct venus_hfi_device *device) venus_hfi_for_each_subcache(device, sinfo) { rc = llcc_slice_activate(sinfo->subcache); if (rc) { - dprintk(VIDC_WARN, "Failed to activate %s: %d\n", + dprintk(VIDC_ERR, "Failed to activate %s: %d\n", sinfo->name, rc); msm_vidc_res_handle_fatal_hw_error(device->res, true); goto err_activate_fail; } sinfo->isactive = true; - dprintk(VIDC_DBG, "Activated subcache %s\n", sinfo->name); + dprintk(VIDC_HIGH, "Activated subcache %s\n", sinfo->name); c++; } - dprintk(VIDC_DBG, "Activated %d Subcaches to Venus\n", c); + dprintk(VIDC_HIGH, "Activated %d Subcaches to Venus\n", c); return 0; @@ -4268,7 +4266,7 @@ static int __set_subcaches(struct venus_hfi_device *device) struct vidc_resource_hdr rhdr; if (device->res->sys_cache_res_set) { - dprintk(VIDC_DBG, "Subcaches already set to Venus\n"); + dprintk(VIDC_HIGH, "Subcaches already set to Venus\n"); return 0; } @@ -4287,7 +4285,7 @@ static int __set_subcaches(struct venus_hfi_device *device) /* Set resource to Venus for activated subcaches */ if (c) { - dprintk(VIDC_DBG, "Setting %d Subcaches\n", c); + dprintk(VIDC_HIGH, "Setting %d Subcaches\n", c); rhdr.resource_handle = sc_res_info; /* cookie */ rhdr.resource_id = VIDC_RESOURCE_SYSCACHE; @@ -4296,7 +4294,7 @@ static int __set_subcaches(struct venus_hfi_device *device) rc = __core_set_resource(device, &rhdr, (void *)sc_res_info); if (rc) { - dprintk(VIDC_WARN, "Failed to set subcaches %d\n", rc); + dprintk(VIDC_ERR, "Failed to set subcaches %d\n", rc); goto err_fail_set_subacaches; } @@ -4305,7 +4303,7 @@ static int __set_subcaches(struct venus_hfi_device *device) sinfo->isset = true; } - dprintk(VIDC_DBG, "Set Subcaches done to Venus\n"); + dprintk(VIDC_HIGH, "Set Subcaches done to Venus\n"); device->res->sys_cache_res_set = true; } @@ -4347,13 +4345,13 @@ static int __release_subcaches(struct venus_hfi_device *device) } if (c > 0) { - dprintk(VIDC_DBG, "Releasing %d subcaches\n", c); + dprintk(VIDC_HIGH, "Releasing %d subcaches\n", c); rhdr.resource_handle = sc_res_info; /* cookie */ rhdr.resource_id = VIDC_RESOURCE_SYSCACHE; rc = __core_release_resource(device, &rhdr); if (rc) - dprintk(VIDC_WARN, + dprintk(VIDC_ERR, "Failed to release %d subcaches\n", c); } @@ -4373,11 +4371,11 @@ static int __disable_subcaches(struct venus_hfi_device *device) /* De-activate subcaches */ venus_hfi_for_each_subcache_reverse(device, sinfo) { if (sinfo->isactive) { - dprintk(VIDC_DBG, "De-activate subcache %s\n", + dprintk(VIDC_HIGH, "De-activate subcache %s\n", sinfo->name); rc = llcc_slice_deactivate(sinfo->subcache); if (rc) { - dprintk(VIDC_WARN, + dprintk(VIDC_ERR, "Failed to de-activate %s: %d\n", sinfo->name, rc); } @@ -4402,7 +4400,7 @@ static int __set_ubwc_config(struct venus_hfi_device *device) rc = call_hfi_pkt_op(device, sys_ubwc_config, pkt, device->res->ubwc_config); if (rc) { - dprintk(VIDC_WARN, + dprintk(VIDC_ERR, "ubwc config setting to FW failed\n"); rc = -ENOTEMPTY; goto fail_to_set_ubwc_config; @@ -4413,7 +4411,7 @@ static int __set_ubwc_config(struct venus_hfi_device *device) goto fail_to_set_ubwc_config; } - dprintk(VIDC_DBG, + dprintk(VIDC_HIGH, "Configured UBWC Config to Venus\n"); fail_to_set_ubwc_config: @@ -4457,7 +4455,7 @@ static int __venus_power_on(struct venus_hfi_device *device) rc = __scale_clocks(device); if (rc) { - dprintk(VIDC_WARN, + dprintk(VIDC_ERR, "Failed to scale clocks, performance might be affected\n"); rc = 0; } @@ -4497,10 +4495,10 @@ static void __power_off_common(struct venus_hfi_device *device) dprintk(VIDC_ERR, "Failed to reset ahb2axi\n"); if (__disable_regulators(device)) - dprintk(VIDC_WARN, "Failed to disable regulators\n"); + dprintk(VIDC_ERR, "Failed to disable regulators\n"); if (__unvote_buses(device)) - dprintk(VIDC_WARN, "Failed to unvote for buses\n"); + dprintk(VIDC_ERR, "Failed to unvote for buses\n"); device->power_enabled = false; } @@ -4512,11 +4510,11 @@ static inline int __suspend(struct venus_hfi_device *device) dprintk(VIDC_ERR, "Invalid params: %pK\n", device); return -EINVAL; } else if (!device->power_enabled) { - dprintk(VIDC_DBG, "Power already disabled\n"); + dprintk(VIDC_HIGH, "Power already disabled\n"); return 0; } - dprintk(VIDC_PROF, "Entering suspend\n"); + dprintk(VIDC_HIGH, "Entering suspend\n"); if (device->res->pm_qos_latency_us && pm_qos_request_active(&device->qos)) @@ -4524,14 +4522,14 @@ static inline int __suspend(struct venus_hfi_device *device) rc = __tzbsp_set_video_state(TZBSP_VIDEO_STATE_SUSPEND); if (rc) { - dprintk(VIDC_WARN, "Failed to suspend video core %d\n", rc); + dprintk(VIDC_ERR, "Failed to suspend video core %d\n", rc); goto err_tzbsp_suspend; } __disable_subcaches(device); call_venus_op(device, power_off, device); - dprintk(VIDC_PROF, "Venus power off\n"); + dprintk(VIDC_HIGH, "Venus power off\n"); return rc; err_tzbsp_suspend: @@ -4549,11 +4547,11 @@ static inline int __resume(struct venus_hfi_device *device) } else if (device->power_enabled) { goto exit; } else if (!__core_in_valid_state(device)) { - dprintk(VIDC_DBG, "venus_hfi_device in deinit state."); + dprintk(VIDC_ERR, "venus_hfi_device in deinit state."); return -EINVAL; } - dprintk(VIDC_PROF, "Resuming from power collapse\n"); + dprintk(VIDC_HIGH, "Resuming from power collapse\n"); rc = __venus_power_on(device); if (rc) { dprintk(VIDC_ERR, "Failed to power on venus\n"); @@ -4600,7 +4598,7 @@ static inline int __resume(struct venus_hfi_device *device) __set_subcaches(device); __dsp_resume(device, flags); - dprintk(VIDC_PROF, "Resumed from power collapse\n"); + dprintk(VIDC_HIGH, "Resumed from power collapse\n"); exit: /* Don't reset skip_pc_count for SYS_PC_PREP cmd */ if (device->last_packet_type != HFI_CMD_SYS_PC_PREP) @@ -4703,7 +4701,7 @@ static void __unload_fw(struct venus_hfi_device *device) device->resources.fw.cookie = NULL; __deinit_resources(device); - dprintk(VIDC_PROF, "Firmware unloaded successfully\n"); + dprintk(VIDC_HIGH, "Firmware unloaded successfully\n"); } static int venus_hfi_get_fw_info(void *dev, struct hal_fw_info *fw_info) @@ -4737,7 +4735,7 @@ static int venus_hfi_get_fw_info(void *dev, struct hal_fw_info *fw_info) ; if (i == VENUS_VERSION_LENGTH - 1) { - dprintk(VIDC_WARN, "Venus version string is not proper\n"); + dprintk(VIDC_ERR, "Venus version string is not proper\n"); fw_info->version[0] = '\0'; goto fail_version_string; } @@ -4747,7 +4745,7 @@ static int venus_hfi_get_fw_info(void *dev, struct hal_fw_info *fw_info) fw_info->version[j] = '\0'; fail_version_string: - dprintk(VIDC_DBG, "F/W version retrieved : %s\n", fw_info->version); + dprintk(VIDC_HIGH, "F/W version retrieved : %s\n", fw_info->version); fw_info->base_addr = device->hal_data->firmware_base; fw_info->register_base = device->res->register_base; fw_info->register_size = device->hal_data->register_size; @@ -4907,7 +4905,7 @@ static struct venus_hfi_device *__add_device(u32 device_id, return NULL; } - dprintk(VIDC_INFO, "entered , device_id: %d\n", device_id); + dprintk(VIDC_HIGH, "entered , device_id: %d\n", device_id); hdevice = kzalloc(sizeof(struct venus_hfi_device), GFP_KERNEL); if (!hdevice) { diff --git a/msm/vidc/hfi_iris2.c b/msm/vidc/hfi_iris2.c index ecae4f752936..12377281e5b3 100644 --- a/msm/vidc/hfi_iris2.c +++ b/msm/vidc/hfi_iris2.c @@ -193,7 +193,7 @@ void __power_off_iris2(struct venus_hfi_device *device) __read_register(device, AON_WRAPPER_MVP_NOC_LPI_STATUS); reg_status = lpi_status & BIT(0); - dprintk(VIDC_DBG, + dprintk(VIDC_HIGH, "Noc: lpi_status %d noc_status %d (count %d)\n", lpi_status, reg_status, count); usleep_range(50, 100); @@ -213,7 +213,7 @@ void __power_off_iris2(struct venus_hfi_device *device) lpi_status = __read_register(device, WRAPPER_DEBUG_BRIDGE_LPI_STATUS_IRIS2); reg_status = lpi_status & 0x7; - dprintk(VIDC_DBG, + dprintk(VIDC_HIGH, "DBLP Set : lpi_status %d reg_status %d (count %d)\n", lpi_status, reg_status, count); usleep_range(50, 100); @@ -232,7 +232,7 @@ void __power_off_iris2(struct venus_hfi_device *device) while (lpi_status && count < max_count) { lpi_status = __read_register(device, WRAPPER_DEBUG_BRIDGE_LPI_STATUS_IRIS2); - dprintk(VIDC_DBG, + dprintk(VIDC_HIGH, "DBLP Release: lpi_status %d(count %d)\n", lpi_status, count); usleep_range(50, 100); @@ -252,10 +252,10 @@ void __power_off_iris2(struct venus_hfi_device *device) /* HPG 6.1.2 Step 5 */ if (__disable_regulators(device)) - dprintk(VIDC_WARN, "Failed to disable regulators\n"); + dprintk(VIDC_ERR, "Failed to disable regulators\n"); if (__unvote_buses(device)) - dprintk(VIDC_WARN, "Failed to unvote for buses\n"); + dprintk(VIDC_ERR, "Failed to unvote for buses\n"); device->power_enabled = false; } @@ -272,20 +272,20 @@ int __prepare_pc_iris2(struct venus_hfi_device *device) idle_status = ctrl_status & BIT(30); if (pc_ready) { - dprintk(VIDC_DBG, "Already in pc_ready state\n"); + dprintk(VIDC_HIGH, "Already in pc_ready state\n"); return 0; } wfi_status = BIT(0) & __read_register(device, WRAPPER_TZ_CPU_STATUS); if (!wfi_status || !idle_status) { - dprintk(VIDC_WARN, "Skipping PC, wfi status not set\n"); + dprintk(VIDC_ERR, "Skipping PC, wfi status not set\n"); goto skip_power_off; } rc = __prepare_pc(device); if (rc) { - dprintk(VIDC_WARN, "Failed __prepare_pc %d\n", rc); + dprintk(VIDC_ERR, "Failed __prepare_pc %d\n", rc); goto skip_power_off; } @@ -307,7 +307,7 @@ int __prepare_pc_iris2(struct venus_hfi_device *device) return rc; skip_power_off: - dprintk(VIDC_WARN, "Skip PC, wfi=%#x, idle=%#x, pcr=%#x, ctrl=%#x)\n", + dprintk(VIDC_ERR, "Skip PC, wfi=%#x, idle=%#x, pcr=%#x, ctrl=%#x)\n", wfi_status, idle_status, pc_ready, ctrl_status); return -EAGAIN; } @@ -377,7 +377,7 @@ void __core_clear_interrupt_iris2(struct venus_hfi_device *device) if (intr_status & mask) { device->intr_status |= intr_status; device->reg_count++; - dprintk(VIDC_DBG, + dprintk(VIDC_LOW, "INTERRUPT for device: %pK: times: %d interrupt_status: %d\n", device, device->reg_count, intr_status); } else { diff --git a/msm/vidc/hfi_packetization.c b/msm/vidc/hfi_packetization.c index aded2b398165..036a0c4c5d97 100644 --- a/msm/vidc/hfi_packetization.c +++ b/msm/vidc/hfi_packetization.c @@ -70,7 +70,7 @@ enum hal_video_codec vidc_get_hal_codec(u32 hfi_codec) hal_codec = HAL_VIDEO_CODEC_CVP; break; default: - dprintk(VIDC_INFO, "%s: invalid codec 0x%x\n", + dprintk(VIDC_HIGH, "%s: invalid codec 0x%x\n", __func__, hfi_codec); hal_codec = 0; break; @@ -135,7 +135,7 @@ u32 vidc_get_hfi_codec(enum hal_video_codec hal_codec) hfi_codec = HFI_VIDEO_CODEC_CVP; break; default: - dprintk(VIDC_INFO, "%s: invalid codec 0x%x\n", + dprintk(VIDC_HIGH, "%s: invalid codec 0x%x\n", __func__, hal_codec); hfi_codec = 0; break; @@ -207,7 +207,7 @@ int create_pkt_cmd_sys_coverage_config( pkt->num_properties = 1; pkt->rg_property_data[0] = HFI_PROPERTY_SYS_CONFIG_COVERAGE; pkt->rg_property_data[1] = mode; - dprintk(VIDC_DBG, "Firmware coverage mode %d\n", + dprintk(VIDC_HIGH, "Firmware coverage mode %d\n", pkt->rg_property_data[1]); return 0; } @@ -256,7 +256,7 @@ int create_pkt_cmd_sys_set_resource( for (i = 0; i < hfi_sc_info->num_entries; i++) { hfi_sc[i] = res_sc[i]; - dprintk(VIDC_DBG, "entry hfi#%d, sc_id %d, size %d\n", + dprintk(VIDC_HIGH, "entry hfi#%d, sc_id %d, size %d\n", i, hfi_sc[i].sc_id, hfi_sc[i].size); } break; @@ -297,7 +297,7 @@ int create_pkt_cmd_sys_release_resource( rc = -ENOTSUPP; } - dprintk(VIDC_DBG, + dprintk(VIDC_HIGH, "rel_res: pkt_type 0x%x res_type 0x%x prepared\n", pkt->packet_type, pkt->resource_type); @@ -785,7 +785,7 @@ int create_pkt_cmd_session_set_property( if (size && pdata) memcpy(&pkt->rg_property_data[1], pdata, size); - dprintk(VIDC_DBG, "Setting HAL Property = 0x%x\n", ptype); + dprintk(VIDC_HIGH, "Setting HAL Property = 0x%x\n", ptype); return 0; } @@ -804,7 +804,7 @@ static int get_hfi_ssr_type(enum hal_ssr_trigger_type type) rc = HFI_TEST_SSR_HW_WDOG_IRQ; break; default: - dprintk(VIDC_WARN, + dprintk(VIDC_ERR, "SSR trigger type not recognized, using WDOG.\n"); } return rc; @@ -881,7 +881,7 @@ static struct hfi_packetization_ops hfi_default = { struct hfi_packetization_ops *hfi_get_pkt_ops_handle( enum hfi_packetization_type type) { - dprintk(VIDC_DBG, "%s selected\n", + dprintk(VIDC_HIGH, "%s selected\n", type == HFI_PACKETIZATION_4XX ? "4xx packetization" : "Unknown hfi"); diff --git a/msm/vidc/hfi_response_handler.c b/msm/vidc/hfi_response_handler.c index b731ad2260cc..5805b7ba195d 100644 --- a/msm/vidc/hfi_response_handler.c +++ b/msm/vidc/hfi_response_handler.c @@ -141,7 +141,7 @@ static int hfi_process_sess_evt_seq_changed(u32 device_id, (struct hfi_frame_size *) data_ptr; event_notify.width = frame_sz->width; event_notify.height = frame_sz->height; - dprintk(VIDC_DBG, "height: %d width: %d\n", + dprintk(VIDC_HIGH, "height: %d width: %d\n", frame_sz->height, frame_sz->width); data_ptr += sizeof(struct hfi_frame_size); @@ -152,7 +152,7 @@ static int hfi_process_sess_evt_seq_changed(u32 device_id, (struct hfi_profile_level *) data_ptr; event_notify.profile = profile_level->profile; event_notify.level = profile_level->level; - dprintk(VIDC_DBG, "profile: %d level: %d\n", + dprintk(VIDC_HIGH, "profile: %d level: %d\n", profile_level->profile, profile_level->level); data_ptr += @@ -184,7 +184,7 @@ static int hfi_process_sess_evt_seq_changed(u32 device_id, MSM_VIDC_BIT_DEPTH_10; else event_notify.bit_depth = luma_bit_depth; - dprintk(VIDC_DBG, + dprintk(VIDC_HIGH, "bitdepth(%d), luma_bit_depth(%d), chroma_bit_depth(%d)\n", event_notify.bit_depth, luma_bit_depth, chroma_bit_depth); @@ -195,7 +195,7 @@ static int hfi_process_sess_evt_seq_changed(u32 device_id, pic_struct = (struct hfi_pic_struct *) data_ptr; event_notify.pic_struct = pic_struct->progressive_only; - dprintk(VIDC_DBG, + dprintk(VIDC_HIGH, "Progressive only flag: %d\n", pic_struct->progressive_only); data_ptr += @@ -207,7 +207,7 @@ static int hfi_process_sess_evt_seq_changed(u32 device_id, (struct hfi_colour_space *) data_ptr; event_notify.colour_space = colour_info->colour_space; - dprintk(VIDC_DBG, + dprintk(VIDC_HIGH, "Colour space value is: %d\n", colour_info->colour_space); data_ptr += @@ -217,7 +217,7 @@ static int hfi_process_sess_evt_seq_changed(u32 device_id, data_ptr = data_ptr + sizeof(u32); entropy_mode = *(u32 *)data_ptr; event_notify.entropy_mode = entropy_mode; - dprintk(VIDC_DBG, + dprintk(VIDC_HIGH, "Entropy Mode: 0x%x\n", entropy_mode); data_ptr += sizeof(u32); @@ -229,7 +229,7 @@ static int hfi_process_sess_evt_seq_changed(u32 device_id, data_ptr; event_notify.capture_buf_count = buf_req->buffer_count_min; - dprintk(VIDC_DBG, + dprintk(VIDC_HIGH, "Capture Count : 0x%x\n", event_notify.capture_buf_count); data_ptr += @@ -245,11 +245,11 @@ static int hfi_process_sess_evt_seq_changed(u32 device_id, event_notify.crop_data.width = crop_info->width; event_notify.crop_data.height = crop_info->height; - dprintk(VIDC_DBG, + dprintk(VIDC_HIGH, "CROP info : Left = %d Top = %d\n", crop_info->left, crop_info->top); - dprintk(VIDC_DBG, + dprintk(VIDC_HIGH, "CROP info : Width = %d Height = %d\n", crop_info->width, crop_info->height); @@ -280,7 +280,7 @@ static int hfi_process_evt_release_buffer_ref(u32 device_id, struct msm_vidc_cb_event event_notify = {0}; struct hfi_msg_release_buffer_ref_event_packet *data; - dprintk(VIDC_DBG, + dprintk(VIDC_LOW, "RECEIVED: EVENT_NOTIFY - release_buffer_reference\n"); if (sizeof(struct hfi_msg_event_notify_packet) > pkt->size) { @@ -329,13 +329,13 @@ static int hfi_process_session_error(u32 device_id, cmd_done.session_id = (void *)(uintptr_t)pkt->session_id; cmd_done.status = hfi_map_err_status(pkt->event_data1); info->response.cmd = cmd_done; - dprintk(VIDC_INFO, "Received: SESSION_ERROR with event id : %#x %#x\n", + dprintk(VIDC_HIGH, "Received: SESSION_ERROR with event id : %#x %#x\n", pkt->event_data1, pkt->event_data2); switch (pkt->event_data1) { /* Ignore below errors */ case HFI_ERR_SESSION_INVALID_SCALE_FACTOR: case HFI_ERR_SESSION_UPSCALE_NOT_SUPPORTED: - dprintk(VIDC_INFO, "Non Fatal: HFI_EVENT_SESSION_ERROR\n"); + dprintk(VIDC_HIGH, "Non Fatal: HFI_EVENT_SESSION_ERROR\n"); info->response_type = HAL_RESPONSE_UNUSED; break; default: @@ -354,7 +354,7 @@ static int hfi_process_event_notify(u32 device_id, struct msm_vidc_cb_info *info) { struct hfi_msg_event_notify_packet *pkt = _pkt; - dprintk(VIDC_DBG, "Received: EVENT_NOTIFY\n"); + dprintk(VIDC_LOW, "Received: EVENT_NOTIFY\n"); if (pkt->size < sizeof(struct hfi_msg_event_notify_packet)) { dprintk(VIDC_ERR, "Invalid Params\n"); @@ -367,17 +367,17 @@ static int hfi_process_event_notify(u32 device_id, pkt->event_data1, pkt->event_data2); return hfi_process_sys_error(device_id, pkt, info); case HFI_EVENT_SESSION_ERROR: - dprintk(VIDC_INFO, "HFI_EVENT_SESSION_ERROR[%#x]\n", + dprintk(VIDC_HIGH, "HFI_EVENT_SESSION_ERROR[%#x]\n", pkt->session_id); return hfi_process_session_error(device_id, pkt, info); case HFI_EVENT_SESSION_SEQUENCE_CHANGED: - dprintk(VIDC_INFO, "HFI_EVENT_SESSION_SEQUENCE_CHANGED[%#x]\n", + dprintk(VIDC_HIGH, "HFI_EVENT_SESSION_SEQUENCE_CHANGED[%#x]\n", pkt->session_id); return hfi_process_sess_evt_seq_changed(device_id, pkt, info); case HFI_EVENT_RELEASE_BUFFER_REFERENCE: - dprintk(VIDC_INFO, "HFI_EVENT_RELEASE_BUFFER_REFERENCE[%#x]\n", + dprintk(VIDC_LOW, "HFI_EVENT_RELEASE_BUFFER_REFERENCE[%#x]\n", pkt->session_id); return hfi_process_evt_release_buffer_ref(device_id, pkt, info); @@ -399,7 +399,7 @@ static int hfi_process_sys_init_done(u32 device_id, struct msm_vidc_cb_cmd_done cmd_done = {0}; enum vidc_status status = VIDC_ERR_NONE; - dprintk(VIDC_DBG, "RECEIVED: SYS_INIT_DONE\n"); + dprintk(VIDC_HIGH, "RECEIVED: SYS_INIT_DONE\n"); if (sizeof(struct hfi_msg_sys_init_done_packet) > pkt->size) { dprintk(VIDC_ERR, "%s: bad_pkt_size: %d\n", __func__, pkt->size); @@ -430,7 +430,7 @@ static int hfi_process_sys_rel_resource_done(u32 device_id, enum vidc_status status = VIDC_ERR_NONE; u32 pkt_size; - dprintk(VIDC_DBG, "RECEIVED: SYS_RELEASE_RESOURCE_DONE\n"); + dprintk(VIDC_HIGH, "RECEIVED: SYS_RELEASE_RESOURCE_DONE\n"); pkt_size = sizeof(struct hfi_msg_sys_release_resource_done_packet); if (pkt_size > pkt->size) { dprintk(VIDC_ERR, @@ -485,7 +485,7 @@ static void hfi_process_sess_get_prop_buf_req( } while (req_bytes) { - dprintk(VIDC_DBG, "got buffer requirements for: %d\n", + dprintk(VIDC_HIGH, "got buffer requirements for: %d\n", hfi_buf_req->buffer_type); switch (hfi_buf_req->buffer_type) { case HFI_BUFFER_INPUT: @@ -576,7 +576,7 @@ static int hfi_process_session_prop_info(u32 device_id, struct msm_vidc_cb_cmd_done cmd_done = {0}; struct buffer_requirements buff_req = { { {0} } }; - dprintk(VIDC_DBG, "Received SESSION_PROPERTY_INFO[%#x]\n", + dprintk(VIDC_HIGH, "Received SESSION_PROPERTY_INFO[%#x]\n", pkt->session_id); if (pkt->size < sizeof(struct hfi_msg_session_property_info_packet)) { @@ -603,7 +603,7 @@ static int hfi_process_session_prop_info(u32 device_id, return 0; default: - dprintk(VIDC_DBG, + dprintk(VIDC_HIGH, "hal_process_session_prop_info: unknown_prop_id: %x\n", pkt->rg_property_data[0]); return -ENOTSUPP; @@ -617,7 +617,7 @@ static int hfi_process_session_init_done(u32 device_id, struct hfi_msg_sys_session_init_done_packet *pkt = _pkt; struct msm_vidc_cb_cmd_done cmd_done = {0}; - dprintk(VIDC_DBG, "RECEIVED: SESSION_INIT_DONE[%x]\n", pkt->session_id); + dprintk(VIDC_HIGH, "RECEIVED: SESSION_INIT_DONE[%x]\n", pkt->session_id); if (sizeof(struct hfi_msg_sys_session_init_done_packet) > pkt->size) { dprintk(VIDC_ERR, @@ -642,7 +642,7 @@ static int hfi_process_session_load_res_done(u32 device_id, struct hfi_msg_session_load_resources_done_packet *pkt = _pkt; struct msm_vidc_cb_cmd_done cmd_done = {0}; - dprintk(VIDC_DBG, "RECEIVED: SESSION_LOAD_RESOURCES_DONE[%#x]\n", + dprintk(VIDC_HIGH, "RECEIVED: SESSION_LOAD_RESOURCES_DONE[%#x]\n", pkt->session_id); if (sizeof(struct hfi_msg_session_load_resources_done_packet) != @@ -671,7 +671,7 @@ static int hfi_process_session_flush_done(u32 device_id, struct hfi_msg_session_flush_done_packet *pkt = _pkt; struct msm_vidc_cb_cmd_done cmd_done = {0}; - dprintk(VIDC_DBG, "RECEIVED: SESSION_FLUSH_DONE[%#x]\n", + dprintk(VIDC_HIGH, "RECEIVED: SESSION_FLUSH_DONE[%#x]\n", pkt->session_id); if (sizeof(struct hfi_msg_session_flush_done_packet) != pkt->size) { @@ -716,7 +716,7 @@ static int hfi_process_session_etb_done(u32 device_id, struct msm_vidc_cb_data_done data_done = {0}; struct hfi_picture_type *hfi_picture_type = NULL; - dprintk(VIDC_DBG, "RECEIVED: SESSION_ETB_DONE[%#x]\n", pkt->session_id); + dprintk(VIDC_LOW, "RECEIVED: SESSION_ETB_DONE[%#x]\n", pkt->session_id); if (!pkt || pkt->size < sizeof(struct hfi_msg_session_empty_buffer_done_packet)) { @@ -749,7 +749,7 @@ static int hfi_process_session_etb_done(u32 device_id, data_done.input_done.flags = hfi_picture_type->picture_type; else - dprintk(VIDC_DBG, + dprintk(VIDC_LOW, "Non-Sync frame sent for H264/HEVC\n"); } @@ -791,7 +791,7 @@ static int hfi_process_session_ftb_done( struct hfi_msg_session_fill_buffer_done_compressed_packet *pkt = (struct hfi_msg_session_fill_buffer_done_compressed_packet *) msg_hdr; - dprintk(VIDC_DBG, "RECEIVED: SESSION_FTB_DONE[%#x]\n", + dprintk(VIDC_LOW, "RECEIVED: SESSION_FTB_DONE[%#x]\n", pkt->session_id); if (sizeof(struct hfi_msg_session_fill_buffer_done_compressed_packet) @@ -831,7 +831,7 @@ static int hfi_process_session_ftb_done( (struct hfi_msg_session_fbd_uncompressed_plane0_packet *) msg_hdr; - dprintk(VIDC_DBG, "RECEIVED: SESSION_FTB_DONE[%#x]\n", + dprintk(VIDC_LOW, "RECEIVED: SESSION_FTB_DONE[%#x]\n", pkt->session_id); if (sizeof( struct hfi_msg_session_fbd_uncompressed_plane0_packet) > @@ -895,7 +895,7 @@ static int hfi_process_session_start_done(u32 device_id, struct hfi_msg_session_start_done_packet *pkt = _pkt; struct msm_vidc_cb_cmd_done cmd_done = {0}; - dprintk(VIDC_DBG, "RECEIVED: SESSION_START_DONE[%#x]\n", + dprintk(VIDC_HIGH, "RECEIVED: SESSION_START_DONE[%#x]\n", pkt->session_id); if (!pkt || pkt->size != @@ -922,7 +922,7 @@ static int hfi_process_session_stop_done(u32 device_id, struct hfi_msg_session_stop_done_packet *pkt = _pkt; struct msm_vidc_cb_cmd_done cmd_done = {0}; - dprintk(VIDC_DBG, "RECEIVED: SESSION_STOP_DONE[%#x]\n", + dprintk(VIDC_HIGH, "RECEIVED: SESSION_STOP_DONE[%#x]\n", pkt->session_id); if (!pkt || pkt->size != @@ -950,7 +950,7 @@ static int hfi_process_session_rel_res_done(u32 device_id, struct hfi_msg_session_release_resources_done_packet *pkt = _pkt; struct msm_vidc_cb_cmd_done cmd_done = {0}; - dprintk(VIDC_DBG, "RECEIVED: SESSION_RELEASE_RESOURCES_DONE[%#x]\n", + dprintk(VIDC_HIGH, "RECEIVED: SESSION_RELEASE_RESOURCES_DONE[%#x]\n", pkt->session_id); if (!pkt || pkt->size != @@ -984,7 +984,7 @@ static int hfi_process_session_rel_buf_done(u32 device_id, pkt ? pkt->size : 0); return -E2BIG; } - dprintk(VIDC_DBG, "RECEIVED:SESSION_RELEASE_BUFFER_DONE[%#x]\n", + dprintk(VIDC_HIGH, "RECEIVED:SESSION_RELEASE_BUFFER_DONE[%#x]\n", pkt->session_id); cmd_done.device_id = device_id; @@ -1014,7 +1014,7 @@ static int hfi_process_session_register_buffer_done(u32 device_id, __func__, pkt ? pkt->size : 0); return -E2BIG; } - dprintk(VIDC_DBG, "RECEIVED: SESSION_REGISTER_BUFFERS_DONE[%#x]\n", + dprintk(VIDC_HIGH, "RECEIVED: SESSION_REGISTER_BUFFERS_DONE[%#x]\n", pkt->session_id); cmd_done.device_id = device_id; @@ -1042,7 +1042,7 @@ static int hfi_process_session_unregister_buffer_done(u32 device_id, __func__, pkt ? pkt->size : 0); return -E2BIG; } - dprintk(VIDC_DBG, "RECEIVED: SESSION_UNREGISTER_BUFFERS_DONE[%#x]\n", + dprintk(VIDC_HIGH, "RECEIVED: SESSION_UNREGISTER_BUFFERS_DONE[%#x]\n", pkt->session_id); cmd_done.device_id = device_id; @@ -1064,7 +1064,7 @@ static int hfi_process_session_end_done(u32 device_id, struct hfi_msg_sys_session_end_done_packet *pkt = _pkt; struct msm_vidc_cb_cmd_done cmd_done = {0}; - dprintk(VIDC_DBG, "RECEIVED: SESSION_END_DONE[%#x]\n", pkt->session_id); + dprintk(VIDC_HIGH, "RECEIVED: SESSION_END_DONE[%#x]\n", pkt->session_id); if (!pkt || pkt->size != sizeof(struct hfi_msg_sys_session_end_done_packet)) { @@ -1090,7 +1090,7 @@ static int hfi_process_session_abort_done(u32 device_id, struct hfi_msg_sys_session_abort_done_packet *pkt = _pkt; struct msm_vidc_cb_cmd_done cmd_done = {0}; - dprintk(VIDC_DBG, "RECEIVED: SESSION_ABORT_DONE[%#x]\n", + dprintk(VIDC_HIGH, "RECEIVED: SESSION_ABORT_DONE[%#x]\n", pkt->session_id); if (!pkt || pkt->size != @@ -1142,7 +1142,7 @@ static void hfi_process_sys_get_prop_image_version( version[i] = ' '; } version[i] = '\0'; - dprintk(VIDC_DBG, "F/W version: %s\n", version); + dprintk(VIDC_HIGH, "F/W version: %s\n", version); smem_table_ptr = qcom_smem_get(QCOM_SMEM_HOST_ANY, SMEM_IMAGE_VERSION_TABLE, &smem_block_size); @@ -1179,7 +1179,7 @@ static int hfi_process_sys_property_info(u32 device_id, }; return 0; default: - dprintk(VIDC_DBG, + dprintk(VIDC_HIGH, "%s: unknown_prop_id: %x\n", __func__, pkt->rg_property_data[0]); return -ENOTSUPP; @@ -1210,7 +1210,7 @@ int hfi_process_msg_packet(u32 device_id, struct vidc_hal_msg_pkt_hdr *msg_hdr, return -EINVAL; } - dprintk(VIDC_DBG, "Parse response %#x\n", msg_hdr->packet); + dprintk(VIDC_LOW, "Parse response %#x\n", msg_hdr->packet); switch (msg_hdr->packet) { case HFI_MSG_EVENT_NOTIFY: pkt_func = (pkt_func_def)hfi_process_event_notify; @@ -1272,7 +1272,7 @@ int hfi_process_msg_packet(u32 device_id, struct vidc_hal_msg_pkt_hdr *msg_hdr, pkt_func = (pkt_func_def)hfi_process_ignore; break; default: - dprintk(VIDC_DBG, "Unable to parse message: %#x\n", + dprintk(VIDC_LOW, "Unable to parse message: %#x\n", msg_hdr->packet); break; } diff --git a/msm/vidc/msm_cvp_external.c b/msm/vidc/msm_cvp_external.c index 1ccb9368aa53..10976ee06687 100644 --- a/msm/vidc/msm_cvp_external.c +++ b/msm/vidc/msm_cvp_external.c @@ -187,7 +187,7 @@ static int msm_cvp_init_downscale_resolution(struct msm_vidc_inst *inst) ds_height = cvp->height; if (!cvp->downscale) { - dprintk(VIDC_DBG, "%s: downscaling not enabled\n", __func__); + dprintk(VIDC_HIGH, "%s: downscaling not enabled\n", __func__); goto exit; } @@ -240,10 +240,10 @@ static void msm_cvp_deinit_downscale_buffers(struct msm_vidc_inst *inst) return; } cvp = inst->cvp; - dprintk(VIDC_DBG, "%s:\n", __func__); + dprintk(VIDC_HIGH, "%s:\n", __func__); if (cvp->src_buffer.dbuf) { - print_cvp_buffer(VIDC_DBG, "free: src_buffer", + print_cvp_buffer(VIDC_HIGH, "free: src_buffer", inst, &cvp->src_buffer); if (msm_cvp_free_buffer(inst, &cvp->src_buffer)) print_cvp_buffer(VIDC_ERR, @@ -251,7 +251,7 @@ static void msm_cvp_deinit_downscale_buffers(struct msm_vidc_inst *inst) inst, &cvp->src_buffer); } if (cvp->ref_buffer.dbuf) { - print_cvp_buffer(VIDC_DBG, "free: ref_buffer", + print_cvp_buffer(VIDC_HIGH, "free: ref_buffer", inst, &cvp->ref_buffer); if (msm_cvp_free_buffer(inst, &cvp->ref_buffer)) print_cvp_buffer(VIDC_ERR, @@ -272,10 +272,10 @@ static int msm_cvp_init_downscale_buffers(struct msm_vidc_inst *inst) cvp = inst->cvp; if (!cvp->downscale) { - dprintk(VIDC_DBG, "%s: downscaling not enabled\n", __func__); + dprintk(VIDC_HIGH, "%s: downscaling not enabled\n", __func__); return 0; } - dprintk(VIDC_DBG, "%s:\n", __func__); + dprintk(VIDC_HIGH, "%s:\n", __func__); cvp->src_buffer.size = VENUS_BUFFER_SIZE(COLOR_FMT_NV12_UBWC, cvp->ds_width, cvp->ds_height); @@ -286,7 +286,7 @@ static int msm_cvp_init_downscale_buffers(struct msm_vidc_inst *inst) inst, &cvp->src_buffer); goto error; } - print_cvp_buffer(VIDC_DBG, "alloc: src_buffer", + print_cvp_buffer(VIDC_HIGH, "alloc: src_buffer", inst, &cvp->src_buffer); cvp->ref_buffer.size = cvp->src_buffer.size; @@ -297,7 +297,7 @@ static int msm_cvp_init_downscale_buffers(struct msm_vidc_inst *inst) inst, &cvp->ref_buffer); goto error; } - print_cvp_buffer(VIDC_DBG, "alloc: ref_buffer", + print_cvp_buffer(VIDC_HIGH, "alloc: ref_buffer", inst, &cvp->ref_buffer); return rc; @@ -316,10 +316,10 @@ static void msm_cvp_deinit_context_buffers(struct msm_vidc_inst *inst) return; } cvp = inst->cvp; - dprintk(VIDC_DBG, "%s:\n", __func__); + dprintk(VIDC_HIGH, "%s:\n", __func__); if (cvp->context_buffer.dbuf) { - print_cvp_buffer(VIDC_DBG, "free: context_buffer", + print_cvp_buffer(VIDC_HIGH, "free: context_buffer", inst, &cvp->context_buffer); if (msm_cvp_free_buffer(inst, &cvp->context_buffer)) print_cvp_buffer(VIDC_ERR, @@ -327,7 +327,7 @@ static void msm_cvp_deinit_context_buffers(struct msm_vidc_inst *inst) inst, &cvp->context_buffer); } if (cvp->refcontext_buffer.dbuf) { - print_cvp_buffer(VIDC_DBG, "free: refcontext_buffer", + print_cvp_buffer(VIDC_HIGH, "free: refcontext_buffer", inst, &cvp->refcontext_buffer); if (msm_cvp_free_buffer(inst, &cvp->refcontext_buffer)) print_cvp_buffer(VIDC_ERR, @@ -346,7 +346,7 @@ static int msm_cvp_init_context_buffers(struct msm_vidc_inst *inst) return -EINVAL; } cvp = inst->cvp; - dprintk(VIDC_DBG, "%s:\n", __func__); + dprintk(VIDC_HIGH, "%s:\n", __func__); cvp->context_buffer.size = HFI_DME_FRAME_CONTEXT_BUFFER_SIZE; rc = msm_cvp_allocate_buffer(inst, &cvp->context_buffer, false); @@ -356,7 +356,7 @@ static int msm_cvp_init_context_buffers(struct msm_vidc_inst *inst) inst, &cvp->context_buffer); goto error; } - print_cvp_buffer(VIDC_DBG, "alloc: context_buffer", + print_cvp_buffer(VIDC_HIGH, "alloc: context_buffer", inst, &cvp->context_buffer); cvp->refcontext_buffer.size = cvp->context_buffer.size; @@ -367,7 +367,7 @@ static int msm_cvp_init_context_buffers(struct msm_vidc_inst *inst) inst, &cvp->refcontext_buffer); goto error; } - print_cvp_buffer(VIDC_DBG, "alloc: refcontext_buffer", + print_cvp_buffer(VIDC_HIGH, "alloc: refcontext_buffer", inst, &cvp->refcontext_buffer); return rc; @@ -390,10 +390,10 @@ static void msm_cvp_deinit_internal_buffers(struct msm_vidc_inst *inst) } cvp = inst->cvp; - dprintk(VIDC_DBG, "%s:\n", __func__); + dprintk(VIDC_HIGH, "%s:\n", __func__); if (cvp->output_buffer.dbuf) { - print_cvp_buffer(VIDC_DBG, "free: output_buffer", + print_cvp_buffer(VIDC_HIGH, "free: output_buffer", inst, &cvp->output_buffer); rc = msm_cvp_free_buffer(inst, &cvp->output_buffer); if (rc) @@ -403,7 +403,7 @@ static void msm_cvp_deinit_internal_buffers(struct msm_vidc_inst *inst) } if (cvp->persist2_buffer.dbuf) { - print_cvp_buffer(VIDC_DBG, "free: persist2_buffer", + print_cvp_buffer(VIDC_HIGH, "free: persist2_buffer", inst, &cvp->persist2_buffer); memset(&persist2_packet, 0, sizeof(struct msm_cvp_session_release_persist_buffers_packet)); @@ -455,7 +455,7 @@ static int msm_cvp_init_internal_buffers(struct msm_vidc_inst *inst) } cvp = inst->cvp; arg = cvp->arg; - dprintk(VIDC_DBG, "%s:\n", __func__); + dprintk(VIDC_HIGH, "%s:\n", __func__); cvp->persist2_buffer.size = HFI_DME_INTERNAL_PERSIST_2_BUFFER_SIZE; rc = msm_cvp_allocate_buffer(inst, &cvp->persist2_buffer, false); @@ -465,7 +465,7 @@ static int msm_cvp_init_internal_buffers(struct msm_vidc_inst *inst) inst, &cvp->persist2_buffer); goto error; } - print_cvp_buffer(VIDC_DBG, "alloc: persist2_buffer", + print_cvp_buffer(VIDC_HIGH, "alloc: persist2_buffer", inst, &cvp->persist2_buffer); /* set buffer */ @@ -505,7 +505,7 @@ static int msm_cvp_init_internal_buffers(struct msm_vidc_inst *inst) inst, &cvp->output_buffer); goto error; } - print_cvp_buffer(VIDC_DBG, "alloc: output_buffer", + print_cvp_buffer(VIDC_HIGH, "alloc: output_buffer", inst, &cvp->output_buffer); return rc; @@ -711,7 +711,7 @@ static int msm_cvp_frame_process(struct msm_vidc_inst *inst, skipframe = !(cvp->framecount % skip_framecount); } if (skipframe) { - print_cvp_buffer(VIDC_DBG, "input frame skipped", + print_cvp_buffer(VIDC_LOW, "input frame skipped", inst, &cvp->fullres_buffer); cvp->framecount++; cvp->metadata_available = false; @@ -754,7 +754,7 @@ static int msm_cvp_frame_process(struct msm_vidc_inst *inst, frame->refframe_contextbuffer.buffer_addr = cvp->refcontext_buffer.fd; frame->refframe_contextbuffer.size = cvp->refcontext_buffer.size; - print_cvp_buffer(VIDC_DBG, "input frame", inst, &cvp->fullres_buffer); + print_cvp_buffer(VIDC_LOW, "input frame", inst, &cvp->fullres_buffer); rc = msm_cvp_private(cvp->priv, CVP_KMD_SEND_CMD_PKT, arg); if (rc) { print_cvp_buffer(VIDC_ERR, "send failed: input frame", @@ -825,7 +825,7 @@ static int msm_vidc_cvp_deinit(struct msm_vidc_inst *inst) } cvp = inst->cvp; - dprintk(VIDC_DBG, "%s: cvp session %#x\n", __func__, cvp->session_id); + dprintk(VIDC_HIGH, "%s: cvp session %#x\n", __func__, cvp->session_id); msm_cvp_deinit_internal_buffers(inst); msm_cvp_deinit_context_buffers(inst); msm_cvp_deinit_downscale_buffers(inst); @@ -844,7 +844,7 @@ static int msm_vidc_cvp_close(struct msm_vidc_inst *inst) } cvp = inst->cvp; - dprintk(VIDC_DBG, "%s: cvp session %#x\n", __func__, cvp->session_id); + dprintk(VIDC_HIGH, "%s: cvp session %#x\n", __func__, cvp->session_id); rc = msm_cvp_close(cvp->priv); if (rc) dprintk(VIDC_ERR, @@ -866,7 +866,7 @@ int msm_vidc_cvp_unprepare_preprocess(struct msm_vidc_inst *inst) return -EINVAL; } if (!inst->cvp) { - dprintk(VIDC_DBG, "%s: cvp not enabled or closed\n", __func__); + dprintk(VIDC_HIGH, "%s: cvp not enabled or closed\n", __func__); return 0; } @@ -904,7 +904,7 @@ static int msm_vidc_cvp_init(struct msm_vidc_inst *inst) if (rc) goto error; - dprintk(VIDC_DBG, + dprintk(VIDC_HIGH, "%s: pixelformat %#x, wxh %dx%d downscale %d ds_wxh %dx%d\n", __func__, f->fmt.pix_mp.pixelformat, cvp->width, cvp->height, cvp->downscale, @@ -985,7 +985,7 @@ static int msm_vidc_cvp_open(struct msm_vidc_inst *inst) } arg = cvp->arg; - dprintk(VIDC_DBG, "%s: opening cvp\n", __func__); + dprintk(VIDC_HIGH, "%s: opening cvp\n", __func__); cvp->priv = msm_cvp_open(0, MSM_VIDC_CVP); if (!cvp->priv) { dprintk(VIDC_ERR, "%s: failed to open cvp session\n", __func__); @@ -1001,7 +1001,7 @@ static int msm_vidc_cvp_open(struct msm_vidc_inst *inst) goto error; } cvp->session_id = arg->data.session.session_id; - dprintk(VIDC_DBG, "%s: cvp session id %#x\n", + dprintk(VIDC_HIGH, "%s: cvp session id %#x\n", __func__, cvp->session_id); return 0; diff --git a/msm/vidc/msm_cvp_internal.c b/msm/vidc/msm_cvp_internal.c index 60eda88e254e..e5ae10750404 100644 --- a/msm/vidc/msm_cvp_internal.c +++ b/msm/vidc/msm_cvp_internal.c @@ -94,7 +94,7 @@ void handle_session_register_buffer_done(enum hal_command_response cmd, __func__, response->data.regbuf.client_data); goto exit; } - print_cvp_buffer(VIDC_DBG, "register_done", inst, cbuf); + print_cvp_buffer(VIDC_HIGH, "register_done", inst, cbuf); event.type = V4L2_EVENT_MSM_VIDC_REGISTER_BUFFER_DONE; data = (u32 *)event.u.data; @@ -146,7 +146,7 @@ void handle_session_unregister_buffer_done(enum hal_command_response cmd, __func__, response->data.unregbuf.client_data); goto exit; } - print_cvp_buffer(VIDC_DBG, "unregister_done", inst, cbuf); + print_cvp_buffer(VIDC_HIGH, "unregister_done", inst, cbuf); rc = inst->smem_ops->smem_unmap_dma_buf(inst, &cbuf->smem); if (rc) { @@ -262,7 +262,7 @@ static int msm_cvp_get_session_info(struct msm_vidc_inst *inst, } session->session_id = hash32_ptr(inst->session); - dprintk(VIDC_DBG, "%s: id 0x%x\n", __func__, session->session_id); + dprintk(VIDC_HIGH, "%s: id 0x%x\n", __func__, session->session_id); return rc; } @@ -277,7 +277,7 @@ static int msm_cvp_request_power(struct msm_vidc_inst *inst, return -EINVAL; } - dprintk(VIDC_DBG, + dprintk(VIDC_HIGH, "%s: clock_cycles_a %d, clock_cycles_b %d, ddr_bw %d sys_cache_bw %d\n", __func__, power->clock_cycles_a, power->clock_cycles_b, power->ddr_bw, power->sys_cache_bw); @@ -344,7 +344,7 @@ static int msm_cvp_register_buffer(struct msm_vidc_inst *inst, return -EINVAL; } hdev = inst->core->device; - print_client_buffer(VIDC_DBG, "register", inst, buf); + print_client_buffer(VIDC_HIGH, "register", inst, buf); mutex_lock(&inst->cvpbufs.lock); found = false; @@ -423,7 +423,7 @@ static int msm_cvp_unregister_buffer(struct msm_vidc_inst *inst, return -EINVAL; } hdev = inst->core->device; - print_client_buffer(VIDC_DBG, "unregister", inst, buf); + print_client_buffer(VIDC_HIGH, "unregister", inst, buf); mutex_lock(&inst->cvpbufs.lock); found = false; @@ -576,7 +576,7 @@ int msm_cvp_inst_deinit(struct msm_vidc_inst *inst) dprintk(VIDC_ERR, "%s: invalid params\n", __func__); return -EINVAL; } - dprintk(VIDC_DBG, "%s: inst %pK (%#x)\n", __func__, + dprintk(VIDC_HIGH, "%s: inst %pK (%#x)\n", __func__, inst, hash32_ptr(inst->session)); rc = msm_comm_try_state(inst, MSM_VIDC_CLOSE_DONE); @@ -614,7 +614,7 @@ int msm_cvp_inst_init(struct msm_vidc_inst *inst) return -EINVAL; } - dprintk(VIDC_DBG, "%s: inst %pK (%#x)\n", __func__, + dprintk(VIDC_HIGH, "%s: inst %pK (%#x)\n", __func__, inst, hash32_ptr(inst->session)); /* set default frequency */ diff --git a/msm/vidc/msm_smem.c b/msm/vidc/msm_smem.c index f9336347f99d..6a748bf09647 100644 --- a/msm/vidc/msm_smem.c +++ b/msm/vidc/msm_smem.c @@ -111,7 +111,7 @@ static int msm_dma_get_device_address(struct dma_buf *dbuf, unsigned long align, trace_msm_smem_buffer_iommu_op_end("MAP", 0, 0, align, *iova, *buffer_size); } else { - dprintk(VIDC_DBG, "iommu not present, use phys mem addr\n"); + dprintk(VIDC_HIGH, "iommu not present, use phys mem addr\n"); } return 0; @@ -132,14 +132,14 @@ static int msm_dma_put_device_address(u32 flags, int rc = 0; if (!mapping_info) { - dprintk(VIDC_WARN, "Invalid mapping_info\n"); + dprintk(VIDC_ERR, "Invalid mapping_info\n"); return -EINVAL; } if (!mapping_info->dev || !mapping_info->table || !mapping_info->buf || !mapping_info->attach || !mapping_info->cb_info) { - dprintk(VIDC_WARN, "Invalid params\n"); + dprintk(VIDC_ERR, "Invalid params\n"); return -EINVAL; } @@ -263,7 +263,7 @@ int msm_smem_unmap_dma_buf(struct msm_vidc_inst *inst, struct msm_smem *smem) if (smem->refcount) { smem->refcount--; } else { - dprintk(VIDC_WARN, + dprintk(VIDC_ERR, "unmap called while refcount is zero already\n"); return -EINVAL; } @@ -344,13 +344,13 @@ static int alloc_dma_mem(size_t size, u32 align, u32 flags, if (is_iommu_present(res)) { if (flags & SMEM_ADSP) { - dprintk(VIDC_DBG, "Allocating from ADSP heap\n"); + dprintk(VIDC_HIGH, "Allocating from ADSP heap\n"); heap_mask = ION_HEAP(ION_ADSP_HEAP_ID); } else { heap_mask = ION_HEAP(ION_SYSTEM_HEAP_ID); } } else { - dprintk(VIDC_DBG, + dprintk(VIDC_HIGH, "allocate shared memory from adsp heap size %zx align %d\n", size, align); heap_mask = ION_HEAP(ION_ADSP_HEAP_ID); @@ -427,7 +427,7 @@ static int alloc_dma_mem(size_t size, u32 align, u32 flags, } } - dprintk(VIDC_DBG, + dprintk(VIDC_HIGH, "%s: dma_buf = %pK, device_addr = %x, size = %d, kvaddr = %pK, buffer_type = %#x, flags = %#lx\n", __func__, mem->dma_buf, mem->device_addr, mem->size, mem->kvaddr, mem->buffer_type, mem->flags); @@ -444,7 +444,7 @@ fail_shared_mem_alloc: static int free_dma_mem(struct msm_smem *mem) { - dprintk(VIDC_DBG, + dprintk(VIDC_HIGH, "%s: dma_buf = %pK, device_addr = %x, size = %d, kvaddr = %pK, buffer_type = %#x\n", __func__, mem->dma_buf, mem->device_addr, mem->size, mem->kvaddr, mem->buffer_type); diff --git a/msm/vidc/msm_v4l2_vidc.c b/msm/vidc/msm_v4l2_vidc.c index 24aaf7c2476f..fd64cee4d061 100644 --- a/msm/vidc/msm_v4l2_vidc.c +++ b/msm/vidc/msm_v4l2_vidc.c @@ -391,11 +391,11 @@ static ssize_t thermal_level_store(struct device *dev, rc = kstrtoint(buf, 0, &val); if (rc || val < 0) { - dprintk(VIDC_WARN, + dprintk(VIDC_ERR, "Invalid thermal level value: %s\n", buf); return -EINVAL; } - dprintk(VIDC_DBG, "Thermal level old %d new %d\n", + dprintk(VIDC_HIGH, "Thermal level old %d new %d\n", vidc_driver->thermal_level, val); if (val == vidc_driver->thermal_level) @@ -551,7 +551,7 @@ static int msm_vidc_probe_vidc_device(struct platform_device *pdev) if (rc != -EPROBE_DEFER) dprintk(VIDC_ERR, "Failed to create HFI device\n"); else - dprintk(VIDC_DBG, "msm_vidc: request probe defer\n"); + dprintk(VIDC_HIGH, "msm_vidc: request probe defer\n"); goto err_cores_exceeded; } @@ -564,7 +564,7 @@ static int msm_vidc_probe_vidc_device(struct platform_device *pdev) vidc_driver->sku_version = core->resources.sku_version; - dprintk(VIDC_DBG, "populating sub devices\n"); + dprintk(VIDC_HIGH, "populating sub devices\n"); /* * Trigger probe for each sub-device i.e. qcom,msm-vidc,context-bank. * When msm_vidc_probe is called for each sub-device, parse the @@ -709,7 +709,7 @@ static int msm_vidc_pm_suspend(struct device *dev) if (rc == -ENOTSUPP) rc = 0; else if (rc) - dprintk(VIDC_WARN, "Failed to suspend: %d\n", rc); + dprintk(VIDC_ERR, "Failed to suspend: %d\n", rc); return rc; @@ -717,7 +717,7 @@ static int msm_vidc_pm_suspend(struct device *dev) static int msm_vidc_pm_resume(struct device *dev) { - dprintk(VIDC_INFO, "%s\n", __func__); + dprintk(VIDC_HIGH, "%s\n", __func__); return 0; } diff --git a/msm/vidc/msm_vdec.c b/msm/vidc/msm_vdec.c index d95626e3ba64..19b741c3f659 100644 --- a/msm/vidc/msm_vdec.c +++ b/msm/vidc/msm_vdec.c @@ -711,7 +711,7 @@ int msm_vdec_enum_fmt(struct msm_vidc_inst *inst, struct v4l2_fmtdesc *f) sizeof(f->description)); f->pixelformat = fmt_desc->fourcc; } else { - dprintk(VIDC_DBG, "No more formats found\n"); + dprintk(VIDC_HIGH, "No more formats found\n"); rc = -EINVAL; } return rc; @@ -789,7 +789,7 @@ int msm_vdec_inst_init(struct msm_vidc_inst *inst) is_decode_session(temp) && !is_thumbnail_session(temp)) { inst->decode_batching = false; - dprintk(VIDC_DBG, + dprintk(VIDC_HIGH, "Disable decode-batching in multi sessions\n"); break; } @@ -833,7 +833,7 @@ int msm_vdec_s_ctrl(struct msm_vidc_inst *inst, struct v4l2_ctrl *ctrl) return -EINVAL; } - dprintk(VIDC_DBG, + dprintk(VIDC_HIGH, "%s: %x : control name = %s, id = 0x%x value = %d\n", __func__, hash32_ptr(inst->session), ctrl->name, ctrl->id, ctrl->val); @@ -937,7 +937,7 @@ int msm_vdec_set_frame_size(struct msm_vidc_inst *inst) frame_size.buffer_type = HFI_BUFFER_INPUT; frame_size.width = f->fmt.pix_mp.width; frame_size.height = f->fmt.pix_mp.height; - dprintk(VIDC_DBG, "%s: input wxh %dx%d\n", __func__, + dprintk(VIDC_HIGH, "%s: input wxh %dx%d\n", __func__, frame_size.width, frame_size.height); rc = call_hfi_op(hdev, session_set_property, inst->session, HFI_PROPERTY_PARAM_FRAME_SIZE, &frame_size, sizeof(frame_size)); @@ -1075,7 +1075,7 @@ int msm_vdec_set_profile_level(struct msm_vidc_inst *inst) profile_level.profile = inst->profile; profile_level.level = inst->level; - dprintk(VIDC_DBG, "%s: %#x %#x\n", __func__, + dprintk(VIDC_HIGH, "%s: %#x %#x\n", __func__, profile_level.profile, profile_level.level); rc = call_hfi_op(hdev, session_set_property, inst->session, HFI_PROPERTY_PARAM_PROFILE_LEVEL_CURRENT, &profile_level, @@ -1100,7 +1100,7 @@ int msm_vdec_set_output_order(struct msm_vidc_inst *inst) hdev = inst->core->device; ctrl = get_ctrl(inst, V4L2_CID_MPEG_VIDC_VIDEO_DECODE_ORDER); - dprintk(VIDC_DBG, "%s: %d\n", __func__, ctrl->val); + dprintk(VIDC_HIGH, "%s: %d\n", __func__, ctrl->val); if (ctrl->val == V4L2_MPEG_MSM_VIDC_ENABLE) output_order = HFI_OUTPUT_ORDER_DECODE; else @@ -1131,7 +1131,7 @@ int msm_vdec_set_sync_frame_mode(struct msm_vidc_inst *inst) ctrl = get_ctrl(inst, V4L2_CID_MPEG_VIDC_VIDEO_SYNC_FRAME_DECODE); hfi_property.enable = (bool)ctrl->val; - dprintk(VIDC_DBG, "%s: %#x\n", __func__, hfi_property.enable); + dprintk(VIDC_HIGH, "%s: %#x\n", __func__, hfi_property.enable); rc = call_hfi_op(hdev, session_set_property, inst->session, HFI_PROPERTY_PARAM_VDEC_THUMBNAIL_MODE, &hfi_property, sizeof(hfi_property)); @@ -1169,7 +1169,7 @@ int msm_vdec_set_secure_mode(struct msm_vidc_inst *inst) } } - dprintk(VIDC_DBG, "%s: %#x\n", __func__, ctrl->val); + dprintk(VIDC_HIGH, "%s: %#x\n", __func__, ctrl->val); rc = call_hfi_op(hdev, session_set_property, inst->session, HFI_PROPERTY_PARAM_SECURE_SESSION, &ctrl->val, sizeof(u32)); if (rc) @@ -1247,7 +1247,7 @@ int msm_vdec_set_output_stream_mode(struct msm_vidc_inst *inst) f = &inst->fmts[OUTPUT_PORT].v4l2_fmt; frame_sz.width = f->fmt.pix_mp.width; frame_sz.height = f->fmt.pix_mp.height; - dprintk(VIDC_DBG, + dprintk(VIDC_HIGH, "frame_size: hal buffer type %d, width %d, height %d\n", frame_sz.buffer_type, frame_sz.width, frame_sz.height); rc = call_hfi_op(hdev, session_set_property, inst->session, @@ -1280,7 +1280,7 @@ int msm_vdec_set_priority(struct msm_vidc_inst *inst) ctrl = get_ctrl(inst, V4L2_CID_MPEG_VIDC_VIDEO_PRIORITY); hfi_property.enable = (bool)ctrl->val; - dprintk(VIDC_DBG, "%s: %#x\n", __func__, hfi_property.enable); + dprintk(VIDC_HIGH, "%s: %#x\n", __func__, hfi_property.enable); rc = call_hfi_op(hdev, session_set_property, inst->session, HFI_PROPERTY_CONFIG_REALTIME, &hfi_property, sizeof(hfi_property)); @@ -1309,7 +1309,7 @@ int msm_vdec_set_operating_rate(struct msm_vidc_inst *inst) ctrl = get_ctrl(inst, V4L2_CID_MPEG_VIDC_VIDEO_OPERATING_RATE); operating_rate.operating_rate = ctrl->val; - dprintk(VIDC_DBG, "%s: %#x\n", __func__, + dprintk(VIDC_HIGH, "%s: %#x\n", __func__, operating_rate.operating_rate); rc = call_hfi_op(hdev, session_set_property, inst->session, HFI_PROPERTY_CONFIG_OPERATING_RATE, &operating_rate, @@ -1339,7 +1339,7 @@ int msm_vdec_set_conceal_color(struct msm_vidc_inst *inst) conceal_color.conceal_color_8bit = ctrl_8b->val; conceal_color.conceal_color_10bit = ctrl_10b->val; - dprintk(VIDC_DBG, "%s: %#x %#x\n", __func__, + dprintk(VIDC_HIGH, "%s: %#x %#x\n", __func__, conceal_color.conceal_color_8bit, conceal_color.conceal_color_10bit); rc = call_hfi_op(hdev, session_set_property, inst->session, @@ -1474,7 +1474,7 @@ exit: if (rc) dprintk(VIDC_ERR, "%s: failed with %d\n", __func__, rc); else - dprintk(VIDC_DBG, "%s: set properties successful\n", __func__); + dprintk(VIDC_HIGH, "%s: set properties successful\n", __func__); return rc; } diff --git a/msm/vidc/msm_venc.c b/msm/vidc/msm_venc.c index 595b714c784f..93fac1508e73 100644 --- a/msm/vidc/msm_venc.c +++ b/msm/vidc/msm_venc.c @@ -1154,7 +1154,7 @@ int msm_venc_enum_fmt(struct msm_vidc_inst *inst, struct v4l2_fmtdesc *f) sizeof(f->description)); f->pixelformat = fmt_desc->fourcc; } else { - dprintk(VIDC_DBG, "No more formats found\n"); + dprintk(VIDC_HIGH, "No more formats found\n"); rc = -EINVAL; } return rc; @@ -1370,7 +1370,7 @@ static int msm_venc_resolve_rc_enable(struct msm_vidc_inst *inst, u32 codec; if (!ctrl->val) { - dprintk(VIDC_DBG, + dprintk(VIDC_HIGH, "RC is not enabled. Setting RC OFF\n"); inst->rc_type = RATE_CONTROL_OFF; } else { @@ -1382,7 +1382,7 @@ static int msm_venc_resolve_rc_enable(struct msm_vidc_inst *inst, if (msm_vidc_lossless_encode && (codec == V4L2_PIX_FMT_HEVC || codec == V4L2_PIX_FMT_H264)) { - dprintk(VIDC_DBG, + dprintk(VIDC_HIGH, "Reset RC mode to RC_LOSSLESS for HEVC lossless encoding\n"); inst->rc_type = RATE_CONTROL_LOSSLESS; } @@ -1393,7 +1393,7 @@ static int msm_venc_resolve_rate_control(struct msm_vidc_inst *inst, struct v4l2_ctrl *ctrl) { if (inst->rc_type == RATE_CONTROL_LOSSLESS) { - dprintk(VIDC_DBG, + dprintk(VIDC_HIGH, "Skip RC mode when enabling lossless encoding\n"); return 0; } @@ -1431,7 +1431,7 @@ int msm_venc_s_ctrl(struct msm_vidc_inst *inst, struct v4l2_ctrl *ctrl) cll_sei = &(inst->hdr10_sei_params.cll_sei); codec = get_v4l2_codec(inst); - dprintk(VIDC_DBG, + dprintk(VIDC_HIGH, "%s: %x : name %s, id 0x%x value %d\n", __func__, hash32_ptr(inst->session), ctrl->name, ctrl->id, ctrl->val); @@ -1537,7 +1537,7 @@ int msm_venc_s_ctrl(struct msm_vidc_inst *inst, struct v4l2_ctrl *ctrl) u32 info_type = ((u32)ctrl->val >> 28) & 0xF; u32 val = (ctrl->val & 0xFFFFFFF); - dprintk(VIDC_DBG, "Ctrl:%d, HDR Info with value %u (%#X)", + dprintk(VIDC_HIGH, "Ctrl:%d, HDR Info with value %u (%#X)", info_type, val, ctrl->val); switch (info_type) { case MSM_VIDC_RGB_PRIMARY_00: @@ -1767,7 +1767,7 @@ int msm_venc_s_ctrl(struct msm_vidc_inst *inst, struct v4l2_ctrl *ctrl) case V4L2_CID_MPEG_VIDC_VENC_NATIVE_RECORDER: case V4L2_CID_MPEG_VIDC_VENC_RC_TIMESTAMP_DISABLE: case V4L2_CID_MPEG_VIDEO_VBV_DELAY: - dprintk(VIDC_DBG, "Control set: ID : %x Val : %d\n", + dprintk(VIDC_HIGH, "Control set: ID : %x Val : %d\n", ctrl->id, ctrl->val); break; default: @@ -1796,7 +1796,7 @@ int msm_venc_set_frame_size(struct msm_vidc_inst *inst) frame_sz.buffer_type = HFI_BUFFER_INPUT; frame_sz.width = f->fmt.pix_mp.width; frame_sz.height = f->fmt.pix_mp.height; - dprintk(VIDC_DBG, "%s: input %d %d\n", __func__, + dprintk(VIDC_HIGH, "%s: input %d %d\n", __func__, frame_sz.width, frame_sz.height); rc = call_hfi_op(hdev, session_set_property, inst->session, HFI_PROPERTY_PARAM_FRAME_SIZE, &frame_sz, sizeof(frame_sz)); @@ -1810,7 +1810,7 @@ int msm_venc_set_frame_size(struct msm_vidc_inst *inst) frame_sz.buffer_type = HFI_BUFFER_OUTPUT; frame_sz.width = f->fmt.pix_mp.width; frame_sz.height = f->fmt.pix_mp.height; - dprintk(VIDC_DBG, "%s: output %d %d\n", __func__, + dprintk(VIDC_HIGH, "%s: output %d %d\n", __func__, frame_sz.width, frame_sz.height); rc = call_hfi_op(hdev, session_set_property, inst->session, HFI_PROPERTY_PARAM_FRAME_SIZE, &frame_sz, sizeof(frame_sz)); @@ -1839,7 +1839,7 @@ int msm_venc_set_frame_rate(struct msm_vidc_inst *inst) frame_rate.buffer_type = HFI_BUFFER_OUTPUT; frame_rate.frame_rate = inst->clk_data.frame_rate; - dprintk(VIDC_DBG, "%s: %#x\n", __func__, frame_rate.frame_rate); + dprintk(VIDC_HIGH, "%s: %#x\n", __func__, frame_rate.frame_rate); rc = call_hfi_op(hdev, session_set_property, inst->session, HFI_PROPERTY_CONFIG_FRAME_RATE, @@ -1946,7 +1946,7 @@ int msm_venc_set_secure_mode(struct msm_vidc_inst *inst) } } - dprintk(VIDC_DBG, "%s: %d\n", __func__, enable.enable); + dprintk(VIDC_HIGH, "%s: %d\n", __func__, enable.enable); rc = call_hfi_op(hdev, session_set_property, inst->session, HFI_PROPERTY_PARAM_SECURE_SESSION, &enable, sizeof(enable)); if (rc) @@ -1971,7 +1971,7 @@ int msm_venc_set_priority(struct msm_vidc_inst *inst) ctrl = get_ctrl(inst, V4L2_CID_MPEG_VIDC_VIDEO_PRIORITY); enable.enable = !!ctrl->val; - dprintk(VIDC_DBG, "%s: %d\n", __func__, enable.enable); + dprintk(VIDC_HIGH, "%s: %d\n", __func__, enable.enable); rc = call_hfi_op(hdev, session_set_property, inst->session, HFI_PROPERTY_CONFIG_REALTIME, &enable, sizeof(enable)); if (rc) @@ -1996,7 +1996,7 @@ int msm_venc_set_operating_rate(struct msm_vidc_inst *inst) ctrl = get_ctrl(inst, V4L2_CID_MPEG_VIDC_VIDEO_OPERATING_RATE); op_rate.operating_rate = ctrl->val; - dprintk(VIDC_DBG, "%s: %d\n", __func__, op_rate.operating_rate >> 16); + dprintk(VIDC_HIGH, "%s: %d\n", __func__, op_rate.operating_rate >> 16); rc = call_hfi_op(hdev, session_set_property, inst->session, HFI_PROPERTY_CONFIG_OPERATING_RATE, &op_rate, sizeof(op_rate)); if (rc) { @@ -2028,7 +2028,7 @@ int msm_venc_set_profile_level(struct msm_vidc_inst *inst) profile_level.profile = inst->profile; profile_level.level = inst->level; - dprintk(VIDC_DBG, "%s: %#x %#x\n", __func__, + dprintk(VIDC_HIGH, "%s: %#x %#x\n", __func__, profile_level.profile, profile_level.level); rc = call_hfi_op(hdev, session_set_property, inst->session, HFI_PROPERTY_PARAM_PROFILE_LEVEL_CURRENT, &profile_level, @@ -2058,7 +2058,7 @@ int msm_venc_set_idr_period(struct msm_vidc_inst *inst) idr_period.idr_period = 1; - dprintk(VIDC_DBG, "%s: %d\n", __func__, idr_period.idr_period); + dprintk(VIDC_HIGH, "%s: %d\n", __func__, idr_period.idr_period); rc = call_hfi_op(hdev, session_set_property, inst->session, HFI_PROPERTY_CONFIG_VENC_IDR_PERIOD, &idr_period, sizeof(idr_period)); @@ -2126,7 +2126,7 @@ void msm_venc_decide_bframe(struct msm_vidc_inst *inst) */ inst->prop.bframe_changed = true; bframe_ctrl->val = MAX_NUM_B_FRAMES; - dprintk(VIDC_DBG, "Bframe is forcefully enabled\n"); + dprintk(VIDC_HIGH, "Bframe is forcefully enabled\n"); } else { /* * Native recorder is not enabled @@ -2135,7 +2135,7 @@ void msm_venc_decide_bframe(struct msm_vidc_inst *inst) goto disable_bframe; } } - dprintk(VIDC_DBG, "Bframe can be enabled!\n"); + dprintk(VIDC_HIGH, "Bframe can be enabled!\n"); return; disable_bframe: @@ -2147,9 +2147,9 @@ disable_bframe: */ inst->prop.bframe_changed = true; bframe_ctrl->val = 0; - dprintk(VIDC_DBG, "Bframe is forcefully disabled!\n"); + dprintk(VIDC_HIGH, "Bframe is forcefully disabled!\n"); } else { - dprintk(VIDC_DBG, "Bframe is disabled\n"); + dprintk(VIDC_HIGH, "Bframe is disabled\n"); } } @@ -2167,7 +2167,7 @@ int msm_venc_set_adaptive_bframes(struct msm_vidc_inst *inst) enable.enable = true; - dprintk(VIDC_DBG, "%s: %d\n", __func__, enable.enable); + dprintk(VIDC_HIGH, "%s: %d\n", __func__, enable.enable); rc = call_hfi_op(hdev, session_set_property, inst->session, HFI_PROPERTY_PARAM_VENC_ADAPTIVE_B, &enable, sizeof(enable)); if (rc) @@ -2243,7 +2243,7 @@ int msm_venc_set_intra_period(struct msm_vidc_inst *inst) ctrl = get_ctrl(inst, V4L2_CID_MPEG_VIDEO_B_FRAMES); intra_period.bframes = ctrl->val; - dprintk(VIDC_DBG, "%s: %d %d\n", __func__, intra_period.pframes, + dprintk(VIDC_HIGH, "%s: %d %d\n", __func__, intra_period.pframes, intra_period.bframes); rc = call_hfi_op(hdev, session_set_property, inst->session, HFI_PROPERTY_CONFIG_VENC_INTRA_PERIOD, &intra_period, @@ -2276,7 +2276,7 @@ int msm_venc_set_request_keyframe(struct msm_vidc_inst *inst) } hdev = inst->core->device; - dprintk(VIDC_DBG, "%s\n", __func__); + dprintk(VIDC_HIGH, "%s\n", __func__); rc = call_hfi_op(hdev, session_set_property, inst->session, HFI_PROPERTY_CONFIG_VENC_REQUEST_SYNC_FRAME, NULL, 0); if (rc) { @@ -2344,7 +2344,7 @@ int msm_venc_set_rate_control(struct msm_vidc_inst *inst) inst->rc_type); break; } - dprintk(VIDC_DBG, "%s: %d\n", __func__, inst->rc_type); + dprintk(VIDC_HIGH, "%s: %d\n", __func__, inst->rc_type); rc = call_hfi_op(hdev, session_set_property, inst->session, HFI_PROPERTY_PARAM_VENC_RATE_CONTROL, &hfi_rc, sizeof(u32)); @@ -2419,7 +2419,7 @@ int msm_venc_set_vbv_delay(struct msm_vidc_inst *inst) } set_vbv_delay: - dprintk(VIDC_DBG, "Set hrd_buf_size %d", + dprintk(VIDC_HIGH, "Set hrd_buf_size %d", hrd_buf_size.vbv_hrd_buf_size); rc = call_hfi_op(hdev, session_set_property, (void *)inst->session, @@ -2456,7 +2456,7 @@ int msm_venc_set_input_timestamp_rc(struct msm_vidc_inst *inst) */ enable.enable = !!ctrl->val; - dprintk(VIDC_DBG, "%s: %d\n", __func__, enable.enable); + dprintk(VIDC_HIGH, "%s: %d\n", __func__, enable.enable); rc = call_hfi_op(hdev, session_set_property, inst->session, HFI_PROPERTY_PARAM_VENC_DISABLE_RC_TIMESTAMP, &enable, sizeof(enable)); @@ -2481,12 +2481,12 @@ int msm_venc_set_bitrate(struct msm_vidc_inst *inst) hdev = inst->core->device; if (inst->layer_bitrate) { - dprintk(VIDC_DBG, "%s: Layer bitrate is enabled\n", __func__); + dprintk(VIDC_HIGH, "%s: Layer bitrate is enabled\n", __func__); return 0; } enable.enable = 0; - dprintk(VIDC_DBG, "%s: bitrate type: %d\n", + dprintk(VIDC_HIGH, "%s: bitrate type: %d\n", __func__, enable.enable); rc = call_hfi_op(hdev, session_set_property, inst->session, HFI_PROPERTY_PARAM_VENC_BITRATE_TYPE, &enable, @@ -2499,7 +2499,7 @@ int msm_venc_set_bitrate(struct msm_vidc_inst *inst) ctrl = get_ctrl(inst, V4L2_CID_MPEG_VIDEO_BITRATE); bitrate.bit_rate = ctrl->val; bitrate.layer_id = MSM_VIDC_ALL_LAYER_ID; - dprintk(VIDC_DBG, "%s: %d\n", __func__, bitrate.bit_rate); + dprintk(VIDC_HIGH, "%s: %d\n", __func__, bitrate.bit_rate); rc = call_hfi_op(hdev, session_set_property, inst->session, HFI_PROPERTY_CONFIG_VENC_TARGET_BITRATE, &bitrate, sizeof(bitrate)); @@ -2532,14 +2532,14 @@ int msm_venc_set_layer_bitrate(struct msm_vidc_inst *inst) V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_LAYER); if (!max_layer->val || !layer->val) { - dprintk(VIDC_DBG, + dprintk(VIDC_HIGH, "%s: Hierp layer not set. Ignore layer bitrate\n", __func__); goto error; } if (max_layer->val < layer->val) { - dprintk(VIDC_DBG, + dprintk(VIDC_HIGH, "%s: Hierp layer greater than max isn't allowed\n", __func__); goto error; @@ -2561,7 +2561,7 @@ int msm_venc_set_layer_bitrate(struct msm_vidc_inst *inst) /* Set layer bitrates only when highest layer br ratio is 100. */ if (layer_br_ratios[layer->val-1]->val != MAX_BIT_RATE_RATIO || layer_br_ratios[0]->val == 0) { - dprintk(VIDC_DBG, + dprintk(VIDC_HIGH, "%s: Improper layer bitrate ratio\n", __func__); goto error; @@ -2569,7 +2569,7 @@ int msm_venc_set_layer_bitrate(struct msm_vidc_inst *inst) for (i = layer->val - 1; i > 0; --i) { if (layer_br_ratios[i]->val == 0) { - dprintk(VIDC_DBG, + dprintk(VIDC_HIGH, "%s: Layer ratio must be non-zero\n", __func__); goto error; @@ -2578,7 +2578,7 @@ int msm_venc_set_layer_bitrate(struct msm_vidc_inst *inst) } enable.enable = 1; - dprintk(VIDC_DBG, "%s: %d\n", __func__, enable.enable); + dprintk(VIDC_HIGH, "%s: %d\n", __func__, enable.enable); rc = call_hfi_op(hdev, session_set_property, inst->session, HFI_PROPERTY_PARAM_VENC_BITRATE_TYPE, &enable, sizeof(enable)); @@ -2592,7 +2592,7 @@ int msm_venc_set_layer_bitrate(struct msm_vidc_inst *inst) layer_br.bit_rate = bitrate->val * layer_br_ratios[i]->val / 100; layer_br.layer_id = i; - dprintk(VIDC_DBG, + dprintk(VIDC_HIGH, "%s: Bitrate for Layer[%u]: [%u]\n", __func__, layer_br.layer_id, layer_br.bit_rate); @@ -2657,7 +2657,7 @@ int msm_venc_set_frame_qp(struct msm_vidc_inst *inst) return 0; } else { if (!(inst->client_set_ctrls & CLIENT_SET_I_QP)) { - dprintk(VIDC_WARN, + dprintk(VIDC_ERR, "%s: Client value is not valid\n", __func__); return -EINVAL; } @@ -2673,7 +2673,7 @@ int msm_venc_set_frame_qp(struct msm_vidc_inst *inst) qp.qp_packed = i_qp->val | p_qp->val << 8 | b_qp->val << 16; - dprintk(VIDC_DBG, "%s: layers %#x frames %#x qp_packed %#x\n", + dprintk(VIDC_HIGH, "%s: layers %#x frames %#x qp_packed %#x\n", __func__, qp.layer_id, qp.enable, qp.qp_packed); rc = call_hfi_op(hdev, session_set_property, inst->session, HFI_PROPERTY_CONFIG_VENC_FRAME_QP, &qp, sizeof(qp)); @@ -2698,7 +2698,7 @@ int msm_venc_set_qp_range(struct msm_vidc_inst *inst) if (!(inst->client_set_ctrls & CLIENT_SET_MIN_QP) && !(inst->client_set_ctrls & CLIENT_SET_MAX_QP)) { - dprintk(VIDC_DBG, + dprintk(VIDC_HIGH, "%s: Client didn't set QP range.\n", __func__); return 0; } @@ -2712,7 +2712,7 @@ int msm_venc_set_qp_range(struct msm_vidc_inst *inst) ctrl = get_ctrl(inst, V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP); qp_range.max_qp.qp_packed = ctrl->val; - dprintk(VIDC_DBG, + dprintk(VIDC_HIGH, "%s: layers %#x qp_min %#x qp_max %#x\n", __func__, qp_range.min_qp.layer_id, qp_range.min_qp.qp_packed, qp_range.max_qp.qp_packed); @@ -2744,7 +2744,7 @@ int msm_venc_set_frame_quality(struct msm_vidc_inst *inst) ctrl = get_ctrl(inst, V4L2_CID_MPEG_VIDC_COMPRESSION_QUALITY); frame_quality.frame_quality = ctrl->val; - dprintk(VIDC_DBG, "%s: %d\n", __func__, frame_quality.frame_quality); + dprintk(VIDC_HIGH, "%s: %d\n", __func__, frame_quality.frame_quality); rc = call_hfi_op(hdev, session_set_property, inst->session, HFI_PROPERTY_CONFIG_HEIC_FRAME_QUALITY, &frame_quality, sizeof(frame_quality)); @@ -2778,7 +2778,7 @@ int msm_venc_set_grid(struct msm_vidc_inst *inst) else grid_enable.grid_enable = true; - dprintk(VIDC_DBG, "%s: %d\n", __func__, grid_enable.grid_enable); + dprintk(VIDC_HIGH, "%s: %d\n", __func__, grid_enable.grid_enable); rc = call_hfi_op(hdev, session_set_property, inst->session, HFI_PROPERTY_CONFIG_HEIC_GRID_ENABLE, &grid_enable, sizeof(grid_enable)); @@ -2810,7 +2810,7 @@ int msm_venc_set_entropy_mode(struct msm_vidc_inst *inst) ctrl->val); entropy.cabac_model = HFI_H264_CABAC_MODEL_2; - dprintk(VIDC_DBG, "%s: %d\n", __func__, entropy.entropy_mode); + dprintk(VIDC_HIGH, "%s: %d\n", __func__, entropy.entropy_mode); rc = call_hfi_op(hdev, session_set_property, inst->session, HFI_PROPERTY_PARAM_VENC_H264_ENTROPY_CONTROL, &entropy, sizeof(entropy)); @@ -2916,7 +2916,7 @@ set_and_exit: multi_slice_control.slice_size = slice_val; hdev = inst->core->device; - dprintk(VIDC_DBG, "%s: %d %d\n", __func__, + dprintk(VIDC_HIGH, "%s: %d %d\n", __func__, multi_slice_control.multi_slice, multi_slice_control.slice_size); rc = call_hfi_op(hdev, session_set_property, inst->session, @@ -2972,7 +2972,7 @@ int msm_venc_set_intra_refresh_mode(struct msm_vidc_inst *inst) intra_refresh.mbs = 0; } - dprintk(VIDC_DBG, "%s: %d %d\n", __func__, + dprintk(VIDC_HIGH, "%s: %d %d\n", __func__, intra_refresh.mode, intra_refresh.mbs); rc = call_hfi_op(hdev, session_set_property, inst->session, HFI_PROPERTY_PARAM_VENC_INTRA_REFRESH, &intra_refresh, @@ -2999,12 +2999,12 @@ int msm_venc_set_bitrate_savings_mode(struct msm_vidc_inst *inst) ctrl = get_ctrl(inst, V4L2_CID_MPEG_VIDC_VENC_BITRATE_SAVINGS); enable.enable = !!ctrl->val; if (!ctrl->val && inst->rc_type != V4L2_MPEG_VIDEO_BITRATE_MODE_VBR) { - dprintk(VIDC_DBG, + dprintk(VIDC_HIGH, "Can't disable bitrate savings for non-VBR_CFR\n"); enable.enable = 1; } - dprintk(VIDC_DBG, "%s: %d\n", __func__, enable.enable); + dprintk(VIDC_HIGH, "%s: %d\n", __func__, enable.enable); rc = call_hfi_op(hdev, session_set_property, inst->session, HFI_PROPERTY_PARAM_VENC_BITRATE_SAVINGS, &enable, sizeof(enable)); @@ -3041,7 +3041,7 @@ int msm_venc_set_loop_filter_mode(struct msm_vidc_inst *inst) h264_db_control.slice_alpha_offset = ctrl_a->val; h264_db_control.slice_beta_offset = ctrl_b->val; - dprintk(VIDC_DBG, "%s: %d %d %d\n", __func__, + dprintk(VIDC_HIGH, "%s: %d %d %d\n", __func__, h264_db_control.mode, h264_db_control.slice_alpha_offset, h264_db_control.slice_beta_offset); rc = call_hfi_op(hdev, session_set_property, inst->session, @@ -3077,7 +3077,7 @@ int msm_venc_set_sequence_header_mode(struct msm_vidc_inst *inst) else enable.enable = false; - dprintk(VIDC_DBG, "%s: %d\n", __func__, enable.enable); + dprintk(VIDC_HIGH, "%s: %d\n", __func__, enable.enable); rc = call_hfi_op(hdev, session_set_property, inst->session, HFI_PROPERTY_CONFIG_VENC_SYNC_FRAME_SEQUENCE_HEADER, &enable, sizeof(enable)); @@ -3108,7 +3108,7 @@ int msm_venc_set_au_delimiter_mode(struct msm_vidc_inst *inst) ctrl = get_ctrl(inst, V4L2_CID_MPEG_VIDC_VIDEO_AU_DELIMITER); enable.enable = !!ctrl->val; - dprintk(VIDC_DBG, "%s: %d\n", __func__, enable.enable); + dprintk(VIDC_HIGH, "%s: %d\n", __func__, enable.enable); rc = call_hfi_op(hdev, session_set_property, inst->session, HFI_PROPERTY_PARAM_VENC_GENERATE_AUDNAL, &enable, sizeof(enable)); @@ -3175,7 +3175,7 @@ int msm_venc_set_base_layer_priority_id(struct msm_vidc_inst *inst) max_layer = get_ctrl(inst, V4L2_CID_MPEG_VIDC_VIDEO_HEVC_MAX_HIER_CODING_LAYER); if (max_layer->val <= 0) { - dprintk(VIDC_DBG, "%s: Layer id can only be set with Hierp\n", + dprintk(VIDC_HIGH, "%s: Layer id can only be set with Hierp\n", __func__); return 0; } @@ -3183,7 +3183,7 @@ int msm_venc_set_base_layer_priority_id(struct msm_vidc_inst *inst) ctrl = get_ctrl(inst, V4L2_CID_MPEG_VIDC_VIDEO_BASELAYER_ID); baselayerid = ctrl->val; - dprintk(VIDC_DBG, "%s: %d\n", __func__, baselayerid); + dprintk(VIDC_HIGH, "%s: %d\n", __func__, baselayerid); rc = call_hfi_op(hdev, session_set_property, inst->session, HFI_PROPERTY_CONFIG_VENC_BASELAYER_PRIORITYID, &baselayerid, sizeof(baselayerid)); @@ -3229,13 +3229,13 @@ int msm_venc_set_hp_max_layer(struct msm_vidc_inst *inst) hp_layer = ctrl->val - 1; if (inst->hybrid_hp) { - dprintk(VIDC_DBG, "%s: Hybrid hierp layer: %d\n", + dprintk(VIDC_HIGH, "%s: Hybrid hierp layer: %d\n", __func__, hp_layer); rc = call_hfi_op(hdev, session_set_property, inst->session, HFI_PROPERTY_PARAM_VENC_HIER_P_HYBRID_MODE, &hp_layer, sizeof(hp_layer)); } else { - dprintk(VIDC_DBG, "%s: Hierp max layer: %d\n", + dprintk(VIDC_HIGH, "%s: Hierp max layer: %d\n", __func__, hp_layer); rc = call_hfi_op(hdev, session_set_property, inst->session, HFI_PROPERTY_PARAM_VENC_HIER_P_MAX_NUM_ENH_LAYER, @@ -3267,7 +3267,7 @@ int msm_venc_set_hp_layer(struct msm_vidc_inst *inst) return 0; if (inst->hybrid_hp) { - dprintk(VIDC_WARN, + dprintk(VIDC_ERR, "%s: Setting layer isn't allowed with hybrid hp\n", __func__); return 0; @@ -3279,7 +3279,7 @@ int msm_venc_set_hp_layer(struct msm_vidc_inst *inst) V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_LAYER); if (max_layer->val < ctrl->val) { - dprintk(VIDC_WARN, + dprintk(VIDC_ERR, "%s: HP layer count greater than max isn't allowed\n", __func__); return 0; @@ -3292,7 +3292,7 @@ int msm_venc_set_hp_layer(struct msm_vidc_inst *inst) if (ctrl->val) hp_layer = ctrl->val - 1; - dprintk(VIDC_DBG, "%s: Hierp enhancement layer: %d\n", + dprintk(VIDC_HIGH, "%s: Hierp enhancement layer: %d\n", __func__, hp_layer); rc = call_hfi_op(hdev, session_set_property, inst->session, HFI_PROPERTY_CONFIG_VENC_HIER_P_ENH_LAYER, @@ -3323,7 +3323,7 @@ int msm_venc_set_vpx_error_resilience(struct msm_vidc_inst *inst) ctrl = get_ctrl(inst, V4L2_CID_MPEG_VIDC_VIDEO_VPX_ERROR_RESILIENCE); enable.enable = !!ctrl->val; - dprintk(VIDC_DBG, "%s: %d\n", __func__, enable.enable); + dprintk(VIDC_HIGH, "%s: %d\n", __func__, enable.enable); rc = call_hfi_op(hdev, session_set_property, inst->session, HFI_PROPERTY_PARAM_VENC_VPX_ERROR_RESILIENCE_MODE, &enable, sizeof(enable)); @@ -3369,7 +3369,7 @@ int msm_venc_set_video_signal_info(struct msm_vidc_inst *inst) signal_info.transfer_characteristics = ctrl_tr->val; signal_info.matrix_coeffs = ctrl_mc->val; - dprintk(VIDC_DBG, "%s: %d %d %d %d\n", __func__, + dprintk(VIDC_HIGH, "%s: %d %d %d %d\n", __func__, signal_info.color_primaries, signal_info.video_full_range, signal_info.transfer_characteristics, signal_info.matrix_coeffs); @@ -3415,7 +3415,7 @@ int msm_venc_set_rotation(struct msm_vidc_inst *inst) else if (vflip->val == V4L2_MPEG_MSM_VIDC_ENABLE) vpe_rotation.flip = HFI_FLIP_VERTICAL; - dprintk(VIDC_DBG, "Set rotation = %d, flip = %d\n", + dprintk(VIDC_HIGH, "Set rotation = %d, flip = %d\n", vpe_rotation.rotation, vpe_rotation.flip); rc = call_hfi_op(hdev, session_set_property, (void *)inst->session, @@ -3479,14 +3479,14 @@ int msm_venc_set_8x8_transform(struct msm_vidc_inst *inst) hdev = inst->core->device; if (get_v4l2_codec(inst) != V4L2_PIX_FMT_H264) { - dprintk(VIDC_DBG, "%s: skip as codec is not H264\n", + dprintk(VIDC_HIGH, "%s: skip as codec is not H264\n", __func__); return 0; } if (inst->profile != HFI_H264_PROFILE_HIGH && inst->profile != HFI_H264_PROFILE_CONSTRAINED_HIGH) { - dprintk(VIDC_DBG, "%s: skip due to %#x\n", + dprintk(VIDC_HIGH, "%s: skip due to %#x\n", __func__, inst->profile); return 0; } @@ -3494,7 +3494,7 @@ int msm_venc_set_8x8_transform(struct msm_vidc_inst *inst) ctrl = get_ctrl(inst, V4L2_CID_MPEG_VIDEO_H264_8X8_TRANSFORM); enable.enable = !!ctrl->val; - dprintk(VIDC_DBG, "%s: %d\n", __func__, enable.enable); + dprintk(VIDC_HIGH, "%s: %d\n", __func__, enable.enable); rc = call_hfi_op(hdev, session_set_property, inst->session, HFI_PROPERTY_PARAM_VENC_H264_8X8_TRANSFORM, &enable, sizeof(enable)); @@ -3542,7 +3542,7 @@ int msm_venc_set_vui_timing_info(struct msm_vidc_inst *inst) timing_info.fixed_frame_rate = cfr; timing_info.time_scale = NSEC_PER_SEC; - dprintk(VIDC_DBG, "%s: %d %d\n", __func__, timing_info.enable, + dprintk(VIDC_HIGH, "%s: %d %d\n", __func__, timing_info.enable, timing_info.fixed_frame_rate); rc = call_hfi_op(hdev, session_set_property, inst->session, HFI_PROPERTY_PARAM_VENC_VUI_TIMING_INFO, &timing_info, @@ -3591,7 +3591,7 @@ int msm_venc_set_nal_stream_format(struct msm_vidc_inst *inst) break; } - dprintk(VIDC_DBG, "%s: %#x\n", __func__, + dprintk(VIDC_HIGH, "%s: %#x\n", __func__, stream_format.nal_stream_format_select); rc = call_hfi_op(hdev, session_set_property, inst->session, HFI_PROPERTY_PARAM_NAL_STREAM_FORMAT_SELECT, &stream_format, @@ -3637,7 +3637,7 @@ int msm_venc_set_ltr_mode(struct msm_vidc_inst *inst) ltr.ltr_count = ctrl->val; ltr.ltr_mode = HFI_LTR_MODE_MANUAL; ltr.trust_mode = 1; - dprintk(VIDC_DBG, "%s: %d %d\n", __func__, + dprintk(VIDC_HIGH, "%s: %d %d\n", __func__, ltr.ltr_mode, ltr.ltr_count); rc = call_hfi_op(hdev, session_set_property, inst->session, HFI_PROPERTY_PARAM_VENC_LTRMODE, <r, sizeof(ltr)); @@ -3669,7 +3669,7 @@ int msm_venc_set_ltr_useframe(struct msm_vidc_inst *inst) use_ltr.ref_ltr = ctrl->val; use_ltr.use_constrnt = false; use_ltr.frames = 0; - dprintk(VIDC_DBG, "%s: %d\n", __func__, use_ltr.ref_ltr); + dprintk(VIDC_HIGH, "%s: %d\n", __func__, use_ltr.ref_ltr); rc = call_hfi_op(hdev, session_set_property, inst->session, HFI_PROPERTY_CONFIG_VENC_USELTRFRAME, &use_ltr, sizeof(use_ltr)); @@ -3700,7 +3700,7 @@ int msm_venc_set_ltr_markframe(struct msm_vidc_inst *inst) ctrl = get_ctrl(inst, V4L2_CID_MPEG_VIDC_VIDEO_MARKLTRFRAME); mark_ltr.mark_frame = ctrl->val; - dprintk(VIDC_DBG, "%s: %d\n", __func__, mark_ltr.mark_frame); + dprintk(VIDC_HIGH, "%s: %d\n", __func__, mark_ltr.mark_frame); rc = call_hfi_op(hdev, session_set_property, inst->session, HFI_PROPERTY_CONFIG_VENC_MARKLTRFRAME, &mark_ltr, sizeof(mark_ltr)); @@ -3736,7 +3736,7 @@ int msm_venc_set_dyn_qp(struct msm_vidc_inst *inst, struct v4l2_ctrl *ctrl) if (get_v4l2_codec(inst) == V4L2_PIX_FMT_VP8) qp.enable &= ~QP_ENABLE_B; - dprintk(VIDC_DBG, "%s: %#x\n", __func__, + dprintk(VIDC_HIGH, "%s: %#x\n", __func__, ctrl->val); rc = call_hfi_op(hdev, session_set_property, inst->session, HFI_PROPERTY_CONFIG_VENC_FRAME_QP, &qp, sizeof(qp)); @@ -3774,7 +3774,7 @@ int msm_venc_set_aspect_ratio(struct msm_vidc_inst *inst) return 0; sar.aspect_height = ctrl->val; - dprintk(VIDC_DBG, "%s: %d %d\n", __func__, + dprintk(VIDC_HIGH, "%s: %d %d\n", __func__, sar.aspect_width, sar.aspect_height); rc = call_hfi_op(hdev, session_set_property, inst->session, HFI_PROPERTY_PARAM_VENC_ASPECT_RATIO, &sar, sizeof(sar)); @@ -3802,7 +3802,7 @@ int msm_venc_set_blur_resolution(struct msm_vidc_inst *inst) frame_sz.buffer_type = HFI_BUFFER_INPUT; frame_sz.height = ctrl->val & 0xFFFF; frame_sz.width = (ctrl->val & 0x7FFF0000) >> 16; - dprintk(VIDC_DBG, "%s: type %u, height %u, width %u\n", __func__, + dprintk(VIDC_HIGH, "%s: type %u, height %u, width %u\n", __func__, frame_sz.buffer_type, frame_sz.height, frame_sz.width); rc = call_hfi_op(hdev, session_set_property, inst->session, HFI_PROPERTY_CONFIG_VENC_BLUR_FRAME_SIZE, &frame_sz, @@ -3833,7 +3833,7 @@ int msm_venc_set_hdr_info(struct msm_vidc_inst *inst) return 0; /* No conversion to HFI needed as both structures are same */ - dprintk(VIDC_DBG, "%s: setting hdr info\n", __func__); + dprintk(VIDC_HIGH, "%s: setting hdr info\n", __func__); rc = call_hfi_op(hdev, session_set_property, inst->session, HFI_PROPERTY_PARAM_VENC_HDR10_PQ_SEI, &inst->hdr10_sei_params, sizeof(inst->hdr10_sei_params)); @@ -3884,7 +3884,7 @@ int msm_venc_set_extradata(struct msm_vidc_inst *inst) if (inst->prop.extradata_ctrls & EXTRADATA_ENC_INPUT_CVP) value = 0x1; - dprintk(VIDC_DBG, "%s: CVP extradata %d\n", __func__, value); + dprintk(VIDC_HIGH, "%s: CVP extradata %d\n", __func__, value); rc = msm_comm_set_extradata(inst, HFI_PROPERTY_PARAM_VENC_CVP_METADATA_EXTRADATA, value); if (rc) @@ -3904,7 +3904,7 @@ int msm_venc_set_lossless(struct msm_vidc_inst *inst) if (inst->rc_type != RATE_CONTROL_LOSSLESS) return 0; - dprintk(VIDC_DBG, "%s: enable lossless encoding\n", __func__); + dprintk(VIDC_HIGH, "%s: enable lossless encoding\n", __func__); enable.enable = 1; rc = call_hfi_op(hdev, session_set_property, inst->session, @@ -4060,7 +4060,7 @@ exit: if (rc) dprintk(VIDC_ERR, "%s: failed with %d\n", __func__, rc); else - dprintk(VIDC_DBG, "%s: set properties successful\n", __func__); + dprintk(VIDC_HIGH, "%s: set properties successful\n", __func__); return rc; } diff --git a/msm/vidc/msm_vidc.c b/msm/vidc/msm_vidc.c old mode 100644 new mode 100755 index 28080d6d30c7..3fc9233a6db5 --- a/msm/vidc/msm_vidc.c +++ b/msm/vidc/msm_vidc.c @@ -152,7 +152,7 @@ int msm_vidc_query_ctrl(void *instance, struct v4l2_queryctrl *q_ctrl) else q_ctrl->flags = 0; - dprintk(VIDC_DBG, "query ctrl: %s: min %d, max %d, flags %#x\n", + dprintk(VIDC_HIGH, "query ctrl: %s: min %d, max %d, flags %#x\n", ctrl->name, q_ctrl->minimum, q_ctrl->maximum, q_ctrl->flags); return rc; } @@ -171,7 +171,7 @@ int msm_vidc_s_fmt(void *instance, struct v4l2_format *f) if (inst->session_type == MSM_VIDC_ENCODER) rc = msm_venc_s_fmt(instance, f); - dprintk(VIDC_DBG, + dprintk(VIDC_HIGH, "s_fmt: %x : type %d wxh %dx%d pixelfmt %#x num_planes %d size[0] %d size[1] %d in_reconfig %d\n", hash32_ptr(inst->session), f->type, f->fmt.pix_mp.width, f->fmt.pix_mp.height, @@ -195,7 +195,7 @@ int msm_vidc_g_fmt(void *instance, struct v4l2_format *f) if (inst->session_type == MSM_VIDC_ENCODER) rc = msm_venc_g_fmt(instance, f); - dprintk(VIDC_DBG, + dprintk(VIDC_HIGH, "g_fmt: %x : type %d wxh %dx%d pixelfmt %#x num_planes %d size[0] %d size[1] %d in_reconfig %d\n", hash32_ptr(inst->session), f->type, f->fmt.pix_mp.width, f->fmt.pix_mp.height, @@ -309,12 +309,12 @@ int msm_vidc_release_buffer(void *instance, int type, unsigned int index) continue; if (mbuf->flags & MSM_VIDC_FLAG_RBR_PENDING) { - print_vidc_buffer(VIDC_DBG, + print_vidc_buffer(VIDC_HIGH, "skip rel buf (rbr pending)", inst, mbuf); continue; } - print_vidc_buffer(VIDC_DBG, "release buf", inst, mbuf); + print_vidc_buffer(VIDC_HIGH, "release buf", inst, mbuf); msm_comm_unmap_vidc_buffer(inst, mbuf); list_del(&mbuf->list); kref_put_mbuf(mbuf); @@ -435,7 +435,7 @@ int msm_vidc_streamon(void *instance, enum v4l2_buf_type i) "Failed to find buffer queue for type = %d\n", i); return -EINVAL; } - dprintk(VIDC_DBG, "Calling streamon\n"); + dprintk(VIDC_HIGH, "Calling streamon\n"); mutex_lock(&q->lock); rc = vb2_streamon(&q->vb2_bufq, i); mutex_unlock(&q->lock); @@ -464,7 +464,7 @@ int msm_vidc_streamoff(void *instance, enum v4l2_buf_type i) } if (!inst->in_reconfig) { - dprintk(VIDC_DBG, "%s: inst %pK release resources\n", + dprintk(VIDC_HIGH, "%s: inst %pK release resources\n", __func__, inst); rc = msm_comm_try_state(inst, MSM_VIDC_RELEASE_RESOURCES_DONE); if (rc) @@ -473,7 +473,7 @@ int msm_vidc_streamoff(void *instance, enum v4l2_buf_type i) __func__, inst); } - dprintk(VIDC_DBG, "Calling streamoff\n"); + dprintk(VIDC_HIGH, "Calling streamoff\n"); mutex_lock(&q->lock); rc = vb2_streamoff(&q->vb2_bufq, i); mutex_unlock(&q->lock); @@ -553,7 +553,7 @@ static void msm_vidc_cleanup_buffer(struct vb2_buffer *vb) } if (q->vb2_bufq.streaming) { - dprintk(VIDC_DBG, "%d PORT is streaming\n", + dprintk(VIDC_HIGH, "%d PORT is streaming\n", vb->type); return; } @@ -591,7 +591,7 @@ static int msm_vidc_queue_setup(struct vb2_queue *q, case INPUT_MPLANE: { fmt = &inst->fmts[INPUT_PORT]; if (*num_buffers < fmt->count_min_host) { - dprintk(VIDC_DBG, + dprintk(VIDC_HIGH, "Client passed num buffers %d less than the min_host count %d\n", *num_buffers, fmt->count_min_host); } @@ -612,7 +612,7 @@ static int msm_vidc_queue_setup(struct vb2_queue *q, if (inst->session_type != MSM_VIDC_DECODER && inst->state > MSM_VIDC_LOAD_RESOURCES_DONE) { if (*num_buffers < fmt->count_min_host) { - dprintk(VIDC_DBG, + dprintk(VIDC_HIGH, "Client passed num buffers %d less than the min_host count %d\n", *num_buffers, fmt->count_min_host); @@ -637,7 +637,7 @@ static int msm_vidc_queue_setup(struct vb2_queue *q, break; } - dprintk(VIDC_DBG, + dprintk(VIDC_HIGH, "queue_setup: %x : type %d num_buffers %d num_planes %d sizes[0] %d sizes[1] %d\n", hash32_ptr(inst->session), q->type, *num_buffers, *num_planes, sizes[0], sizes[1]); @@ -652,7 +652,7 @@ static inline int msm_vidc_verify_buffer_counts(struct msm_vidc_inst *inst) if (inst->session_type == MSM_VIDC_DECODER && (inst->state < MSM_VIDC_LOAD_RESOURCES_DONE || inst->state >= MSM_VIDC_RELEASE_RESOURCES_DONE)) { - dprintk(VIDC_DBG, + dprintk(VIDC_HIGH, "No need to verify buffer counts : %pK\n", inst); return 0; } @@ -661,7 +661,7 @@ static inline int msm_vidc_verify_buffer_counts(struct msm_vidc_inst *inst) struct hal_buffer_requirements *req = &inst->buff_req.buffer[i]; if (req && (req->buffer_type == HAL_BUFFER_OUTPUT)) { - dprintk(VIDC_DBG, "Verifying Buffer : %d\n", + dprintk(VIDC_HIGH, "Verifying Buffer : %d\n", req->buffer_type); if (req->buffer_count_actual < req->buffer_count_min_host || @@ -732,10 +732,10 @@ bool is_vidc_cvp_allowed(struct msm_vidc_inst *inst) inst->rc_type != V4L2_MPEG_VIDEO_BITRATE_MODE_CQ && !inst->clk_data.is_legacy_cbr && !is_secure_session(inst)) { - dprintk(VIDC_DBG, "%s: cvp allowed\n", __func__); + dprintk(VIDC_HIGH, "%s: cvp allowed\n", __func__); allowed = true; } else { - dprintk(VIDC_DBG, + dprintk(VIDC_HIGH, "%s: cvp not allowed, cvp_external %d cvp_disable %d extradata %#x rc_type %d legacy_cbr %d secure %d\n", __func__, core->resources.cvp_external, cvp_disable->val, inst->prop.extradata_ctrls, @@ -757,27 +757,27 @@ static int msm_vidc_prepare_preprocess(struct msm_vidc_inst *inst) } if (!msm_vidc_cvp_usage) { - dprintk(VIDC_DBG, "%s: cvp usage disabled\n", __func__); + dprintk(VIDC_HIGH, "%s: cvp usage disabled\n", __func__); return 0; } if (!is_vidc_cvp_allowed(inst)) { - dprintk(VIDC_DBG, "%s: cvp not allowed\n", __func__); + dprintk(VIDC_HIGH, "%s: cvp not allowed\n", __func__); return 0; } rc = msm_vidc_cvp_prepare_preprocess(inst); if (rc) { - dprintk(VIDC_WARN, "%s: no cvp preprocessing\n", __func__); + dprintk(VIDC_ERR, "%s: no cvp preprocessing\n", __func__); goto exit; } - dprintk(VIDC_DBG, "%s: cvp enabled\n", __func__); + dprintk(VIDC_HIGH, "%s: cvp enabled\n", __func__); - dprintk(VIDC_DBG, "%s: set CVP extradata\n", __func__); + dprintk(VIDC_HIGH, "%s: set CVP extradata\n", __func__); rc = msm_comm_set_extradata(inst, HFI_PROPERTY_PARAM_VENC_CVP_METADATA_EXTRADATA, 1); if (rc) { - dprintk(VIDC_WARN, "%s: set CVP extradata failed\n", __func__); + dprintk(VIDC_ERR, "%s: set CVP extradata failed\n", __func__); goto exit; } @@ -794,7 +794,7 @@ static inline int start_streaming(struct msm_vidc_inst *inst) struct hfi_buffer_size_minimum b; struct v4l2_format *f; - dprintk(VIDC_DBG, "%s: %x : inst %pK\n", __func__, + dprintk(VIDC_HIGH, "%s: %x : inst %pK\n", __func__, hash32_ptr(inst->session), inst); hdev = inst->core->device; @@ -808,7 +808,7 @@ static inline int start_streaming(struct msm_vidc_inst *inst) if (is_encode_session(inst)) { rc = msm_vidc_prepare_preprocess(inst); if (rc) { - dprintk(VIDC_WARN, "%s: no preprocessing\n", __func__); + dprintk(VIDC_ERR, "%s: no preprocessing\n", __func__); /* ignore error */ rc = 0; } @@ -914,7 +914,7 @@ static inline int start_streaming(struct msm_vidc_inst *inst) } inst->batch.enable = is_batching_allowed(inst); - dprintk(VIDC_DBG, "%s: batching %s for inst %pK (%#x)\n", + dprintk(VIDC_HIGH, "%s: batching %s for inst %pK (%#x)\n", __func__, inst->batch.enable ? "enabled" : "disabled", inst, hash32_ptr(inst->session)); @@ -978,7 +978,7 @@ static int msm_vidc_start_streaming(struct vb2_queue *q, unsigned int count) return -EINVAL; } hdev = inst->core->device; - dprintk(VIDC_DBG, "Streamon called on: %d capability for inst: %pK\n", + dprintk(VIDC_HIGH, "Streamon called on: %d capability for inst: %pK\n", q->type, inst); switch (q->type) { case INPUT_MPLANE: @@ -1075,7 +1075,7 @@ static inline int stop_streaming(struct msm_vidc_inst *inst) { int rc = 0; - dprintk(VIDC_DBG, "%s: %x : inst %pK\n", __func__, + dprintk(VIDC_HIGH, "%s: %x : inst %pK\n", __func__, hash32_ptr(inst->session), inst); rc = msm_comm_try_state(inst, MSM_VIDC_RELEASE_RESOURCES_DONE); @@ -1108,7 +1108,7 @@ static void msm_vidc_stop_streaming(struct vb2_queue *q) } inst = q->drv_priv; - dprintk(VIDC_DBG, "Streamoff called on: %d capability\n", q->type); + dprintk(VIDC_HIGH, "Streamoff called on: %d capability\n", q->type); switch (q->type) { case INPUT_MPLANE: if (!inst->bufq[OUTPUT_PORT].vb2_bufq.streaming) @@ -1434,13 +1434,13 @@ static int try_get_ctrl_for_instance(struct msm_vidc_inst *inst, break; case V4L2_CID_MIN_BUFFERS_FOR_CAPTURE: ctrl->val = inst->fmts[OUTPUT_PORT].count_min_host; - dprintk(VIDC_DBG, "g_min: %x : hal_buffer %d min buffers %d\n", + dprintk(VIDC_HIGH, "g_min: %x : hal_buffer %d min buffers %d\n", hash32_ptr(inst->session), HAL_BUFFER_OUTPUT, ctrl->val); break; case V4L2_CID_MIN_BUFFERS_FOR_OUTPUT: ctrl->val = inst->fmts[INPUT_PORT].count_min_host; - dprintk(VIDC_DBG, "g_min: %x : hal_buffer %d min buffers %d\n", + dprintk(VIDC_HIGH, "g_min: %x : hal_buffer %d min buffers %d\n", hash32_ptr(inst->session), HAL_BUFFER_INPUT, ctrl->val); break; case V4L2_CID_MPEG_VIDC_VIDEO_EXTRADATA: @@ -1491,7 +1491,7 @@ void *msm_vidc_open(int core_id, int session_type) } pr_info(VIDC_DBG_TAG "Opening video instance: %pK, %d\n", - "info", inst, session_type); + "high", inst, session_type); mutex_init(&inst->sync_lock); mutex_init(&inst->bufq[OUTPUT_PORT].lock); mutex_init(&inst->bufq[INPUT_PORT].lock); @@ -1761,7 +1761,7 @@ int msm_vidc_destroy(struct msm_vidc_inst *inst) msm_vidc_debugfs_deinit_inst(inst); pr_info(VIDC_DBG_TAG "Closed video instance: %pK\n", - "info", inst); + "high", inst); kfree(inst); return 0; } diff --git a/msm/vidc/msm_vidc_buffer_calculations.c b/msm/vidc/msm_vidc_buffer_calculations.c index c000118ef4e2..281d49eb9ba6 100644 --- a/msm/vidc/msm_vidc_buffer_calculations.c +++ b/msm/vidc/msm_vidc_buffer_calculations.c @@ -617,7 +617,7 @@ int msm_vidc_init_buffer_count(struct msm_vidc_inst *inst) fmt->count_min_host = fmt->count_actual = fmt->count_min + extra_buff_count; - dprintk(VIDC_DBG, "%s: %x : input min %d min_host %d actual %d\n", + dprintk(VIDC_HIGH, "%s: %x : input min %d min_host %d actual %d\n", __func__, hash32_ptr(inst->session), fmt->count_min, fmt->count_min_host, fmt->count_actual); @@ -648,7 +648,7 @@ int msm_vidc_init_buffer_count(struct msm_vidc_inst *inst) fmt->count_min_host = fmt->count_actual = fmt->count_min + extra_buff_count; - dprintk(VIDC_DBG, "%s: %x : output min %d min_host %d actual %d\n", + dprintk(VIDC_HIGH, "%s: %x : output min %d min_host %d actual %d\n", __func__, hash32_ptr(inst->session), fmt->count_min, fmt->count_min_host, fmt->count_actual); @@ -768,10 +768,10 @@ u32 msm_vidc_calculate_dec_input_frame_size(struct msm_vidc_inst *inst) if (inst->buffer_size_limit && (inst->buffer_size_limit < frame_size)) { frame_size = inst->buffer_size_limit; - dprintk(VIDC_DBG, "input buffer size limited to %d\n", + dprintk(VIDC_HIGH, "input buffer size limited to %d\n", frame_size); } else { - dprintk(VIDC_DBG, "set input buffer size to %d\n", + dprintk(VIDC_HIGH, "set input buffer size to %d\n", frame_size); } diff --git a/msm/vidc/msm_vidc_bus_iris1.c b/msm/vidc/msm_vidc_bus_iris1.c index 3512f4d11032..90fdb821babc 100644 --- a/msm/vidc/msm_vidc_bus_iris1.c +++ b/msm/vidc/msm_vidc_bus_iris1.c @@ -64,7 +64,7 @@ void __dump(struct dump dump[], int len) } } - dprintk(VIDC_DBG, "%s", formatted_line); + dprintk(VIDC_LOW, "%s", formatted_line); } } @@ -275,7 +275,7 @@ static unsigned long __calculate_decoder(struct vidc_bus_vote_data *d, llc.line_buffer_write + ddr.total; /* Dump all the variables for easier debugging */ - if (msm_vidc_debug & VIDC_PROF) { + if (msm_vidc_debug & VIDC_PERF) { struct dump dump[] = { {"DECODER PARAMETERS", "", DUMP_HEADER_MAGIC}, {"lcu size", "%d", lcu_size}, @@ -569,7 +569,7 @@ static unsigned long __calculate_encoder(struct vidc_bus_vote_data *d, ddr.total = fp_mult(ddr.total, qsmmu_bw_overhead_factor); llc.total = llc.ref_read_crcb + llc.line_buffer + ddr.total; - if (msm_vidc_debug & VIDC_PROF) { + if (msm_vidc_debug & VIDC_PERF) { struct dump dump[] = { {"ENCODER PARAMETERS", "", DUMP_HEADER_MAGIC}, {"width", "%d", width}, diff --git a/msm/vidc/msm_vidc_bus_iris2.c b/msm/vidc/msm_vidc_bus_iris2.c index fc91088ef6d7..21703d3e3992 100644 --- a/msm/vidc/msm_vidc_bus_iris2.c +++ b/msm/vidc/msm_vidc_bus_iris2.c @@ -214,7 +214,7 @@ static unsigned long __calculate_decoder(struct vidc_bus_vote_data *d, llc.line_buffer_write + ddr.total; /* Dump all the variables for easier debugging */ - if (msm_vidc_debug & VIDC_PROF) { + if (msm_vidc_debug & VIDC_PERF) { struct dump dump[] = { {"DECODER PARAMETERS", "", DUMP_HEADER_MAGIC}, {"lcu size", "%d", lcu_size}, @@ -508,7 +508,7 @@ static unsigned long __calculate_encoder(struct vidc_bus_vote_data *d, ddr.total = fp_mult(ddr.total, qsmmu_bw_overhead_factor); llc.total = llc.ref_read_crcb + llc.line_buffer + ddr.total; - if (msm_vidc_debug & VIDC_PROF) { + if (msm_vidc_debug & VIDC_PERF) { struct dump dump[] = { {"ENCODER PARAMETERS", "", DUMP_HEADER_MAGIC}, {"width", "%d", width}, diff --git a/msm/vidc/msm_vidc_clocks.c b/msm/vidc/msm_vidc_clocks.c old mode 100644 new mode 100755 index 0ce353c33547..44c38920537a --- a/msm/vidc/msm_vidc_clocks.c +++ b/msm/vidc/msm_vidc_clocks.c @@ -47,13 +47,13 @@ struct msm_vidc_core_ops core_ops_iris2 = { static inline void msm_dcvs_print_dcvs_stats(struct clock_data *dcvs) { - dprintk(VIDC_PROF, + dprintk(VIDC_PERF, "DCVS: Load_Low %lld, Load Norm %lld, Load High %lld\n", dcvs->load_low, dcvs->load_norm, dcvs->load_high); - dprintk(VIDC_PROF, + dprintk(VIDC_PERF, "DCVS: min_threshold %d, max_threshold %d\n", dcvs->min_threshold, dcvs->max_threshold); } @@ -230,7 +230,7 @@ static int fill_dynamic_stats(struct msm_vidc_inst *inst, vote_data->use_dpb_read = true; } - dprintk(VIDC_PROF, + dprintk(VIDC_PERF, "Input CR = %d Recon CR = %d Complexity Factor = %d\n", vote_data->input_cr, vote_data->compression_ratio, vote_data->complexity_factor); @@ -257,12 +257,12 @@ int msm_comm_vote_bus(struct msm_vidc_core *core) vote_data = kzalloc(sizeof(struct vidc_bus_vote_data) * MAX_SUPPORTED_INSTANCES, GFP_ATOMIC); if (!vote_data) { - dprintk(VIDC_DBG, + dprintk(VIDC_LOW, "vote_data allocation with GFP_ATOMIC failed\n"); vote_data = kzalloc(sizeof(struct vidc_bus_vote_data) * MAX_SUPPORTED_INSTANCES, GFP_KERNEL); if (!vote_data) { - dprintk(VIDC_DBG, + dprintk(VIDC_ERR, "vote_data allocation failed\n"); return -EINVAL; } @@ -293,7 +293,7 @@ int msm_comm_vote_bus(struct msm_vidc_core *core) if ((!filled_len || !device_addr) && (inst->session_type != MSM_VIDC_CVP)) { - dprintk(VIDC_DBG, "%s: no input for session %x\n", + dprintk(VIDC_LOW, "%s: no input for session %x\n", __func__, hash32_ptr(inst->session)); continue; } @@ -414,7 +414,7 @@ static int msm_dcvs_scale_clocks(struct msm_vidc_inst *inst, inst->clk_data.dcvs_flags = 0; if (!inst->clk_data.dcvs_mode || inst->batch.enable) { - dprintk(VIDC_DBG, "Skip DCVS (dcvs %d, batching %d)\n", + dprintk(VIDC_LOW, "Skip DCVS (dcvs %d, batching %d)\n", inst->clk_data.dcvs_mode, inst->batch.enable); /* update load (freq) with normal value */ inst->clk_data.load = inst->clk_data.load_norm; @@ -463,7 +463,7 @@ static int msm_dcvs_scale_clocks(struct msm_vidc_inst *inst, dcvs->dcvs_flags = 0; } - dprintk(VIDC_PROF, + dprintk(VIDC_PERF, "DCVS: %x : total bufs %d outside fw %d max threshold %d with fw %d min bufs %d flags %#x\n", hash32_ptr(inst->session), fmt->count_actual, bufs_with_client, dcvs->max_threshold, bufs_with_fw, @@ -489,7 +489,7 @@ static void msm_vidc_update_freq_entry(struct msm_vidc_inst *inst, if (!found) { temp = kzalloc(sizeof(*temp), GFP_KERNEL); if (!temp) { - dprintk(VIDC_WARN, "%s: malloc failure.\n", __func__); + dprintk(VIDC_ERR, "%s: malloc failure.\n", __func__); goto exit; } temp->freq = freq; @@ -523,7 +523,7 @@ static unsigned long msm_vidc_max_freq(struct msm_vidc_core *core) allowed_clks_tbl = core->resources.allowed_clks_tbl; freq = allowed_clks_tbl[0].clock_rate; - dprintk(VIDC_PROF, "Max rate = %lu\n", freq); + dprintk(VIDC_PERF, "Max rate = %lu\n", freq); return freq; } @@ -571,7 +571,7 @@ void msm_comm_update_input_cr(struct msm_vidc_inst *inst, if (!found) { temp = kzalloc(sizeof(*temp), GFP_KERNEL); if (!temp) { - dprintk(VIDC_WARN, "%s: malloc failure.\n", __func__); + dprintk(VIDC_ERR, "%s: malloc failure.\n", __func__); goto exit; } temp->index = index; @@ -642,7 +642,7 @@ static unsigned long msm_vidc_calc_freq_ar50(struct msm_vidc_inst *inst, freq = max(vpp_cycles, vsp_cycles); freq = max(freq, fw_cycles); - dprintk(VIDC_DBG, "Update DCVS Load\n"); + dprintk(VIDC_LOW, "Update DCVS Load\n"); allowed_clks_tbl = core->resources.allowed_clks_tbl; for (i = core->resources.allowed_clks_tbl_size - 1; i >= 0; i--) { rate = allowed_clks_tbl[i].clock_rate; @@ -658,7 +658,7 @@ static unsigned long msm_vidc_calc_freq_ar50(struct msm_vidc_inst *inst, msm_dcvs_print_dcvs_stats(dcvs); - dprintk(VIDC_PROF, "%s Inst %pK : Filled Len = %d Freq = %llu\n", + dprintk(VIDC_PERF, "%s Inst %pK : Filled Len = %d Freq = %llu\n", __func__, inst, filled_len, freq); return (unsigned long) freq; @@ -749,7 +749,7 @@ static unsigned long msm_vidc_calc_freq_iris1(struct msm_vidc_inst *inst, dcvs->load_high = i > 0 ? allowed_clks_tbl[i-1].clock_rate : dcvs->load_norm; - dprintk(VIDC_PROF, + dprintk(VIDC_PERF, "%s: inst %pK: %x : filled len %d required freq %llu load_norm %llu\n", __func__, inst, hash32_ptr(inst->session), filled_len, freq, dcvs->load_norm); @@ -842,7 +842,7 @@ static unsigned long msm_vidc_calc_freq_iris2(struct msm_vidc_inst *inst, dcvs->load_high = i > 0 ? allowed_clks_tbl[i-1].clock_rate : dcvs->load_norm; - dprintk(VIDC_PROF, + dprintk(VIDC_PERF, "%s: inst %pK: %x : filled len %d required freq %llu load_norm %llu\n", __func__, inst, hash32_ptr(inst->session), filled_len, freq, dcvs->load_norm); @@ -888,7 +888,7 @@ int msm_vidc_set_clocks(struct msm_vidc_core *core) mutex_unlock(&inst->registeredbufs.lock); if (!filled_len || !device_addr) { - dprintk(VIDC_DBG, "%s no input for session %x\n", + dprintk(VIDC_LOW, "%s no input for session %x\n", __func__, hash32_ptr(inst->session)); continue; } @@ -905,7 +905,7 @@ int msm_vidc_set_clocks(struct msm_vidc_core *core) freq_core_max = max_t(unsigned long, freq_core_1, freq_core_2); if (msm_vidc_clock_voting) { - dprintk(VIDC_PROF, + dprintk(VIDC_PERF, "msm_vidc_clock_voting %d\n", msm_vidc_clock_voting); freq_core_max = msm_vidc_clock_voting; @@ -942,7 +942,7 @@ int msm_vidc_set_clocks(struct msm_vidc_core *core) core->curr_freq = rate; mutex_unlock(&core->lock); - dprintk(VIDC_PROF, + dprintk(VIDC_PERF, "%s: clock rate %lu requested %lu increment %d decrement %d\n", __func__, core->curr_freq, core->min_freq, increment, decrement); @@ -982,7 +982,7 @@ int msm_comm_scale_clocks(struct msm_vidc_inst *inst) mutex_unlock(&inst->registeredbufs.lock); if (!filled_len || !device_addr) { - dprintk(VIDC_DBG, "%s no input for session %x\n", + dprintk(VIDC_LOW, "%s no input for session %x\n", __func__, hash32_ptr(inst->session)); return 0; } @@ -1018,11 +1018,11 @@ int msm_comm_scale_clocks_and_bus(struct msm_vidc_inst *inst) hdev = core->device; if (msm_comm_scale_clocks(inst)) { - dprintk(VIDC_WARN, + dprintk(VIDC_ERR, "Failed to scale clocks. Performance might be impacted\n"); } if (msm_comm_vote_bus(core)) { - dprintk(VIDC_WARN, + dprintk(VIDC_ERR, "Failed to scale DDR bus. Performance might be impacted\n"); } return 0; @@ -1042,12 +1042,12 @@ int msm_dcvs_try_enable(struct msm_vidc_inst *inst) inst->batch.enable || inst->rc_type == V4L2_MPEG_VIDEO_BITRATE_MODE_CQ || inst->grid_enable) { - dprintk(VIDC_PROF, "DCVS disabled: %pK\n", inst); + dprintk(VIDC_HIGH, "DCVS disabled: %pK\n", inst); inst->clk_data.dcvs_mode = false; return false; } inst->clk_data.dcvs_mode = true; - dprintk(VIDC_PROF, "DCVS enabled: %pK\n", inst); + dprintk(VIDC_HIGH, "DCVS enabled: %pK\n", inst); return true; } @@ -1064,7 +1064,7 @@ int msm_comm_init_clocks_and_bus_data(struct msm_vidc_inst *inst) } if (inst->session_type == MSM_VIDC_CVP) { - dprintk(VIDC_DBG, "%s: cvp session\n", __func__); + dprintk(VIDC_LOW, "%s: cvp session\n", __func__); return 0; } @@ -1100,7 +1100,7 @@ void msm_clock_data_reset(struct msm_vidc_inst *inst) struct clock_data *dcvs; struct msm_vidc_format *fmt; - dprintk(VIDC_DBG, "Init DCVS Load\n"); + dprintk(VIDC_HIGH, "Init DCVS Load\n"); if (!inst || !inst->core || !inst->clk_data.entry) { dprintk(VIDC_ERR, "%s Invalid args: Inst = %pK\n", @@ -1224,7 +1224,7 @@ int msm_vidc_decide_work_route_iris1(struct msm_vidc_inst *inst) V4L2_MPEG_VIDEO_BITRATE_MODE_CBR_VFR && mbps <= CBR_VFR_MB_LIMIT)) { pdata.video_work_route = 1; - dprintk(VIDC_DBG, "Configured work route = 1"); + dprintk(VIDC_HIGH, "Configured work route = 1"); } } else { return -EINVAL; @@ -1237,7 +1237,7 @@ decision_done: (void *)inst->session, HFI_PROPERTY_PARAM_WORK_ROUTE, (void *)&pdata, sizeof(pdata)); if (rc) - dprintk(VIDC_WARN, + dprintk(VIDC_ERR, " Failed to configure work route %pK\n", inst); return rc; @@ -1285,14 +1285,14 @@ int msm_vidc_decide_work_route_iris2(struct msm_vidc_inst *inst) return -EINVAL; } - dprintk(VIDC_DBG, "Configurng work route = %u", + dprintk(VIDC_HIGH, "Configurng work route = %u", pdata.video_work_route); rc = call_hfi_op(hdev, session_set_property, (void *)inst->session, HFI_PROPERTY_PARAM_WORK_ROUTE, (void *)&pdata, sizeof(pdata)); if (rc) - dprintk(VIDC_WARN, + dprintk(VIDC_ERR, " Failed to configure work route %pK\n", inst); else inst->clk_data.work_route = pdata.video_work_route; @@ -1348,7 +1348,7 @@ decision_done: (void *)inst->session, HFI_PROPERTY_PARAM_WORK_MODE, (void *)&pdata, sizeof(pdata)); if (rc) - dprintk(VIDC_WARN, + dprintk(VIDC_ERR, " Failed to configure Work Mode %pK\n", inst); /* For WORK_MODE_1, set Low Latency mode by default to HW. */ @@ -1388,7 +1388,7 @@ int msm_vidc_decide_work_mode_iris1(struct msm_vidc_inst *inst) if (inst->clk_data.low_latency_mode) { pdata.video_work_mode = HFI_WORKMODE_1; - dprintk(VIDC_DBG, "Configured work mode = 1"); + dprintk(VIDC_HIGH, "Configured work mode = 1"); goto decision_done; } @@ -1432,7 +1432,7 @@ decision_done: (void *)inst->session, HFI_PROPERTY_PARAM_WORK_MODE, (void *)&pdata, sizeof(pdata)); if (rc) - dprintk(VIDC_WARN, + dprintk(VIDC_ERR, " Failed to configure Work Mode %pK\n", inst); /* For WORK_MODE_1, set Low Latency mode by default to HW. */ @@ -1494,7 +1494,7 @@ int msm_vidc_decide_work_mode_iris2(struct msm_vidc_inst *inst) } if (inst->rc_type == RATE_CONTROL_LOSSLESS && out_f->fmt.pix_mp.pixelformat == V4L2_PIX_FMT_H264) { - dprintk(VIDC_DBG, + dprintk(VIDC_HIGH, "Set work mode to low latency for AVC lossless encoding."); latency.enable = true; } @@ -1502,7 +1502,7 @@ int msm_vidc_decide_work_mode_iris2(struct msm_vidc_inst *inst) return -EINVAL; } - dprintk(VIDC_DBG, "Configuring work mode = %u low latency = %u", + dprintk(VIDC_HIGH, "Configuring work mode = %u low latency = %u", pdata.video_work_mode, latency.enable); @@ -1512,7 +1512,7 @@ int msm_vidc_decide_work_mode_iris2(struct msm_vidc_inst *inst) HFI_PROPERTY_PARAM_VENC_LOW_LATENCY_MODE, (void *)&latency, sizeof(latency)); if (rc) - dprintk(VIDC_WARN, + dprintk(VIDC_ERR, " Failed to configure low latency %pK\n", inst); else inst->clk_data.low_latency_mode = latency.enable; @@ -1522,7 +1522,7 @@ int msm_vidc_decide_work_mode_iris2(struct msm_vidc_inst *inst) (void *)inst->session, HFI_PROPERTY_PARAM_WORK_MODE, (void *)&pdata, sizeof(pdata)); if (rc) - dprintk(VIDC_WARN, + dprintk(VIDC_ERR, " Failed to configure Work Mode %pK\n", inst); else inst->clk_data.work_mode = pdata.video_work_mode; @@ -1541,7 +1541,7 @@ static inline int msm_vidc_power_save_mode_enable(struct msm_vidc_inst *inst, hdev = inst->core->device; if (inst->session_type != MSM_VIDC_ENCODER) { - dprintk(VIDC_DBG, + dprintk(VIDC_LOW, "%s : Not an encoder session. Nothing to do\n", __func__); return 0; @@ -1576,7 +1576,7 @@ static inline int msm_vidc_power_save_mode_enable(struct msm_vidc_inst *inst, inst->flags | VIDC_LOW_POWER : inst->flags & ~VIDC_LOW_POWER; - dprintk(VIDC_PROF, + dprintk(VIDC_HIGH, "Power Save Mode for inst: %pK Enable = %d\n", inst, enable); fail_power_mode_set: return rc; @@ -1587,7 +1587,7 @@ static int msm_vidc_move_core_to_power_save_mode(struct msm_vidc_core *core, { struct msm_vidc_inst *inst = NULL; - dprintk(VIDC_PROF, "Core %d : Moving all inst to LP mode\n", core_id); + dprintk(VIDC_HIGH, "Core %d : Moving all inst to LP mode\n", core_id); mutex_lock(&core->lock); list_for_each_entry(inst, &core->instances, list) { if (inst->clk_data.core_id == core_id && @@ -1692,12 +1692,12 @@ int msm_vidc_decide_core_and_power_mode_iris1(struct msm_vidc_inst *inst) cur_inst_lp_load = (msm_comm_get_inst_load(inst, LOAD_CALC_NO_QUIRKS) * lp_cycles)/inst->clk_data.work_route; - dprintk(VIDC_DBG, "Core 0 RT Load = %d Core 1 RT Load = %d\n", + dprintk(VIDC_HIGH, "Core 0 RT Load = %d Core 1 RT Load = %d\n", core0_load, core1_load); - dprintk(VIDC_DBG, "Core 0 RT LP Load = %d Core 1 RT LP Load = %d\n", + dprintk(VIDC_HIGH, "Core 0 RT LP Load = %d Core 1 RT LP Load = %d\n", core0_lp_load, core1_lp_load); - dprintk(VIDC_DBG, "Max Load = %lu\n", max_freq); - dprintk(VIDC_DBG, "Current Load = %d Current LP Load = %d\n", + dprintk(VIDC_HIGH, "Max Load = %lu\n", max_freq); + dprintk(VIDC_HIGH, "Current Load = %d Current LP Load = %d\n", current_inst_load, cur_inst_lp_load); if (inst->session_type == MSM_VIDC_ENCODER) { @@ -1728,14 +1728,14 @@ int msm_vidc_decide_core_and_power_mode_iris1(struct msm_vidc_inst *inst) if (current_inst_load + min_load < max_freq) { inst->clk_data.core_id = min_core_id; - dprintk(VIDC_DBG, + dprintk(VIDC_HIGH, "Selected normally : Core ID = %d\n", inst->clk_data.core_id); msm_vidc_power_save_mode_enable(inst, false); } else if (cur_inst_lp_load + min_load < max_freq) { /* Move current instance to LP and return */ inst->clk_data.core_id = min_core_id; - dprintk(VIDC_DBG, + dprintk(VIDC_HIGH, "Selected by moving current to LP : Core ID = %d\n", inst->clk_data.core_id); msm_vidc_power_save_mode_enable(inst, true); @@ -1743,7 +1743,7 @@ int msm_vidc_decide_core_and_power_mode_iris1(struct msm_vidc_inst *inst) } else if (cur_inst_lp_load + min_lp_load < max_freq) { /* Move all instances to LP mode and return */ inst->clk_data.core_id = min_lp_core_id; - dprintk(VIDC_DBG, + dprintk(VIDC_HIGH, "Moved all inst's to LP: Core ID = %d\n", inst->clk_data.core_id); msm_vidc_move_core_to_power_save_mode(core, min_lp_core_id); @@ -1756,7 +1756,7 @@ int msm_vidc_decide_core_and_power_mode_iris1(struct msm_vidc_inst *inst) decision_done: core_info.video_core_enable_mask = inst->clk_data.core_id; - dprintk(VIDC_DBG, + dprintk(VIDC_HIGH, "Core Enable Mask %d\n", core_info.video_core_enable_mask); rc = call_hfi_op(hdev, session_set_property, @@ -1764,7 +1764,7 @@ decision_done: HFI_PROPERTY_CONFIG_VIDEOCORES_USAGE, &core_info, sizeof(core_info)); if (rc) - dprintk(VIDC_WARN, + dprintk(VIDC_ERR, " Failed to configure CORE ID %pK\n", inst); rc = msm_comm_scale_clocks_and_bus(inst); @@ -1802,7 +1802,7 @@ void msm_print_core_status(struct msm_vidc_core *core, u32 core_id) struct v4l2_format *out_f; struct v4l2_format *inp_f; - dprintk(VIDC_PROF, "Instances running on core %u", core_id); + dprintk(VIDC_PERF, "Instances running on core %u", core_id); mutex_lock(&core->lock); list_for_each_entry(inst, &core->instances, list) { @@ -1811,7 +1811,7 @@ void msm_print_core_status(struct msm_vidc_core *core, u32 core_id) continue; out_f = &inst->fmts[OUTPUT_PORT].v4l2_fmt; inp_f = &inst->fmts[INPUT_PORT].v4l2_fmt; - dprintk(VIDC_PROF, + dprintk(VIDC_PERF, "inst %pK (%4ux%4u) to (%4ux%4u) %3u %s %s %s %s %lu\n", inst, inp_f->fmt.pix_mp.width, diff --git a/msm/vidc/msm_vidc_common.c b/msm/vidc/msm_vidc_common.c index 39e445312fa6..4a7d60ba5e88 100644 --- a/msm/vidc/msm_vidc_common.c +++ b/msm/vidc/msm_vidc_common.c @@ -264,7 +264,7 @@ int msm_comm_hfi_to_v4l2(int id, int value) } unknown_value: - dprintk(VIDC_WARN, "Unknown control (%x, %d)\n", id, value); + dprintk(VIDC_ERR, "Unknown control (%x, %d)\n", id, value); return -EINVAL; } @@ -318,7 +318,7 @@ static int h264_level_v4l2_to_hfi(int value) } unknown_value: - dprintk(VIDC_WARN, "Unknown level (%d)\n", value); + dprintk(VIDC_ERR, "Unknown level (%d)\n", value); return -EINVAL; } @@ -358,7 +358,7 @@ static int hevc_level_v4l2_to_hfi(int value) } unknown_value: - dprintk(VIDC_WARN, "Unknown level (%d)\n", value); + dprintk(VIDC_ERR, "Unknown level (%d)\n", value); return -EINVAL; } @@ -396,7 +396,7 @@ static int vp9_level_v4l2_to_hfi(int value) } unknown_value: - dprintk(VIDC_WARN, "Unknown level (%d)\n", value); + dprintk(VIDC_ERR, "Unknown level (%d)\n", value); return -EINVAL; } @@ -522,7 +522,7 @@ int msm_comm_v4l2_to_hfi(int id, int value) return HFI_H264_DB_MODE_ALL_BOUNDARY; } } - dprintk(VIDC_WARN, "Unknown control (%x, %d)\n", id, value); + dprintk(VIDC_ERR, "Unknown control (%x, %d)\n", id, value); return -EINVAL; } @@ -542,7 +542,7 @@ int msm_comm_get_v4l2_profile(int fourcc, int profile) case V4L2_PIX_FMT_MPEG2: return 0; default: - dprintk(VIDC_WARN, "Unknown codec id %x\n", fourcc); + dprintk(VIDC_ERR, "Unknown codec id %x\n", fourcc); return 0; } } @@ -567,7 +567,7 @@ int msm_comm_get_v4l2_level(int fourcc, int level) case V4L2_PIX_FMT_MPEG2: return 0; default: - dprintk(VIDC_WARN, "Unknown codec id %x\n", fourcc); + dprintk(VIDC_ERR, "Unknown codec id %x\n", fourcc); return 0; } } @@ -662,7 +662,7 @@ int msm_comm_ctrl_init(struct msm_vidc_inst *inst, /* Construct a super cluster of all controls */ inst->cluster = get_super_cluster(inst, num_ctrls); if (!inst->cluster) { - dprintk(VIDC_WARN, + dprintk(VIDC_ERR, "Failed to setup super cluster\n"); return -EINVAL; } @@ -695,7 +695,7 @@ int msm_comm_set_stream_output_mode(struct msm_vidc_inst *inst, } if (!is_decode_session(inst)) { - dprintk(VIDC_DBG, "%s: not a decode session %x\n", + dprintk(VIDC_HIGH, "%s: not a decode session %x\n", __func__, hash32_ptr(inst->session)); return -EINVAL; } @@ -790,7 +790,7 @@ int msm_comm_get_inst_load(struct msm_vidc_inst *inst, if (!is_realtime_session(inst) && (quirks & LOAD_CALC_IGNORE_NON_REALTIME_LOAD)) { if (!(inst->clk_data.frame_rate >> 16)) { - dprintk(VIDC_INFO, "instance:%pK fps = 0\n", inst); + dprintk(VIDC_LOW, "instance:%pK fps = 0\n", inst); load = 0; } else { load = msm_comm_get_mbs_per_sec(inst) / @@ -1003,7 +1003,7 @@ const struct msm_vidc_format_desc *msm_comm_get_pixel_fmt_index( k++; } if (i == size) { - dprintk(VIDC_INFO, "Format not found\n"); + dprintk(VIDC_HIGH, "Format not found\n"); return NULL; } return &fmt[i]; @@ -1022,7 +1022,7 @@ struct msm_vidc_format_desc *msm_comm_get_pixel_fmt_fourcc( break; } if (i == size) { - dprintk(VIDC_INFO, "Format not found\n"); + dprintk(VIDC_HIGH, "Format not found\n"); return NULL; } return &fmt[i]; @@ -1042,7 +1042,7 @@ struct msm_vidc_format_constraint *msm_comm_get_pixel_fmt_constraints( break; } if (i == size) { - dprintk(VIDC_INFO, "Format constraint not found.\n"); + dprintk(VIDC_HIGH, "Format constraint not found.\n"); return NULL; } return &fmt[i]; @@ -1093,7 +1093,7 @@ static int msm_vidc_capabilities(struct msm_vidc_core *core) platform_caps = core->resources.codec_caps; num_platform_caps = core->resources.codec_caps_count; - dprintk(VIDC_DBG, "%s: num caps %d\n", __func__, num_platform_caps); + dprintk(VIDC_HIGH, "%s: num caps %d\n", __func__, num_platform_caps); /* loop over each platform capability */ for (i = 0; i < num_platform_caps; i++) { /* select matching core codec and update it */ @@ -1131,7 +1131,7 @@ static void handle_sys_init_done(enum hal_command_response cmd, void *data) dprintk(VIDC_ERR, "Wrong device_id received\n"); return; } - dprintk(VIDC_DBG, "%s: core %pK\n", __func__, core); + dprintk(VIDC_HIGH, "%s: core %pK\n", __func__, core); complete(&(core->completions[SYS_MSG_INDEX(cmd)])); } @@ -1209,7 +1209,7 @@ static void handle_session_release_buf_done(enum hal_command_response cmd, inst = get_inst(get_vidc_core(response->device_id), response->session_id); if (!inst) { - dprintk(VIDC_WARN, "Got a response for an inactive session\n"); + dprintk(VIDC_ERR, "Got a response for an inactive session\n"); return; } @@ -1220,7 +1220,7 @@ static void handle_session_release_buf_done(enum hal_command_response cmd, list_for_each_safe(ptr, next, &inst->scratchbufs.list) { buf = list_entry(ptr, struct internal_buf, list); if (address == buf->smem.device_addr) { - dprintk(VIDC_DBG, "releasing scratch: %x\n", + dprintk(VIDC_HIGH, "releasing scratch: %x\n", buf->smem.device_addr); buf_found = true; } @@ -1231,7 +1231,7 @@ static void handle_session_release_buf_done(enum hal_command_response cmd, list_for_each_safe(ptr, next, &inst->persistbufs.list) { buf = list_entry(ptr, struct internal_buf, list); if (address == buf->smem.device_addr) { - dprintk(VIDC_DBG, "releasing persist: %x\n", + dprintk(VIDC_HIGH, "releasing persist: %x\n", buf->smem.device_addr); buf_found = true; } @@ -1276,12 +1276,12 @@ void change_inst_state(struct msm_vidc_inst *inst, enum instance_state state) } mutex_lock(&inst->lock); if (inst->state == MSM_VIDC_CORE_INVALID) { - dprintk(VIDC_DBG, + dprintk(VIDC_HIGH, "Inst: %pK is in bad state can't change state to %d\n", inst, state); goto exit; } - dprintk(VIDC_DBG, "Moved inst: %pK from state: %d to state: %d\n", + dprintk(VIDC_HIGH, "Moved inst: %pK from state: %d to state: %d\n", inst, inst->state, state); inst->state = state; exit: @@ -1338,11 +1338,11 @@ static int wait_for_state(struct msm_vidc_inst *inst, int rc = 0; if (IS_ALREADY_IN_STATE(flipped_state, desired_state)) { - dprintk(VIDC_INFO, "inst: %pK is already in state: %d\n", + dprintk(VIDC_HIGH, "inst: %pK is already in state: %d\n", inst, inst->state); goto err_same_state; } - dprintk(VIDC_DBG, "Waiting for hal_cmd: %d\n", hal_cmd); + dprintk(VIDC_HIGH, "Waiting for hal_cmd: %d\n", hal_cmd); rc = wait_for_sess_signal_receipt(inst, hal_cmd); if (!rc) change_inst_state(inst, desired_state); @@ -1375,7 +1375,7 @@ static void msm_comm_generate_max_clients_error(struct msm_vidc_inst *inst) static void print_cap(const char *type, struct hal_capability_supported *cap) { - dprintk(VIDC_DBG, + dprintk(VIDC_HIGH, "%-24s: %-10d %-10d %-10d %-10d\n", type, cap->min, cap->max, cap->step_size, cap->default_value); } @@ -1413,7 +1413,7 @@ static int msm_vidc_comm_update_ctrl(struct msm_vidc_inst *inst, __func__, ctrl->name, cap->default_value); goto error; } - dprintk(VIDC_DBG, + dprintk(VIDC_HIGH, "Updated control: %s: min %lld, max %lld, step %lld, default value = %lld\n", ctrl->name, ctrl->minimum, ctrl->maximum, ctrl->step, ctrl->default_value); @@ -1460,7 +1460,7 @@ static void handle_session_init_done(enum hal_command_response cmd, void *data) response->session_id); if (!inst) { - dprintk(VIDC_WARN, "Got a response for an inactive session\n"); + dprintk(VIDC_ERR, "Got a response for an inactive session\n"); return; } @@ -1472,7 +1472,7 @@ static void handle_session_init_done(enum hal_command_response cmd, void *data) } if (inst->session_type == MSM_VIDC_CVP) { - dprintk(VIDC_DBG, "%s: cvp session %#x\n", + dprintk(VIDC_HIGH, "%s: cvp session %#x\n", __func__, hash32_ptr(inst->session)); signal_session_msg_receipt(cmd, inst); put_inst(inst); @@ -1499,13 +1499,13 @@ static void handle_session_init_done(enum hal_command_response cmd, void *data) goto error; } - dprintk(VIDC_DBG, + dprintk(VIDC_HIGH, "%s: capabilities for domain %#x codec %#x\n", __func__, capability->domain, capability->codec); memcpy(&inst->capability, capability, sizeof(struct msm_vidc_capability)); - dprintk(VIDC_DBG, + dprintk(VIDC_HIGH, "Capability type : min max step_size default_value\n"); print_cap("width", &inst->capability.cap[CAP_FRAME_WIDTH]); print_cap("height", &inst->capability.cap[CAP_FRAME_HEIGHT]); @@ -1571,14 +1571,14 @@ static void handle_event_change(enum hal_command_response cmd, void *data) u32 codec; if (!event_notify) { - dprintk(VIDC_WARN, "Got an empty event from hfi\n"); + dprintk(VIDC_ERR, "Got an empty event from hfi\n"); return; } inst = get_inst(get_vidc_core(event_notify->device_id), event_notify->session_id); if (!inst || !inst->core || !inst->core->device) { - dprintk(VIDC_WARN, "Got a response for an inactive session\n"); + dprintk(VIDC_ERR, "Got a response for an inactive session\n"); goto err_bad_event; } hdev = inst->core->device; @@ -1593,8 +1593,8 @@ static void handle_event_change(enum hal_command_response cmd, void *data) */ bool event_fields_changed = false; - dprintk(VIDC_DBG, "V4L2_EVENT_SEQ_CHANGED_SUFFICIENT\n"); - dprintk(VIDC_DBG, + dprintk(VIDC_HIGH, "V4L2_EVENT_SEQ_CHANGED_SUFFICIENT\n"); + dprintk(VIDC_HIGH, "event_notify->height = %d event_notify->width = %d\n", event_notify->height, event_notify->width); @@ -1616,7 +1616,7 @@ static void handle_event_change(enum hal_command_response cmd, void *data) if (event_fields_changed) { event = V4L2_EVENT_SEQ_CHANGED_INSUFFICIENT; } else { - dprintk(VIDC_DBG, + dprintk(VIDC_HIGH, "No parameter change continue session\n"); rc = call_hfi_op(hdev, session_continue, (void *)inst->session); @@ -1636,7 +1636,7 @@ static void handle_event_change(enum hal_command_response cmd, void *data) struct msm_vidc_buffer *mbuf; u32 planes[VIDEO_MAX_PLANES] = {0}; - dprintk(VIDC_DBG, + dprintk(VIDC_LOW, "%s: inst: %pK data_buffer: %x extradata_buffer: %x\n", __func__, inst, event_notify->packet_buffer, event_notify->extra_data_buffer); @@ -1711,17 +1711,17 @@ static void handle_event_change(enum hal_command_response cmd, void *data) ptr[10] = msm_comm_get_v4l2_level(codec, event_notify->level); - dprintk(VIDC_DBG, + dprintk(VIDC_HIGH, "Event payload: height = %u width = %u profile = %u level = %u\n", event_notify->height, event_notify->width, ptr[9], ptr[10]); - dprintk(VIDC_DBG, + dprintk(VIDC_HIGH, "Event payload: bit_depth = %u pic_struct = %u colour_space = %u\n", event_notify->bit_depth, event_notify->pic_struct, event_notify->colour_space); - dprintk(VIDC_DBG, + dprintk(VIDC_HIGH, "Event payload: CROP top = %u left = %u Height = %u Width = %u\n", event_notify->crop_data.top, event_notify->crop_data.left, @@ -1740,14 +1740,14 @@ static void handle_event_change(enum hal_command_response cmd, void *data) fmt->count_min = event_notify->capture_buf_count; fmt->count_min_host = fmt->count_min + extra_buff_count; - dprintk(VIDC_DBG, "%s: buffer[%d] count: min %d min_host %d\n", + dprintk(VIDC_HIGH, "%s: buffer[%d] count: min %d min_host %d\n", __func__, HAL_BUFFER_OUTPUT, fmt->count_min, fmt->count_min_host); mutex_unlock(&inst->lock); if (event == V4L2_EVENT_SEQ_CHANGED_INSUFFICIENT) { - dprintk(VIDC_DBG, "V4L2_EVENT_SEQ_CHANGED_INSUFFICIENT\n"); + dprintk(VIDC_HIGH, "V4L2_EVENT_SEQ_CHANGED_INSUFFICIENT\n"); } rc = msm_vidc_check_session_supported(inst); @@ -1781,7 +1781,7 @@ static void handle_session_prop_info(enum hal_command_response cmd, void *data) inst = get_inst(get_vidc_core(response->device_id), response->session_id); if (!inst) { - dprintk(VIDC_WARN, "Got a response for an inactive session\n"); + dprintk(VIDC_ERR, "Got a response for an inactive session\n"); return; } @@ -1822,7 +1822,7 @@ static void handle_load_resource_done(enum hal_command_response cmd, void *data) inst = get_inst(get_vidc_core(response->device_id), response->session_id); if (!inst) { - dprintk(VIDC_WARN, "Got a response for an inactive session\n"); + dprintk(VIDC_ERR, "Got a response for an inactive session\n"); return; } @@ -1849,7 +1849,7 @@ static void handle_start_done(enum hal_command_response cmd, void *data) inst = get_inst(get_vidc_core(response->device_id), response->session_id); if (!inst) { - dprintk(VIDC_WARN, "Got a response for an inactive session\n"); + dprintk(VIDC_ERR, "Got a response for an inactive session\n"); return; } @@ -1870,7 +1870,7 @@ static void handle_stop_done(enum hal_command_response cmd, void *data) inst = get_inst(get_vidc_core(response->device_id), response->session_id); if (!inst) { - dprintk(VIDC_WARN, "Got a response for an inactive session\n"); + dprintk(VIDC_ERR, "Got a response for an inactive session\n"); return; } @@ -1892,7 +1892,7 @@ static void handle_release_res_done(enum hal_command_response cmd, void *data) inst = get_inst(get_vidc_core(response->device_id), response->session_id); if (!inst) { - dprintk(VIDC_WARN, "Got a response for an inactive session\n"); + dprintk(VIDC_ERR, "Got a response for an inactive session\n"); return; } @@ -1910,14 +1910,14 @@ void msm_comm_validate_output_buffers(struct msm_vidc_inst *inst) mutex_lock(&inst->outputbufs.lock); if (list_empty(&inst->outputbufs.list)) { - dprintk(VIDC_DBG, "%s: no OUTPUT buffers allocated\n", + dprintk(VIDC_HIGH, "%s: no OUTPUT buffers allocated\n", __func__); mutex_unlock(&inst->outputbufs.lock); return; } list_for_each_entry(binfo, &inst->outputbufs.list, list) { if (binfo->buffer_ownership != DRIVER) { - dprintk(VIDC_DBG, + dprintk(VIDC_HIGH, "This buffer is with FW %x\n", binfo->smem.device_addr); continue; @@ -1928,7 +1928,7 @@ void msm_comm_validate_output_buffers(struct msm_vidc_inst *inst) /* Only minimum number of DPBs are allocated */ if (buffers_owned_by_driver != fmt->count_min) { - dprintk(VIDC_WARN, + dprintk(VIDC_ERR, "OUTPUT Buffer count mismatch %d of %d\n", buffers_owned_by_driver, fmt->count_min); @@ -1993,7 +1993,7 @@ static void handle_session_flush(enum hal_command_response cmd, void *data) inst = get_inst(get_vidc_core(response->device_id), response->session_id); if (!inst) { - dprintk(VIDC_WARN, "Got a response for an inactive session\n"); + dprintk(VIDC_ERR, "Got a response for an inactive session\n"); return; } @@ -2035,7 +2035,7 @@ static void handle_session_flush(enum hal_command_response cmd, void *data) goto exit; } - dprintk(VIDC_DBG, + dprintk(VIDC_HIGH, "Notify flush complete, flush_type: %x\n", flush_type); v4l2_event_queue_fh(&inst->event_handler, &flush_event); @@ -2060,7 +2060,7 @@ static void handle_session_error(enum hal_command_response cmd, void *data) inst = get_inst(get_vidc_core(response->device_id), response->session_id); if (!inst) { - dprintk(VIDC_WARN, "Got a response for an inactive session\n"); + dprintk(VIDC_ERR, "Got a response for an inactive session\n"); return; } @@ -2069,7 +2069,7 @@ static void handle_session_error(enum hal_command_response cmd, void *data) inst, hash32_ptr(inst->session)); if (response->status == VIDC_ERR_MAX_CLIENTS) { - dprintk(VIDC_WARN, "Too many clients, rejecting %pK", inst); + dprintk(VIDC_ERR, "Too many clients, rejecting %pK", inst); event = V4L2_EVENT_MSM_VIDC_MAX_CLIENTS; /* @@ -2081,10 +2081,10 @@ static void handle_session_error(enum hal_command_response cmd, void *data) msm_comm_session_clean(inst); } else if (response->status == VIDC_ERR_NOT_SUPPORTED) { - dprintk(VIDC_WARN, "Unsupported bitstream in %pK", inst); + dprintk(VIDC_ERR, "Unsupported bitstream in %pK", inst); event = V4L2_EVENT_MSM_VIDC_HW_UNSUPPORTED; } else { - dprintk(VIDC_WARN, "Unknown session error (%d) for %pK\n", + dprintk(VIDC_ERR, "Unknown session error (%d) for %pK\n", response->status, inst); event = V4L2_EVENT_MSM_VIDC_SYS_ERROR; } @@ -2104,14 +2104,14 @@ static void msm_comm_clean_notify_client(struct msm_vidc_core *core) return; } - dprintk(VIDC_WARN, "%s: Core %pK\n", __func__, core); + dprintk(VIDC_ERR, "%s: Core %pK\n", __func__, core); mutex_lock(&core->lock); list_for_each_entry(inst, &core->instances, list) { mutex_lock(&inst->lock); inst->state = MSM_VIDC_CORE_INVALID; mutex_unlock(&inst->lock); - dprintk(VIDC_WARN, + dprintk(VIDC_ERR, "%s Send sys error for inst %pK\n", __func__, inst); msm_vidc_queue_v4l2_event(inst, V4L2_EVENT_MSM_VIDC_SYS_ERROR); @@ -2151,11 +2151,11 @@ static void handle_sys_error(enum hal_command_response cmd, void *data) return; } - dprintk(VIDC_WARN, "SYS_ERROR received for core %pK\n", core); + dprintk(VIDC_ERR, "SYS_ERROR received for core %pK\n", core); msm_vidc_noc_error_info(core); call_hfi_op(hdev, flush_debug_queue, hdev->hfi_device_data); list_for_each_entry(inst, &core->instances, list) { - dprintk(VIDC_WARN, + dprintk(VIDC_ERR, "%s: Send sys error for inst %pK\n", __func__, inst); change_inst_state(inst, MSM_VIDC_CORE_INVALID); msm_vidc_queue_v4l2_event(inst, V4L2_EVENT_MSM_VIDC_SYS_ERROR); @@ -2166,11 +2166,11 @@ static void handle_sys_error(enum hal_command_response cmd, void *data) /* handle the hw error before core released to get full debug info */ msm_vidc_handle_hw_error(core); if (response->status == VIDC_ERR_NOC_ERROR) { - dprintk(VIDC_WARN, "Got NOC error"); + dprintk(VIDC_ERR, "Got NOC error"); MSM_VIDC_ERROR(true); } - dprintk(VIDC_DBG, "Calling core_release\n"); + dprintk(VIDC_ERR, "Calling core_release\n"); rc = call_hfi_op(hdev, core_release, hdev->hfi_device_data); if (rc) { dprintk(VIDC_ERR, "core_release failed\n"); @@ -2180,7 +2180,7 @@ static void handle_sys_error(enum hal_command_response cmd, void *data) core->state = VIDC_CORE_UNINIT; mutex_unlock(&core->lock); - dprintk(VIDC_WARN, "SYS_ERROR handled.\n"); + dprintk(VIDC_ERR, "SYS_ERROR handled.\n"); } void msm_comm_session_clean(struct msm_vidc_inst *inst) @@ -2193,14 +2193,14 @@ void msm_comm_session_clean(struct msm_vidc_inst *inst) return; } if (!inst->session) { - dprintk(VIDC_DBG, "%s: inst %pK session already cleaned\n", + dprintk(VIDC_HIGH, "%s: inst %pK session already cleaned\n", __func__, inst); return; } hdev = inst->core->device; mutex_lock(&inst->lock); - dprintk(VIDC_DBG, "%s: inst %pK\n", __func__, inst); + dprintk(VIDC_HIGH, "%s: inst %pK\n", __func__, inst); rc = call_hfi_op(hdev, session_clean, (void *)inst->session); if (rc) { @@ -2225,7 +2225,7 @@ static void handle_session_close(enum hal_command_response cmd, void *data) inst = get_inst(get_vidc_core(response->device_id), response->session_id); if (!inst) { - dprintk(VIDC_WARN, "Got a response for an inactive session\n"); + dprintk(VIDC_ERR, "Got a response for an inactive session\n"); return; } @@ -2407,14 +2407,14 @@ static void handle_ebd(enum hal_command_response cmd, void *data) inst = get_inst(get_vidc_core(response->device_id), response->session_id); if (!inst) { - dprintk(VIDC_WARN, "Got a response for an inactive session\n"); + dprintk(VIDC_ERR, "Got a response for an inactive session\n"); return; } empty_buf_done = (struct vidc_hal_ebd *)&response->input_done; /* If this is internal EOS buffer, handle it in driver */ if (is_eos_buffer(inst, empty_buf_done->packet_buffer)) { - dprintk(VIDC_DBG, "Received EOS buffer 0x%x\n", + dprintk(VIDC_HIGH, "Received EOS buffer 0x%x\n", empty_buf_done->packet_buffer); goto exit; } @@ -2435,18 +2435,18 @@ static void handle_ebd(enum hal_command_response cmd, void *data) vb->planes[0].bytesused = response->input_done.filled_len; if (vb->planes[0].bytesused > vb->planes[0].length) - dprintk(VIDC_INFO, "bytesused overflow length\n"); + dprintk(VIDC_LOW, "bytesused overflow length\n"); vb->planes[0].data_offset = response->input_done.offset; if (vb->planes[0].data_offset > vb->planes[0].length) - dprintk(VIDC_INFO, "data_offset overflow length\n"); + dprintk(VIDC_LOW, "data_offset overflow length\n"); if (empty_buf_done->status == VIDC_ERR_NOT_SUPPORTED) { - dprintk(VIDC_INFO, "Failed : Unsupported input stream\n"); + dprintk(VIDC_LOW, "Failed : Unsupported input stream\n"); mbuf->vvb.flags |= V4L2_BUF_INPUT_UNSUPPORTED; } if (empty_buf_done->status == VIDC_ERR_BITSTREAM_ERR) { - dprintk(VIDC_INFO, "Failed : Corrupted input stream\n"); + dprintk(VIDC_LOW, "Failed : Corrupted input stream\n"); mbuf->vvb.flags |= V4L2_BUF_FLAG_DATA_CORRUPT; } if (empty_buf_done->flags & HAL_BUFFERFLAG_SYNCFRAME) @@ -2538,7 +2538,7 @@ static void handle_fbd(enum hal_command_response cmd, void *data) inst = get_inst(get_vidc_core(response->device_id), response->session_id); if (!inst) { - dprintk(VIDC_WARN, "Got a response for an inactive session\n"); + dprintk(VIDC_ERR, "Got a response for an inactive session\n"); return; } @@ -2571,13 +2571,13 @@ static void handle_fbd(enum hal_command_response cmd, void *data) fill_buf_done->filled_len1 = 0; vb->planes[0].bytesused = fill_buf_done->filled_len1; if (vb->planes[0].bytesused > vb->planes[0].length) - dprintk(VIDC_INFO, + dprintk(VIDC_LOW, "fbd:Overflow bytesused = %d; length = %d\n", vb->planes[0].bytesused, vb->planes[0].length); vb->planes[0].data_offset = fill_buf_done->offset1; if (vb->planes[0].data_offset > vb->planes[0].length) - dprintk(VIDC_INFO, + dprintk(VIDC_LOW, "fbd:Overflow data_offset = %d; length = %d\n", vb->planes[0].data_offset, vb->planes[0].length); @@ -2648,7 +2648,7 @@ exit: void handle_cmd_response(enum hal_command_response cmd, void *data) { - dprintk(VIDC_DBG, "Command response = %d\n", cmd); + dprintk(VIDC_LOW, "Command response = %d\n", cmd); switch (cmd) { case HAL_SYS_INIT_DONE: handle_sys_init_done(cmd, data); @@ -2707,7 +2707,7 @@ void handle_cmd_response(enum hal_command_response cmd, void *data) handle_session_unregister_buffer_done(cmd, data); break; default: - dprintk(VIDC_DBG, "response unhandled: %d\n", cmd); + dprintk(VIDC_LOW, "response unhandled: %d\n", cmd); break; } } @@ -2750,7 +2750,7 @@ static bool is_thermal_permissible(struct msm_vidc_core *core) return true; if (msm_vidc_thermal_mitigation_disabled) { - dprintk(VIDC_DBG, + dprintk(VIDC_HIGH, "Thermal mitigation not enabled. debugfs %d\n", msm_vidc_thermal_mitigation_disabled); return true; @@ -2760,7 +2760,7 @@ static bool is_thermal_permissible(struct msm_vidc_core *core) freq = core->curr_freq; is_turbo = is_core_turbo(core, freq); - dprintk(VIDC_DBG, + dprintk(VIDC_HIGH, "Core freq %ld Thermal level %d Turbo mode %d\n", freq, tl, is_turbo); @@ -2809,7 +2809,7 @@ static int msm_comm_session_abort(struct msm_vidc_inst *inst) hdev = inst->core->device; abort_completion = SESSION_MSG_INDEX(HAL_SESSION_ABORT_DONE); - dprintk(VIDC_WARN, "%s: inst %pK session %x\n", __func__, + dprintk(VIDC_ERR, "%s: inst %pK session %x\n", __func__, inst, hash32_ptr(inst->session)); rc = call_hfi_op(hdev, session_abort, (void *)inst->session); if (rc) { @@ -2850,7 +2850,7 @@ static void handle_thermal_event(struct msm_vidc_core *core) mutex_unlock(&core->lock); if (inst->state >= MSM_VIDC_OPEN_DONE && inst->state < MSM_VIDC_CLOSE_DONE) { - dprintk(VIDC_WARN, "%s: abort inst %pK\n", + dprintk(VIDC_ERR, "%s: abort inst %pK\n", __func__, inst); rc = msm_comm_session_abort(inst); if (rc) { @@ -2860,7 +2860,7 @@ static void handle_thermal_event(struct msm_vidc_core *core) goto err_sess_abort; } change_inst_state(inst, MSM_VIDC_CORE_INVALID); - dprintk(VIDC_WARN, + dprintk(VIDC_ERR, "%s Send sys error for inst %pK\n", __func__, inst); msm_vidc_queue_v4l2_event(inst, @@ -2883,7 +2883,7 @@ void msm_comm_handle_thermal_event(void) list_for_each_entry(core, &vidc_driver->cores, list) { if (!is_thermal_permissible(core)) { - dprintk(VIDC_WARN, + dprintk(VIDC_ERR, "Thermal level critical, stop all active sessions!\n"); handle_thermal_event(core); } @@ -2896,11 +2896,11 @@ int msm_comm_check_core_init(struct msm_vidc_core *core) mutex_lock(&core->lock); if (core->state >= VIDC_CORE_INIT_DONE) { - dprintk(VIDC_INFO, "Video core: %d is already in state: %d\n", + dprintk(VIDC_HIGH, "Video core: %d is already in state: %d\n", core->id, core->state); goto exit; } - dprintk(VIDC_DBG, "Waiting for SYS_INIT_DONE\n"); + dprintk(VIDC_HIGH, "Waiting for SYS_INIT_DONE\n"); rc = wait_for_completion_timeout( &core->completions[SYS_MSG_INDEX(HAL_SYS_INIT_DONE)], msecs_to_jiffies(core->resources.msm_vidc_hw_rsp_timeout)); @@ -2913,7 +2913,7 @@ int msm_comm_check_core_init(struct msm_vidc_core *core) core->state = VIDC_CORE_INIT_DONE; rc = 0; } - dprintk(VIDC_DBG, "SYS_INIT_DONE!!!\n"); + dprintk(VIDC_HIGH, "SYS_INIT_DONE!!!\n"); exit: mutex_unlock(&core->lock); return rc; @@ -2946,11 +2946,11 @@ static int msm_comm_init_core(struct msm_vidc_inst *inst) hdev = core->device; mutex_lock(&core->lock); if (core->state >= VIDC_CORE_INIT) { - dprintk(VIDC_INFO, "Video core: %d is already in state: %d\n", + dprintk(VIDC_HIGH, "Video core: %d is already in state: %d\n", core->id, core->state); goto core_already_inited; } - dprintk(VIDC_DBG, "%s: core %pK\n", __func__, core); + dprintk(VIDC_HIGH, "%s: core %pK\n", __func__, core); rc = call_hfi_op(hdev, core_init, hdev->hfi_device_data); if (rc) { dprintk(VIDC_ERR, "Failed to init core, id = %d\n", @@ -2967,7 +2967,7 @@ static int msm_comm_init_core(struct msm_vidc_inst *inst) core->resources.max_secure_inst_count ? core->resources.max_secure_inst_count : core->resources.max_inst_count; - dprintk(VIDC_DBG, "%s: codecs count %d, max inst count %d\n", + dprintk(VIDC_HIGH, "%s: codecs count %d, max inst count %d\n", __func__, core->resources.codecs_count, core->resources.max_inst_count); if (!core->resources.codecs || !core->resources.codecs_count) { @@ -2986,7 +2986,7 @@ static int msm_comm_init_core(struct msm_vidc_inst *inst) goto fail_core_init; } } else { - dprintk(VIDC_WARN, + dprintk(VIDC_ERR, "%s: capabilities memory is expected to be freed\n", __func__); } @@ -3004,7 +3004,7 @@ static int msm_comm_init_core(struct msm_vidc_inst *inst) core->capabilities = NULL; goto fail_core_init; } - dprintk(VIDC_DBG, "%s: done\n", __func__); + dprintk(VIDC_HIGH, "%s: done\n", __func__); core_already_inited: change_inst_state(inst, MSM_VIDC_CORE_INIT); mutex_unlock(&core->lock); @@ -3033,7 +3033,7 @@ static int msm_vidc_deinit_core(struct msm_vidc_inst *inst) mutex_lock(&core->lock); if (core->state == VIDC_CORE_UNINIT) { - dprintk(VIDC_INFO, "Video core: %d is already in state: %d\n", + dprintk(VIDC_HIGH, "Video core: %d is already in state: %d\n", core->id, core->state); goto core_already_uninited; } @@ -3056,7 +3056,7 @@ static int msm_vidc_deinit_core(struct msm_vidc_inst *inst) msecs_to_jiffies(core->state == VIDC_CORE_INIT_DONE ? core->resources.msm_vidc_firmware_unload_delay : 0)); - dprintk(VIDC_DBG, "firmware unload delayed by %u ms\n", + dprintk(VIDC_HIGH, "firmware unload delayed by %u ms\n", core->state == VIDC_CORE_INIT_DONE ? core->resources.msm_vidc_firmware_unload_delay : 0); } @@ -3078,7 +3078,7 @@ static int msm_comm_session_init_done(int flipped_state, { int rc; - dprintk(VIDC_DBG, "inst %pK: waiting for session init done\n", inst); + dprintk(VIDC_HIGH, "inst %pK: waiting for session init done\n", inst); rc = wait_for_state(inst, flipped_state, MSM_VIDC_OPEN_DONE, HAL_SESSION_INIT_DONE); if (rc) { @@ -3105,7 +3105,7 @@ static int msm_comm_session_init(int flipped_state, hdev = inst->core->device; if (IS_ALREADY_IN_STATE(flipped_state, MSM_VIDC_OPEN)) { - dprintk(VIDC_INFO, "inst: %pK is already in state: %d\n", + dprintk(VIDC_HIGH, "inst: %pK is already in state: %d\n", inst, inst->state); goto exit; } @@ -3128,7 +3128,7 @@ static int msm_comm_session_init(int flipped_state, goto exit; } - dprintk(VIDC_DBG, "%s: inst %pK\n", __func__, inst); + dprintk(VIDC_HIGH, "%s: inst %pK\n", __func__, inst); rc = call_hfi_op(hdev, session_init, hdev->hfi_device_data, inst, get_hal_domain(inst->session_type), get_hal_codec(fourcc), @@ -3221,7 +3221,7 @@ static int msm_vidc_load_resources(int flipped_state, return -EINVAL; } if (IS_ALREADY_IN_STATE(flipped_state, MSM_VIDC_LOAD_RESOURCES)) { - dprintk(VIDC_INFO, "inst: %pK is already in state: %d\n", + dprintk(VIDC_HIGH, "inst: %pK is already in state: %d\n", inst, inst->state); goto exit; } @@ -3243,7 +3243,7 @@ static int msm_vidc_load_resources(int flipped_state, } hdev = core->device; - dprintk(VIDC_DBG, "%s: inst %pK\n", __func__, inst); + dprintk(VIDC_HIGH, "%s: inst %pK\n", __func__, inst); rc = call_hfi_op(hdev, session_load_res, (void *) inst->session); if (rc) { dprintk(VIDC_ERR, @@ -3270,13 +3270,13 @@ static int msm_vidc_start(int flipped_state, struct msm_vidc_inst *inst) return -EINVAL; } if (IS_ALREADY_IN_STATE(flipped_state, MSM_VIDC_START)) { - dprintk(VIDC_INFO, + dprintk(VIDC_HIGH, "inst: %pK is already in state: %d\n", inst, inst->state); goto exit; } hdev = inst->core->device; - dprintk(VIDC_DBG, "%s: inst %pK\n", __func__, inst); + dprintk(VIDC_HIGH, "%s: inst %pK\n", __func__, inst); rc = call_hfi_op(hdev, session_start, (void *) inst->session); if (rc) { dprintk(VIDC_ERR, @@ -3303,13 +3303,13 @@ static int msm_vidc_stop(int flipped_state, struct msm_vidc_inst *inst) return -EINVAL; } if (IS_ALREADY_IN_STATE(flipped_state, MSM_VIDC_STOP)) { - dprintk(VIDC_INFO, + dprintk(VIDC_HIGH, "inst: %pK is already in state: %d\n", inst, inst->state); goto exit; } hdev = inst->core->device; - dprintk(VIDC_DBG, "%s: inst %pK\n", __func__, inst); + dprintk(VIDC_HIGH, "%s: inst %pK\n", __func__, inst); rc = call_hfi_op(hdev, session_stop, (void *) inst->session); if (rc) { dprintk(VIDC_ERR, "%s: inst %pK session_stop failed\n", @@ -3336,13 +3336,13 @@ static int msm_vidc_release_res(int flipped_state, struct msm_vidc_inst *inst) return -EINVAL; } if (IS_ALREADY_IN_STATE(flipped_state, MSM_VIDC_RELEASE_RESOURCES)) { - dprintk(VIDC_INFO, + dprintk(VIDC_HIGH, "inst: %pK is already in state: %d\n", inst, inst->state); goto exit; } hdev = inst->core->device; - dprintk(VIDC_DBG, "%s: inst %pK\n", __func__, inst); + dprintk(VIDC_HIGH, "%s: inst %pK\n", __func__, inst); rc = call_hfi_op(hdev, session_release_res, (void *) inst->session); if (rc) { dprintk(VIDC_ERR, @@ -3365,13 +3365,13 @@ static int msm_comm_session_close(int flipped_state, return -EINVAL; } if (IS_ALREADY_IN_STATE(flipped_state, MSM_VIDC_CLOSE)) { - dprintk(VIDC_INFO, + dprintk(VIDC_HIGH, "inst: %pK is already in state: %d\n", inst, inst->state); goto exit; } hdev = inst->core->device; - dprintk(VIDC_DBG, "%s: inst %pK\n", __func__, inst); + dprintk(VIDC_HIGH, "%s: inst %pK\n", __func__, inst); rc = call_hfi_op(hdev, session_end, (void *) inst->session); if (rc) { dprintk(VIDC_ERR, @@ -3405,7 +3405,7 @@ int msm_comm_suspend(int core_id) rc = call_hfi_op(hdev, suspend, hdev->hfi_device_data); if (rc) - dprintk(VIDC_WARN, "Failed to suspend\n"); + dprintk(VIDC_ERR, "Failed to suspend\n"); return rc; } @@ -3457,7 +3457,7 @@ u32 msm_comm_convert_color_fmt(u32 v4l2_fmt) case V4L2_PIX_FMT_NV12_TP10_UBWC: return COLOR_FMT_NV12_BPP10_UBWC; default: - dprintk(VIDC_WARN, + dprintk(VIDC_ERR, "Invalid v4l2 color fmt FMT : %x, Set default(NV12)", v4l2_fmt); return COLOR_FMT_NV12; @@ -3533,7 +3533,7 @@ static int set_dpb_only_buffers(struct msm_vidc_inst *inst, f = &inst->fmts[OUTPUT_PORT].v4l2_fmt; buffer_size = VENUS_BUFFER_SIZE(hfi_fmt, f->fmt.pix_mp.width, f->fmt.pix_mp.height); - dprintk(VIDC_DBG, + dprintk(VIDC_HIGH, "output: num = %d, size = %d\n", num_buffers, buffer_size); @@ -3548,11 +3548,11 @@ static int set_dpb_only_buffers(struct msm_vidc_inst *inst, if (f->fmt.pix_mp.num_planes == 1 || !f->fmt.pix_mp.plane_fmt[1].sizeimage) { - dprintk(VIDC_DBG, + dprintk(VIDC_HIGH, "This extradata buffer not required, buffer_type: %x\n", buffer_type); } else { - dprintk(VIDC_DBG, + dprintk(VIDC_HIGH, "extradata: num = 1, size = %d\n", f->fmt.pix_mp.plane_fmt[1].sizeimage); inst->dpb_extra_binfo = NULL; @@ -3593,7 +3593,7 @@ static int set_dpb_only_buffers(struct msm_vidc_inst *inst, } binfo->buffer_type = buffer_type; binfo->buffer_ownership = DRIVER; - dprintk(VIDC_DBG, "Output buffer address: %#x\n", + dprintk(VIDC_HIGH, "Output buffer address: %#x\n", binfo->smem.device_addr); if (inst->buffer_mode_set[OUTPUT_PORT] == @@ -3670,7 +3670,7 @@ static int set_internal_buf_on_fw(struct msm_vidc_inst *inst, buffer_info.buffer_type = buffer_type; buffer_info.num_buffers = 1; buffer_info.align_device_addr = handle->device_addr; - dprintk(VIDC_DBG, "%s %s buffer : %x\n", + dprintk(VIDC_HIGH, "%s %s buffer : %x\n", reuse ? "Reusing" : "Allocated", get_buffer_name(buffer_type), buffer_info.align_device_addr); @@ -3724,7 +3724,7 @@ static bool reuse_internal_buffers(struct msm_vidc_inst *inst, } } reused = true; - dprintk(VIDC_DBG, + dprintk(VIDC_HIGH, "Re-using internal buffer type : %d\n", buffer_type); } mutex_unlock(&buf_list->lock); @@ -3794,13 +3794,13 @@ static int set_internal_buffers(struct msm_vidc_inst *inst, internal_buf = get_buff_req_buffer(inst, buffer_type); if (!internal_buf) { - dprintk(VIDC_DBG, + dprintk(VIDC_HIGH, "This internal buffer not required, buffer_type: %x\n", buffer_type); return 0; } - dprintk(VIDC_DBG, "Buffer type %s: num = %d, size = %d\n", + dprintk(VIDC_HIGH, "Buffer type %s: num = %d, size = %d\n", get_buffer_name(buffer_type), internal_buf->buffer_count_actual, internal_buf->buffer_size); @@ -3824,7 +3824,7 @@ int msm_comm_try_state(struct msm_vidc_inst *inst, int state) dprintk(VIDC_ERR, "%s: invalid params %pK", __func__, inst); return -EINVAL; } - dprintk(VIDC_DBG, + dprintk(VIDC_HIGH, "Trying to move inst: %pK (%#x) from: %#x to %#x\n", inst, hash32_ptr(inst->session), inst->state, state); @@ -3837,7 +3837,7 @@ int msm_comm_try_state(struct msm_vidc_inst *inst, int state) } flipped_state = get_flipped_state(inst->state, state); - dprintk(VIDC_DBG, + dprintk(VIDC_HIGH, "inst: %pK (%#x) flipped_state = %#x\n", inst, hash32_ptr(inst->session), flipped_state); switch (flipped_state) { @@ -3881,7 +3881,7 @@ int msm_comm_try_state(struct msm_vidc_inst *inst, int state) HAL_SESSION_STOP_DONE); if (rc || state <= get_flipped_state(inst->state, state)) break; - dprintk(VIDC_DBG, "Moving to Stop Done state\n"); + dprintk(VIDC_HIGH, "Moving to Stop Done state\n"); case MSM_VIDC_RELEASE_RESOURCES: rc = msm_vidc_release_res(flipped_state, inst); if (rc || state <= get_flipped_state(inst->state, state)) @@ -3892,7 +3892,7 @@ int msm_comm_try_state(struct msm_vidc_inst *inst, int state) HAL_SESSION_RELEASE_RESOURCE_DONE); if (rc || state <= get_flipped_state(inst->state, state)) break; - dprintk(VIDC_DBG, + dprintk(VIDC_HIGH, "Moving to release resources done state\n"); case MSM_VIDC_CLOSE: rc = msm_comm_session_close(flipped_state, inst); @@ -3906,7 +3906,7 @@ int msm_comm_try_state(struct msm_vidc_inst *inst, int state) msm_comm_session_clean(inst); case MSM_VIDC_CORE_UNINIT: case MSM_VIDC_CORE_INVALID: - dprintk(VIDC_DBG, "Sending core uninit\n"); + dprintk(VIDC_HIGH, "Sending core uninit\n"); rc = msm_vidc_deinit_core(inst); if (rc || state == get_flipped_state(inst->state, state)) break; @@ -3955,7 +3955,7 @@ int msm_vidc_send_pending_eos_buffers(struct msm_vidc_inst *inst) data.timestamp = 0; data.extradata_addr = data.device_addr; data.extradata_size = 0; - dprintk(VIDC_DBG, "Queueing EOS buffer 0x%x\n", + dprintk(VIDC_HIGH, "Queueing EOS buffer 0x%x\n", data.device_addr); hdev = inst->core->device; @@ -4011,7 +4011,7 @@ int msm_vidc_comm_cmd(void *instance, union msm_v4l2_cmd *cmd) u32 smem_flags = SMEM_UNCACHED; if (inst->state != MSM_VIDC_START_DONE) { - dprintk(VIDC_DBG, + dprintk(VIDC_HIGH, "Inst = %pK is not ready for EOS\n", inst); break; } @@ -4265,7 +4265,7 @@ static int msm_comm_qbuf_in_rbr(struct msm_vidc_inst *inst, if (rc) dprintk(VIDC_ERR, "%s: scale clocks failed\n", __func__); - print_vidc_buffer(VIDC_DBG, "qbuf in rbr", inst, mbuf); + print_vidc_buffer(VIDC_HIGH, "qbuf in rbr", inst, mbuf); rc = msm_comm_qbuf_to_hfi(inst, mbuf); if (rc) dprintk(VIDC_ERR, "%s: Failed qbuf to hfi: %d\n", __func__, rc); @@ -4289,7 +4289,7 @@ int msm_comm_qbuf(struct msm_vidc_inst *inst, struct msm_vidc_buffer *mbuf) if (inst->state != MSM_VIDC_START_DONE) { mbuf->flags |= MSM_VIDC_FLAG_DEFERRED; - print_vidc_buffer(VIDC_DBG, "qbuf deferred", inst, mbuf); + print_vidc_buffer(VIDC_HIGH, "qbuf deferred", inst, mbuf); return 0; } @@ -4301,7 +4301,7 @@ int msm_comm_qbuf(struct msm_vidc_inst *inst, struct msm_vidc_buffer *mbuf) if (rc) dprintk(VIDC_ERR, "%s: scale clocks failed\n", __func__); - print_vidc_buffer(VIDC_DBG, "qbuf", inst, mbuf); + print_vidc_buffer(VIDC_HIGH, "qbuf", inst, mbuf); rc = msm_comm_qbuf_to_hfi(inst, mbuf); if (rc) dprintk(VIDC_ERR, "%s: Failed qbuf to hfi: %d\n", __func__, rc); @@ -4321,7 +4321,7 @@ int msm_comm_qbufs(struct msm_vidc_inst *inst) } if (inst->state != MSM_VIDC_START_DONE) { - dprintk(VIDC_DBG, "%s: inst not in start state: %d\n", + dprintk(VIDC_HIGH, "%s: inst not in start state: %d\n", __func__, inst->state); return 0; } @@ -4338,7 +4338,7 @@ int msm_comm_qbufs(struct msm_vidc_inst *inst) } mutex_unlock(&inst->registeredbufs.lock); if (!found) { - dprintk(VIDC_DBG, + dprintk(VIDC_HIGH, "%s: no more deferred qbufs\n", __func__); break; } @@ -4386,7 +4386,7 @@ int msm_comm_qbuf_decode_batch(struct msm_vidc_inst *inst, if (inst->state != MSM_VIDC_START_DONE) { mbuf->flags |= MSM_VIDC_FLAG_DEFERRED; - print_vidc_buffer(VIDC_DBG, "qbuf deferred", inst, mbuf); + print_vidc_buffer(VIDC_HIGH, "qbuf deferred", inst, mbuf); return 0; } @@ -4397,7 +4397,7 @@ int msm_comm_qbuf_decode_batch(struct msm_vidc_inst *inst, if (inst->clk_data.buffer_counter > SKIP_BATCH_WINDOW) { count = num_pending_qbufs(inst, OUTPUT_MPLANE); if (count < inst->batch.size) { - print_vidc_buffer(VIDC_DBG, + print_vidc_buffer(VIDC_HIGH, "batch-qbuf deferred", inst, mbuf); return 0; } @@ -4419,7 +4419,7 @@ int msm_comm_qbuf_decode_batch(struct msm_vidc_inst *inst, if (buf->flags & MSM_VIDC_FLAG_RBR_PENDING) goto loop_end; - print_vidc_buffer(VIDC_DBG, "batch-qbuf", inst, buf); + print_vidc_buffer(VIDC_HIGH, "batch-qbuf", inst, buf); rc = msm_comm_qbuf_to_hfi(inst, buf); if (rc) { dprintk(VIDC_ERR, "%s: Failed qbuf to hfi: %d\n", @@ -4496,15 +4496,15 @@ int msm_comm_try_get_bufreqs(struct msm_vidc_inst *inst) } } - dprintk(VIDC_DBG, "Buffer requirements :\n"); - dprintk(VIDC_DBG, "%15s %8s %8s %8s %8s %8s\n", + dprintk(VIDC_HIGH, "Buffer requirements :\n"); + dprintk(VIDC_HIGH, "%15s %8s %8s %8s %8s %8s\n", "buffer type", "count", "mincount_host", "mincount_fw", "size", "alignment"); for (i = 0; i < HAL_BUFFER_MAX; i++) { struct hal_buffer_requirements req = inst->buff_req.buffer[i]; if (req.buffer_type != HAL_BUFFER_NONE) { - dprintk(VIDC_DBG, "%15s %8d %8d %8d %8d %8d\n", + dprintk(VIDC_HIGH, "%15s %8d %8d %8d %8d %8d\n", get_buffer_name(req.buffer_type), req.buffer_count_actual, req.buffer_count_min_host, @@ -4605,7 +4605,7 @@ int msm_comm_release_dpb_only_buffers(struct msm_vidc_inst *inst, } mutex_lock(&inst->outputbufs.lock); if (list_empty(&inst->outputbufs.list)) { - dprintk(VIDC_DBG, "%s - No OUTPUT buffers allocated\n", + dprintk(VIDC_HIGH, "%s - No OUTPUT buffers allocated\n", __func__); mutex_unlock(&inst->outputbufs.lock); return 0; @@ -4628,7 +4628,7 @@ int msm_comm_release_dpb_only_buffers(struct msm_vidc_inst *inst, handle = &buf->smem; if ((buf->buffer_ownership == FIRMWARE) && !force_release) { - dprintk(VIDC_INFO, "DPB is with f/w. Can't free it\n"); + dprintk(VIDC_HIGH, "DPB is with f/w. Can't free it\n"); /* * mark this buffer to avoid sending it to video h/w * again, this buffer belongs to old resolution and @@ -4648,7 +4648,7 @@ int msm_comm_release_dpb_only_buffers(struct msm_vidc_inst *inst, rc = call_hfi_op(hdev, session_release_buffers, (void *)inst->session, &buffer_info); if (rc) { - dprintk(VIDC_WARN, + dprintk(VIDC_ERR, "Rel output buf fail:%x, %d\n", buffer_info.align_device_addr, buffer_info.buffer_size); @@ -4699,7 +4699,7 @@ static enum hal_buffer scratch_buf_sufficient(struct msm_vidc_inst *inst, if (count != bufreq->buffer_count_actual) goto not_sufficient; - dprintk(VIDC_DBG, + dprintk(VIDC_HIGH, "Existing scratch buffer is sufficient for buffer type %#x\n", buffer_type); @@ -4763,12 +4763,12 @@ int msm_comm_release_scratch_buffers(struct msm_vidc_inst *inst, rc = wait_for_sess_signal_receipt(inst, HAL_SESSION_RELEASE_BUFFER_DONE); if (rc) - dprintk(VIDC_WARN, + dprintk(VIDC_ERR, "%s: wait for signal failed, rc %d\n", __func__, rc); mutex_lock(&inst->scratchbufs.lock); } else { - dprintk(VIDC_WARN, + dprintk(VIDC_ERR, "Rel scrtch buf fail:%x, %d\n", buffer_info.align_device_addr, buffer_info.buffer_size); @@ -4872,12 +4872,12 @@ int msm_comm_release_persist_buffers(struct msm_vidc_inst *inst) rc = wait_for_sess_signal_receipt(inst, HAL_SESSION_RELEASE_BUFFER_DONE); if (rc) - dprintk(VIDC_WARN, + dprintk(VIDC_ERR, "%s: wait for signal failed, rc %d\n", __func__, rc); mutex_lock(&inst->persistbufs.lock); } else { - dprintk(VIDC_WARN, + dprintk(VIDC_ERR, "Rel prst buf fail:%x, %d\n", buffer_info.align_device_addr, buffer_info.buffer_size); @@ -4902,7 +4902,7 @@ int msm_comm_set_buffer_count(struct msm_vidc_inst *inst, buf_count.buffer_type = get_hfi_buffer(type); buf_count.buffer_count_actual = act_count; buf_count.buffer_count_min_host = host_count; - dprintk(VIDC_DBG, "%s: %x : hal_buffer %d min_host %d actual %d\n", + dprintk(VIDC_HIGH, "%s: %x : hal_buffer %d min_host %d actual %d\n", __func__, hash32_ptr(inst->session), type, host_count, act_count); rc = call_hfi_op(hdev, session_set_property, @@ -4929,7 +4929,7 @@ int msm_comm_set_dpb_only_buffers(struct msm_vidc_inst *inst) force_release = false; if (msm_comm_release_dpb_only_buffers(inst, force_release)) - dprintk(VIDC_WARN, "Failed to release output buffers\n"); + dprintk(VIDC_ERR, "Failed to release output buffers\n"); rc = set_dpb_only_buffers(inst, HAL_BUFFER_OUTPUT); if (rc) @@ -4950,7 +4950,7 @@ int msm_comm_set_scratch_buffers(struct msm_vidc_inst *inst) } if (msm_comm_release_scratch_buffers(inst, true)) - dprintk(VIDC_WARN, "Failed to release scratch buffers\n"); + dprintk(VIDC_ERR, "Failed to release scratch buffers\n"); rc = set_internal_buffers(inst, HAL_BUFFER_INTERNAL_SCRATCH, &inst->scratchbufs); @@ -4987,14 +4987,14 @@ int msm_comm_set_recon_buffers(struct msm_vidc_inst *inst) } if (inst->session_type != MSM_VIDC_ENCODER) { - dprintk(VIDC_DBG, "Recon buffs not req for decoder/cvp\n"); + dprintk(VIDC_HIGH, "Recon buffs not req for decoder/cvp\n"); return 0; } internal_buf = get_buff_req_buffer(inst, HAL_BUFFER_INTERNAL_RECON); if (!internal_buf || !internal_buf->buffer_count_actual) { - dprintk(VIDC_DBG, "Inst : %pK Recon buffers not required\n", + dprintk(VIDC_HIGH, "Inst : %pK Recon buffers not required\n", inst); return 0; } @@ -5066,7 +5066,7 @@ static void msm_comm_flush_in_invalid_state(struct msm_vidc_inst *inst) inst, vb); vb2_buffer_done(vb, VB2_BUF_STATE_DONE); } else { - dprintk(VIDC_WARN, + dprintk(VIDC_ERR, "%s VB is in state %d not in ACTIVE state\n" , __func__, vb->state); } @@ -5106,7 +5106,7 @@ int msm_comm_flush(struct msm_vidc_inst *inst, u32 flags) op_flush = flags & V4L2_CMD_FLUSH_CAPTURE; if (ip_flush && !op_flush) { - dprintk(VIDC_WARN, + dprintk(VIDC_ERR, "Input only flush not supported, making it flush all\n"); op_flush = true; return 0; @@ -5144,7 +5144,7 @@ int msm_comm_flush(struct msm_vidc_inst *inst, u32 flags) if (!(mbuf->smem[0].refcount >= 2)) continue; - print_vidc_buffer(VIDC_DBG, "flush buf", inst, mbuf); + print_vidc_buffer(VIDC_HIGH, "flush buf", inst, mbuf); msm_comm_flush_vidc_buffer(inst, mbuf); for (i = 0; i < mbuf->vvb.vb2_buf.num_planes; i++) { @@ -5169,11 +5169,11 @@ int msm_comm_flush(struct msm_vidc_inst *inst, u32 flags) hdev = inst->core->device; if (ip_flush) { - dprintk(VIDC_DBG, "Send flush on all ports to firmware\n"); + dprintk(VIDC_HIGH, "Send flush on all ports to firmware\n"); rc = call_hfi_op(hdev, session_flush, inst->session, HAL_FLUSH_ALL); } else { - dprintk(VIDC_DBG, "Send flush on output port to firmware\n"); + dprintk(VIDC_HIGH, "Send flush on output port to firmware\n"); rc = call_hfi_op(hdev, session_flush, inst->session, HAL_FLUSH_OUTPUT); } @@ -5194,7 +5194,7 @@ int msm_vidc_noc_error_info(struct msm_vidc_core *core) struct hfi_device *hdev; if (!core || !core->device) { - dprintk(VIDC_WARN, "%s: Invalid parameters: %pK\n", + dprintk(VIDC_ERR, "%s: Invalid parameters: %pK\n", __func__, core); return -EINVAL; } @@ -5215,7 +5215,7 @@ int msm_vidc_trigger_ssr(struct msm_vidc_core *core, enum hal_ssr_trigger_type type) { if (!core) { - dprintk(VIDC_WARN, "%s: Invalid parameters\n", __func__); + dprintk(VIDC_ERR, "%s: Invalid parameters\n", __func__); return -EINVAL; } core->ssr_type = type; @@ -5238,7 +5238,7 @@ void msm_vidc_ssr_handler(struct work_struct *work) mutex_lock(&core->lock); if (core->state == VIDC_CORE_INIT_DONE) { - dprintk(VIDC_WARN, "%s: ssr type %d\n", __func__, + dprintk(VIDC_ERR, "%s: ssr type %d\n", __func__, core->ssr_type); /* * In current implementation user-initiated SSR triggers @@ -5255,7 +5255,7 @@ void msm_vidc_ssr_handler(struct work_struct *work) core->trigger_ssr = false; } } else { - dprintk(VIDC_WARN, "%s: video core %pK not initialized\n", + dprintk(VIDC_ERR, "%s: video core %pK not initialized\n", __func__, core); } mutex_unlock(&core->lock); @@ -5274,7 +5274,7 @@ static int msm_vidc_check_mbpf_supported(struct msm_vidc_inst *inst) core = inst->core; if (!core->resources.max_mbpf) { - dprintk(VIDC_DBG, "%s: max mbpf not available\n", + dprintk(VIDC_HIGH, "%s: max mbpf not available\n", __func__); return 0; } @@ -5333,7 +5333,7 @@ int msm_vidc_check_scaling_supported(struct msm_vidc_inst *inst) struct v4l2_format *f; if (inst->grid_enable > 0) { - dprintk(VIDC_DBG, "Skip scaling check for HEIC\n"); + dprintk(VIDC_HIGH, "Skip scaling check for HEIC\n"); return 0; } @@ -5368,7 +5368,7 @@ int msm_vidc_check_scaling_supported(struct msm_vidc_inst *inst) return -ENOTSUPP; } - dprintk(VIDC_DBG, "%s: supported WxH = %dx%d\n", + dprintk(VIDC_HIGH, "%s: supported WxH = %dx%d\n", __func__, input_width, input_height); return 0; } @@ -5423,7 +5423,7 @@ int msm_vidc_check_session_supported(struct msm_vidc_inst *inst) struct v4l2_format *f; if (!inst || !inst->core || !inst->core->device) { - dprintk(VIDC_WARN, "%s: Invalid parameter\n", __func__); + dprintk(VIDC_ERR, "%s: Invalid parameter\n", __func__); return -EINVAL; } capability = &inst->capability; @@ -5431,7 +5431,7 @@ int msm_vidc_check_session_supported(struct msm_vidc_inst *inst) core = inst->core; rc = msm_vidc_check_mbps_supported(inst); if (rc) { - dprintk(VIDC_WARN, + dprintk(VIDC_ERR, "%s: Hardware is overloaded\n", __func__); return rc; } @@ -5441,7 +5441,7 @@ int msm_vidc_check_session_supported(struct msm_vidc_inst *inst) return rc; if (!is_thermal_permissible(core)) { - dprintk(VIDC_WARN, + dprintk(VIDC_ERR, "Thermal level critical, stop all active sessions!\n"); return -ENOTSUPP; } @@ -5530,7 +5530,7 @@ void msm_comm_generate_session_error(struct msm_vidc_inst *inst) dprintk(VIDC_ERR, "%s: invalid input parameters\n", __func__); return; } - dprintk(VIDC_WARN, "%s: inst %pK\n", __func__, inst); + dprintk(VIDC_ERR, "%s: inst %pK\n", __func__, inst); response.session_id = inst; response.status = VIDC_ERR_FAIL; handle_session_error(cmd, (void *)&response); @@ -5546,7 +5546,7 @@ void msm_comm_generate_sys_error(struct msm_vidc_inst *inst) dprintk(VIDC_ERR, "%s: invalid input parameters\n", __func__); return; } - dprintk(VIDC_WARN, "%s: inst %pK\n", __func__, inst); + dprintk(VIDC_ERR, "%s: inst %pK\n", __func__, inst); core = inst->core; response.device_id = (u32) core->id; handle_sys_error(cmd, (void *) &response); @@ -5588,7 +5588,7 @@ int msm_comm_kill_session(struct msm_vidc_inst *inst) change_inst_state(inst, MSM_VIDC_CLOSE_DONE); msm_comm_session_clean(inst); - dprintk(VIDC_WARN, "%s: inst %pK session %x handled\n", __func__, + dprintk(VIDC_ERR, "%s: inst %pK session %x handled\n", __func__, inst, hash32_ptr(inst->session)); return rc; } @@ -5638,7 +5638,7 @@ void msm_vidc_fw_unload_handler(struct work_struct *work) if (list_empty(&core->instances) && core->state != VIDC_CORE_UNINIT) { if (core->state > VIDC_CORE_INIT) { - dprintk(VIDC_DBG, "Calling vidc_hal_core_release\n"); + dprintk(VIDC_HIGH, "Calling vidc_hal_core_release\n"); rc = call_hfi_op(hdev, core_release, hdev->hfi_device_data); if (rc) { @@ -5682,7 +5682,7 @@ int msm_comm_set_color_format(struct msm_vidc_inst *inst, dprintk(VIDC_ERR, "Failed to set input color format\n"); else - dprintk(VIDC_DBG, "Setting uncompressed colorformat to %#x\n", + dprintk(VIDC_HIGH, "Setting uncompressed colorformat to %#x\n", format); return rc; @@ -5763,13 +5763,13 @@ int msm_comm_session_continue(void *instance) mutex_lock(&inst->lock); if (inst->state >= MSM_VIDC_RELEASE_RESOURCES_DONE || inst->state < MSM_VIDC_START_DONE) { - dprintk(VIDC_DBG, + dprintk(VIDC_HIGH, "Inst %pK : Not in valid state to call %s\n", inst, __func__); goto sess_continue_fail; } if (inst->session_type == MSM_VIDC_DECODER && inst->in_reconfig) { - dprintk(VIDC_DBG, "send session_continue\n"); + dprintk(VIDC_HIGH, "send session_continue\n"); rc = call_hfi_op(hdev, session_continue, (void *)inst->session); if (rc) { @@ -5796,7 +5796,7 @@ int msm_comm_session_continue(void *instance) } } } else if (inst->session_type == MSM_VIDC_ENCODER) { - dprintk(VIDC_DBG, + dprintk(VIDC_HIGH, "session_continue not supported for encoder"); } else { dprintk(VIDC_ERR, @@ -6327,7 +6327,7 @@ struct msm_vidc_buffer *msm_comm_get_vidc_buffer(struct msm_vidc_inst *inst, rc = -EEXIST; } if (rc == -EEXIST) { - print_vidc_buffer(VIDC_DBG, + print_vidc_buffer(VIDC_HIGH, "existing qbuf", inst, mbuf); /* enable RBR pending */ mbuf->flags |= MSM_VIDC_FLAG_RBR_PENDING; @@ -6388,7 +6388,7 @@ void msm_comm_put_vidc_buffer(struct msm_vidc_inst *inst, goto unlock; } - print_vidc_buffer(VIDC_DBG, "dqbuf", inst, mbuf); + print_vidc_buffer(VIDC_HIGH, "dqbuf", inst, mbuf); for (i = 0; i < mbuf->vvb.vb2_buf.num_planes; i++) { if (inst->smem_ops->smem_unmap_dma_buf(inst, &mbuf->smem[i])) print_vidc_buffer(VIDC_ERR, @@ -6491,7 +6491,7 @@ void handle_release_buffer_reference(struct msm_vidc_inst *inst, /* buffer found means client queued the buffer already */ if (inst->in_reconfig || inst->in_flush) { - print_vidc_buffer(VIDC_DBG, "rbr flush buf", inst, mbuf); + print_vidc_buffer(VIDC_HIGH, "rbr flush buf", inst, mbuf); msm_comm_flush_vidc_buffer(inst, mbuf); msm_comm_unmap_vidc_buffer(inst, mbuf); /* remove from list */ @@ -6613,7 +6613,7 @@ void msm_comm_store_filled_length(struct msm_vidc_list *data_list, if (!found) { pdata = kzalloc(sizeof(*pdata), GFP_KERNEL); if (!pdata) { - dprintk(VIDC_WARN, "%s: malloc failure.\n", __func__); + dprintk(VIDC_ERR, "%s: malloc failure.\n", __func__); goto exit; } pdata->index = index; @@ -6671,7 +6671,7 @@ void msm_comm_store_mark_data(struct msm_vidc_list *data_list, if (!found) { pdata = kzalloc(sizeof(*pdata), GFP_KERNEL); if (!pdata) { - dprintk(VIDC_WARN, "%s: malloc failure.\n", __func__); + dprintk(VIDC_ERR, "%s: malloc failure.\n", __func__); goto exit; } pdata->index = index; @@ -6770,7 +6770,7 @@ int msm_comm_set_color_format_constraints(struct msm_vidc_inst *inst, pconstraint->buffer_type = get_hfi_buffer(buffer_type); pconstraint->num_planes = pix_constraint->num_planes; //set Y plan constraints - dprintk(VIDC_INFO, "Set Y plan constraints.\n"); + dprintk(VIDC_HIGH, "Set Y plan constraints.\n"); pconstraint->rg_plane_format[0].stride_multiples = VENUS_Y_STRIDE(hfi_fmt, 1); pconstraint->rg_plane_format[0].max_stride = @@ -6781,7 +6781,7 @@ int msm_comm_set_color_format_constraints(struct msm_vidc_inst *inst, pix_constraint->y_buffer_alignment; //set UV plan constraints - dprintk(VIDC_INFO, "Set UV plan constraints.\n"); + dprintk(VIDC_HIGH, "Set UV plan constraints.\n"); pconstraint->rg_plane_format[1].stride_multiples = VENUS_UV_STRIDE(hfi_fmt, 1); pconstraint->rg_plane_format[1].max_stride = @@ -6801,7 +6801,7 @@ int msm_comm_set_color_format_constraints(struct msm_vidc_inst *inst, dprintk(VIDC_ERR, "Failed to set input color format constraint\n"); else - dprintk(VIDC_DBG, "Set color format constraint success\n"); + dprintk(VIDC_HIGH, "Set color format constraint success\n"); exit: if (!pconstraint) diff --git a/msm/vidc/msm_vidc_debug.c b/msm/vidc/msm_vidc_debug.c index 2511d1a3ed8d..018db00d2d60 100644 --- a/msm/vidc/msm_vidc_debug.c +++ b/msm/vidc/msm_vidc_debug.c @@ -9,7 +9,7 @@ #include "vidc_hfi_api.h" #include -int msm_vidc_debug = VIDC_ERR | VIDC_WARN | VIDC_PRINTK | +int msm_vidc_debug = VIDC_ERR | VIDC_PRINTK | FW_HIGH | FW_ERROR | FW_FATAL | FW_FTRACE; EXPORT_SYMBOL(msm_vidc_debug); @@ -76,7 +76,7 @@ static ssize_t core_info_read(struct file *file, char __user *buf, cur += write_str(cur, end - cur, "Core state: %d\n", core->state); rc = call_hfi_op(hdev, get_fw_info, hdev->hfi_device_data, &fw_info); if (rc) { - dprintk(VIDC_WARN, "Failed to read FW info\n"); + dprintk(VIDC_ERR, "Failed to read FW info\n"); goto err_fw_info; } @@ -129,14 +129,14 @@ static ssize_t trigger_ssr_write(struct file *filp, const char __user *buf, size = count; if (copy_from_user(kbuf, buf, size)) { - dprintk(VIDC_WARN, "%s User memory fault\n", __func__); + dprintk(VIDC_ERR, "%s User memory fault\n", __func__); rc = -EFAULT; goto exit; } rc = kstrtoul(kbuf, 0, &ssr_trigger_val); if (rc) { - dprintk(VIDC_WARN, "returning error err %d\n", rc); + dprintk(VIDC_ERR, "returning error err %d\n", rc); rc = -EINVAL; } else { msm_vidc_trigger_ssr(core, ssr_trigger_val); @@ -233,7 +233,7 @@ failed_create_dir: static int inst_info_open(struct inode *inode, struct file *file) { - dprintk(VIDC_INFO, "Open inode ptr: %pK\n", inode->i_private); + dprintk(VIDC_LOW, "Open inode ptr: %pK\n", inode->i_private); file->private_data = inode->i_private; return 0; } @@ -395,7 +395,7 @@ failed_alloc: static int inst_info_release(struct inode *inode, struct file *file) { - dprintk(VIDC_INFO, "Release inode ptr: %pK\n", inode->i_private); + dprintk(VIDC_LOW, "Release inode ptr: %pK\n", inode->i_private); file->private_data = NULL; return 0; } @@ -463,7 +463,7 @@ void msm_vidc_debugfs_deinit_inst(struct msm_vidc_inst *inst) dentry = inst->debugfs_root; if (dentry->d_inode) { - dprintk(VIDC_INFO, "Destroy %pK\n", dentry->d_inode->i_private); + dprintk(VIDC_LOW, "Destroy %pK\n", dentry->d_inode->i_private); kfree(dentry->d_inode->i_private); dentry->d_inode->i_private = NULL; } @@ -489,10 +489,10 @@ void msm_vidc_debugfs_update(struct msm_vidc_inst *inst, inst->count.ebd++; if (inst->count.ebd && inst->count.ebd == inst->count.etb) { toc(inst, FRAME_PROCESSING); - dprintk(VIDC_PROF, "EBD: FW needs input buffers\n"); + dprintk(VIDC_PERF, "EBD: FW needs input buffers\n"); } if (inst->count.ftb == inst->count.fbd) - dprintk(VIDC_PROF, "EBD: FW needs output buffers\n"); + dprintk(VIDC_PERF, "EBD: FW needs output buffers\n"); break; case MSM_VIDC_DEBUGFS_EVENT_FTB: { inst->count.ftb++; @@ -508,10 +508,10 @@ void msm_vidc_debugfs_update(struct msm_vidc_inst *inst, if (inst->count.fbd && inst->count.fbd == inst->count.ftb) { toc(inst, FRAME_PROCESSING); - dprintk(VIDC_PROF, "FBD: FW needs output buffers\n"); + dprintk(VIDC_PERF, "FBD: FW needs output buffers\n"); } if (inst->count.etb == inst->count.ebd) - dprintk(VIDC_PROF, "FBD: FW needs input buffers\n"); + dprintk(VIDC_PERF, "FBD: FW needs input buffers\n"); break; default: dprintk(VIDC_ERR, "Invalid state in debugfs: %d\n", e); diff --git a/msm/vidc/msm_vidc_debug.h b/msm/vidc/msm_vidc_debug.h index 181683965fbb..e16376611f6d 100644 --- a/msm/vidc/msm_vidc_debug.h +++ b/msm/vidc/msm_vidc_debug.h @@ -33,11 +33,10 @@ enum vidc_msg_prio { VIDC_ERR = 0x00000001, - VIDC_WARN = 0x00000002, - VIDC_INFO = 0x00000004, - VIDC_DBG = 0x00000008, - VIDC_PROF = 0x00000010, - VIDC_PKT = 0x00000020, + VIDC_HIGH = 0x00000002, + VIDC_LOW = 0x00000004, + VIDC_PERF = 0x00000008, + VIDC_PKT = 0x00000010, VIDC_PRINTK = 0x00001000, VIDC_FTRACE = 0x00002000, FW_LOW = 0x00010000, @@ -119,7 +118,7 @@ extern bool msm_vidc_cvp_usage; #define MSM_VIDC_ERROR(value) \ do { if (value) \ - dprintk(VIDC_DBG, "BugOn"); \ + dprintk(VIDC_ERR, "BugOn"); \ BUG_ON(value); \ } while (0) @@ -139,14 +138,12 @@ static inline char *get_debug_level_str(int level) switch (level) { case VIDC_ERR: return "err"; - case VIDC_WARN: - return "warn"; - case VIDC_INFO: - return "info"; - case VIDC_DBG: - return "dbg"; - case VIDC_PROF: - return "prof"; + case VIDC_HIGH: + return "high"; + case VIDC_LOW: + return "low"; + case VIDC_PERF: + return "perf"; case VIDC_PKT: return "pkt"; default: @@ -161,7 +158,7 @@ static inline void tic(struct msm_vidc_inst *i, enum profiling_points p, if (!i->debug.pdata[p].name[0]) memcpy(i->debug.pdata[p].name, b, 64); - if ((msm_vidc_debug & VIDC_PROF) && + if ((msm_vidc_debug & VIDC_PERF) && i->debug.pdata[p].sampling) { do_gettimeofday(&__ddl_tv); i->debug.pdata[p].start = @@ -174,7 +171,7 @@ static inline void toc(struct msm_vidc_inst *i, enum profiling_points p) { struct timeval __ddl_tv; - if ((msm_vidc_debug & VIDC_PROF) && + if ((msm_vidc_debug & VIDC_PERF) && !i->debug.pdata[p].sampling) { do_gettimeofday(&__ddl_tv); i->debug.pdata[p].stop = (__ddl_tv.tv_sec * 1000) @@ -191,15 +188,15 @@ static inline void show_stats(struct msm_vidc_inst *i) for (x = 0; x < MAX_PROFILING_POINTS; x++) { if (i->debug.pdata[x].name[0] && - (msm_vidc_debug & VIDC_PROF)) { + (msm_vidc_debug & VIDC_PERF)) { if (i->debug.samples) { - dprintk(VIDC_PROF, "%s averaged %d ms/sample\n", + dprintk(VIDC_PERF, "%s averaged %d ms/sample\n", i->debug.pdata[x].name, i->debug.pdata[x].cumulative / i->debug.samples); } - dprintk(VIDC_PROF, "%s Samples: %d\n", + dprintk(VIDC_PERF, "%s Samples: %d\n", i->debug.pdata[x].name, i->debug.samples); } diff --git a/msm/vidc/msm_vidc_platform.c b/msm/vidc/msm_vidc_platform.c index 97a734ad5391..6c0e40519bfa 100644 --- a/msm/vidc/msm_vidc_platform.c +++ b/msm/vidc/msm_vidc_platform.c @@ -1073,7 +1073,7 @@ static int msm_vidc_read_efuse( data->sku_version = (efuse & (efuse_data[i]).mask) >> (efuse_data[i]).shift; - dprintk(VIDC_DBG, + dprintk(VIDC_HIGH, "efuse 0x%x, platform version 0x%x\n", efuse, data->sku_version); @@ -1124,7 +1124,7 @@ void *vidc_get_drv_data(struct device *dev) dprintk(VIDC_ERR, "Failed to get ddr type, use LPDDR5\n"); } - dprintk(VIDC_DBG, "DDR Type %x\n", ddr_type); + dprintk(VIDC_HIGH, "DDR Type %x\n", ddr_type); if (driver_data->ubwc_config && (ddr_type == DDR_TYPE_LPDDR4 || diff --git a/msm/vidc/msm_vidc_res_parse.c b/msm/vidc/msm_vidc_res_parse.c index 816a8a4eac14..b0a95ce4724d 100644 --- a/msm/vidc/msm_vidc_res_parse.c +++ b/msm/vidc/msm_vidc_res_parse.c @@ -143,7 +143,7 @@ static int msm_vidc_load_reg_table(struct msm_vidc_platform_resources *res) * qcom,reg-presets is an optional property. It likely won't be * present if we don't have any register settings to program */ - dprintk(VIDC_DBG, "qcom,reg-presets not found\n"); + dprintk(VIDC_HIGH, "qcom,reg-presets not found\n"); return 0; } @@ -153,7 +153,7 @@ static int msm_vidc_load_reg_table(struct msm_vidc_platform_resources *res) reg_set->count /= sizeof(*reg_set->reg_tbl) / sizeof(u32); if (!reg_set->count) { - dprintk(VIDC_DBG, "no elements in reg set\n"); + dprintk(VIDC_HIGH, "no elements in reg set\n"); return rc; } @@ -172,7 +172,7 @@ static int msm_vidc_load_reg_table(struct msm_vidc_platform_resources *res) return -EINVAL; } for (i = 0; i < reg_set->count; i++) { - dprintk(VIDC_DBG, + dprintk(VIDC_HIGH, "reg = %x, value = %x\n", reg_set->reg_tbl[i].reg, reg_set->reg_tbl[i].value @@ -192,7 +192,7 @@ static int msm_vidc_load_qdss_table(struct msm_vidc_platform_resources *res) * qcom,qdss-presets is an optional property. It likely won't be * present if we don't have any register settings to program */ - dprintk(VIDC_DBG, "qcom,qdss-presets not found\n"); + dprintk(VIDC_HIGH, "qcom,qdss-presets not found\n"); return rc; } @@ -202,7 +202,7 @@ static int msm_vidc_load_qdss_table(struct msm_vidc_platform_resources *res) qdss_addr_set->count /= sizeof(*qdss_addr_set->addr_tbl) / sizeof(u32); if (!qdss_addr_set->count) { - dprintk(VIDC_DBG, "no elements in qdss reg set\n"); + dprintk(VIDC_HIGH, "no elements in qdss reg set\n"); return rc; } @@ -226,7 +226,7 @@ static int msm_vidc_load_qdss_table(struct msm_vidc_platform_resources *res) } for (i = 0; i < qdss_addr_set->count; i++) { - dprintk(VIDC_DBG, "qdss addr = %x, value = %x\n", + dprintk(VIDC_HIGH, "qdss addr = %x, value = %x\n", qdss_addr_set->addr_tbl[i].start, qdss_addr_set->addr_tbl[i].size); } @@ -243,7 +243,7 @@ static int msm_vidc_load_subcache_info(struct msm_vidc_platform_resources *res) num_subcaches = of_property_count_strings(pdev->dev.of_node, "cache-slice-names"); if (num_subcaches <= 0) { - dprintk(VIDC_DBG, "No subcaches found\n"); + dprintk(VIDC_HIGH, "No subcaches found\n"); goto err_load_subcache_table_fail; } @@ -257,7 +257,7 @@ static int msm_vidc_load_subcache_info(struct msm_vidc_platform_resources *res) } subcaches->count = num_subcaches; - dprintk(VIDC_DBG, "Found %d subcaches\n", num_subcaches); + dprintk(VIDC_HIGH, "Found %d subcaches\n", num_subcaches); for (c = 0; c < num_subcaches; ++c) { struct subcache_info *vsc = &res->subcache_set.subcache_tbl[c]; @@ -303,7 +303,7 @@ int msm_vidc_load_u32_table(struct platform_device *pdev, u32 *ptbl = NULL; if (!of_find_property(of_node, table_name, NULL)) { - dprintk(VIDC_DBG, "%s not found\n", table_name); + dprintk(VIDC_HIGH, "%s not found\n", table_name); return 0; } @@ -350,7 +350,7 @@ static int msm_vidc_load_allowed_clocks_table( if (!of_find_property(pdev->dev.of_node, "qcom,allowed-clock-rates", NULL)) { - dprintk(VIDC_DBG, "qcom,allowed-clock-rates not found\n"); + dprintk(VIDC_HIGH, "qcom,allowed-clock-rates not found\n"); return 0; } @@ -436,7 +436,7 @@ static int msm_vidc_populate_bus(struct device *dev, range, ARRAY_SIZE(range)); if (rc) { rc = 0; - dprintk(VIDC_DBG, + dprintk(VIDC_HIGH, "'qcom,range' not found defaulting to <0 INT_MAX>\n"); range[0] = 0; range[1] = INT_MAX; @@ -447,7 +447,7 @@ static int msm_vidc_populate_bus(struct device *dev, buses->count++; bus->dev = dev; - dprintk(VIDC_DBG, "Found bus %s [%d->%d] with mode %s\n", + dprintk(VIDC_HIGH, "Found bus %s [%d->%d] with mode %s\n", bus->name, bus->master, bus->slave, bus->mode); err_bus: return rc; @@ -467,7 +467,7 @@ static int msm_vidc_load_buffer_usage_table( * likely won't be present if the core doesn't support content * protection */ - dprintk(VIDC_DBG, "buffer-type-tz-usage-table not found\n"); + dprintk(VIDC_HIGH, "buffer-type-tz-usage-table not found\n"); return 0; } @@ -476,7 +476,7 @@ static int msm_vidc_load_buffer_usage_table( buffer_usage_set->count /= sizeof(*buffer_usage_set->buffer_usage_tbl) / sizeof(u32); if (!buffer_usage_set->count) { - dprintk(VIDC_DBG, "no elements in buffer usage set\n"); + dprintk(VIDC_HIGH, "no elements in buffer usage set\n"); return 0; } @@ -565,7 +565,7 @@ static int msm_vidc_load_regulator_table( regulator_node = of_parse_phandle(domains_parent_node, domains_property->name, 0); if (IS_ERR(regulator_node)) { - dprintk(VIDC_WARN, "%s is not a phandle\n", + dprintk(VIDC_ERR, "%s is not a phandle\n", domains_property->name); continue; } @@ -587,13 +587,13 @@ static int msm_vidc_load_regulator_table( rinfo->has_hw_power_collapse = of_property_read_bool( regulator_node, "qcom,support-hw-trigger"); - dprintk(VIDC_DBG, "Found regulator %s: h/w collapse = %s\n", + dprintk(VIDC_HIGH, "Found regulator %s: h/w collapse = %s\n", rinfo->name, rinfo->has_hw_power_collapse ? "yes" : "no"); } if (!regulators->count) - dprintk(VIDC_DBG, "No regulators found"); + dprintk(VIDC_HIGH, "No regulators found"); return 0; @@ -614,7 +614,7 @@ static int msm_vidc_load_clock_table( num_clocks = of_property_count_strings(pdev->dev.of_node, "clock-names"); if (num_clocks <= 0) { - dprintk(VIDC_DBG, "No clocks found\n"); + dprintk(VIDC_HIGH, "No clocks found\n"); clocks->count = 0; rc = 0; goto err_load_clk_table_fail; @@ -645,7 +645,7 @@ static int msm_vidc_load_clock_table( } clocks->count = num_clocks; - dprintk(VIDC_DBG, "Found %d clocks\n", num_clocks); + dprintk(VIDC_HIGH, "Found %d clocks\n", num_clocks); for (c = 0; c < num_clocks; ++c) { struct clock_info *vc = &res->clock_set.clock_tbl[c]; @@ -664,7 +664,7 @@ static int msm_vidc_load_clock_table( else vc->has_mem_retention = false; - dprintk(VIDC_DBG, "Found clock %s: scale-able = %s\n", vc->name, + dprintk(VIDC_HIGH, "Found clock %s: scale-able = %s\n", vc->name, vc->has_scaling ? "yes" : "no"); } @@ -686,7 +686,7 @@ static int msm_vidc_load_reset_table( num_clocks = of_property_count_strings(pdev->dev.of_node, "reset-names"); if (num_clocks <= 0) { - dprintk(VIDC_DBG, "No reset clocks found\n"); + dprintk(VIDC_HIGH, "No reset clocks found\n"); rst->count = 0; return 0; } @@ -697,7 +697,7 @@ static int msm_vidc_load_reset_table( return -ENOMEM; rst->count = num_clocks; - dprintk(VIDC_DBG, "Found %d reset clocks\n", num_clocks); + dprintk(VIDC_HIGH, "Found %d reset clocks\n", num_clocks); for (c = 0; c < num_clocks; ++c) { struct reset_info *rc = &res->reset_set.reset_tbl[c]; @@ -719,12 +719,12 @@ static int msm_decide_dt_node( rc = of_property_read_u32(pdev->dev.of_node, "sku-index", &sku_index); if (rc) { - dprintk(VIDC_DBG, "'sku_index' not found in node\n"); + dprintk(VIDC_HIGH, "'sku_index' not found in node\n"); return 0; } if (sku_index != res->sku_version) { - dprintk(VIDC_DBG, + dprintk(VIDC_HIGH, "Failed to parser dt: sku_index %d res->sku_version - %d\n", sku_index, res->sku_version); return -EINVAL; @@ -772,7 +772,7 @@ int read_platform_resources_from_drv_data( res->fw_name = "venus"; - dprintk(VIDC_DBG, "Firmware filename: %s\n", res->fw_name); + dprintk(VIDC_HIGH, "Firmware filename: %s\n", res->fw_name); res->max_load = find_key_value(platform_data, "qcom,max-hw-load"); @@ -859,7 +859,7 @@ static int msm_vidc_populate_cx_ipeak_context( if (IS_ERR(res->cx_ipeak_context)) { rc = PTR_ERR(res->cx_ipeak_context); if (rc == -EPROBE_DEFER) - dprintk(VIDC_INFO, + dprintk(VIDC_HIGH, "cx-ipeak register failed. Deferring probe!"); else dprintk(VIDC_ERR, @@ -870,14 +870,14 @@ static int msm_vidc_populate_cx_ipeak_context( } if (res->cx_ipeak_context) - dprintk(VIDC_INFO, "cx-ipeak register successful"); + dprintk(VIDC_HIGH, "cx-ipeak register successful"); else - dprintk(VIDC_INFO, "cx-ipeak register not implemented"); + dprintk(VIDC_HIGH, "cx-ipeak register not implemented"); of_property_read_u32(pdev->dev.of_node, "qcom,clock-freq-threshold", &res->clk_freq_threshold); - dprintk(VIDC_DBG, "cx ipeak threshold frequency = %u\n", + dprintk(VIDC_HIGH, "cx ipeak threshold frequency = %u\n", res->clk_freq_threshold); return rc; @@ -914,11 +914,11 @@ int read_platform_resources_from_dt( rc = msm_vidc_load_subcache_info(res); if (rc) - dprintk(VIDC_WARN, "Failed to load subcache info: %d\n", rc); + dprintk(VIDC_ERR, "Failed to load subcache info: %d\n", rc); rc = msm_vidc_load_qdss_table(res); if (rc) - dprintk(VIDC_WARN, "Failed to load qdss reg table: %d\n", rc); + dprintk(VIDC_ERR, "Failed to load qdss reg table: %d\n", rc); rc = msm_vidc_load_reg_table(res); if (rc) { @@ -1026,8 +1026,8 @@ static int msm_vidc_setup_context_bank(struct msm_vidc_platform_resources *res, dma_set_max_seg_size(dev, DMA_BIT_MASK(32)); dma_set_seg_boundary(dev, DMA_BIT_MASK(64)); - dprintk(VIDC_DBG, "Attached %s and created mapping\n", dev_name(dev)); - dprintk(VIDC_DBG, + dprintk(VIDC_HIGH, "Attached %s and created mapping\n", dev_name(dev)); + dprintk(VIDC_HIGH, "Context bank name:%s, buffer_type: %#x, is_secure: %d, address range start: %#x, size: %#x, dev: %pK, domain: %pK", cb->name, cb->buffer_type, cb->is_secure, cb->addr_range.start, cb->addr_range.size, cb->dev, cb->domain); @@ -1098,12 +1098,12 @@ static int msm_vidc_populate_context_bank(struct device *dev, rc = of_property_read_string(np, "label", &cb->name); if (rc) { - dprintk(VIDC_DBG, + dprintk(VIDC_HIGH, "Failed to read cb label from device tree\n"); rc = 0; } - dprintk(VIDC_DBG, "%s: context bank has name %s\n", __func__, cb->name); + dprintk(VIDC_HIGH, "%s: context bank has name %s\n", __func__, cb->name); rc = of_property_read_u32_array(np, "virtual-addr-pool", (u32 *)&cb->addr_range, 2); if (rc) { @@ -1114,7 +1114,7 @@ static int msm_vidc_populate_context_bank(struct device *dev, } cb->is_secure = of_property_read_bool(np, "qcom,secure-context-bank"); - dprintk(VIDC_DBG, "context bank %s : secure = %d\n", + dprintk(VIDC_HIGH, "context bank %s : secure = %d\n", cb->name, cb->is_secure); /* setup buffer type for each sub device*/ @@ -1124,7 +1124,7 @@ static int msm_vidc_populate_context_bank(struct device *dev, rc = -ENOENT; goto err_setup_cb; } - dprintk(VIDC_DBG, + dprintk(VIDC_HIGH, "context bank %s address start = %x address size = %x buffer_type = %x\n", cb->name, cb->addr_range.start, cb->addr_range.size, cb->buffer_type); @@ -1164,7 +1164,7 @@ static int msm_vidc_populate_legacy_context_bank( domains_parent_node = of_find_node_by_name(pdev->dev.of_node, "qcom,vidc-iommu-domains"); if (!domains_parent_node) { - dprintk(VIDC_DBG, + dprintk(VIDC_HIGH, "%s legacy iommu domains not present\n", __func__); return 0; } @@ -1231,7 +1231,7 @@ static int msm_vidc_populate_legacy_context_bank( dprintk(VIDC_ERR, "Cannot setup context bank %d\n", rc); goto err_setup_cb; } - dprintk(VIDC_DBG, + dprintk(VIDC_HIGH, "%s: context bank %s secure %d addr start = %#x addr size = %#x buffer_type = %#x\n", __func__, cb->name, cb->is_secure, cb->addr_range.start, cb->addr_range.size, cb->buffer_type); @@ -1268,7 +1268,7 @@ int read_context_bank_resources_from_dt(struct platform_device *pdev) if (rc) dprintk(VIDC_ERR, "Failed to probe context bank\n"); else - dprintk(VIDC_DBG, "Successfully probed context bank\n"); + dprintk(VIDC_HIGH, "Successfully probed context bank\n"); return rc; }