#ifdef CONFIG_EXYNOS_CONTENT_PATH_PROTECTION
trace_mfc_dcpp_start(ctx->num, 1, dev->fw.drm_status);
if (!dev->drm_fw_buf.daddr) {
- mfc_err_ctx("DRM F/W buffer is not allocated.\n");
+ mfc_err_ctx("DRM F/W buffer is not allocated\n");
dev->fw.drm_status = 0;
} else {
/* Request buffer protection for DRM F/W */
MFC_TRACE_DEV_HWLOCK("**open\n");
ret = s5p_mfc_get_hwlock_dev(dev);
if (ret < 0) {
- mfc_err_dev("Failed to get hwlock.\n");
+ mfc_err_dev("Failed to get hwlock\n");
mfc_err_dev("dev.hwlock.dev = 0x%lx, bits = 0x%lx, owned_by_irq = %d, wl_count = %d, transfer_owner = %d\n",
dev->hwlock.dev, dev->hwlock.bits, dev->hwlock.owned_by_irq,
dev->hwlock.wl_count, dev->hwlock.transfer_owner);
/* Allocate memory for context */
ctx = kzalloc(sizeof(*ctx), GFP_KERNEL);
if (!ctx) {
- mfc_err_dev("Not enough memory.\n");
+ mfc_err_dev("Not enough memory\n");
ret = -ENOMEM;
goto err_ctx_alloc;
}
while (dev->ctx[ctx->num]) {
ctx->num++;
if (ctx->num >= MFC_NUM_CONTEXTS) {
- mfc_err_dev("Too many open contexts.\n");
+ mfc_err_dev("Too many open contexts\n");
ret = -EBUSY;
goto err_ctx_num;
}
/* To issue the command 'CLOSE_INSTANCE' */
if (s5p_mfc_just_run(dev, ctx->num)) {
- mfc_err_ctx("Failed to run MFC.\n");
+ mfc_err_ctx("Failed to run MFC\n");
return -EIO;
}
/* If a H/W operation is in progress, wait for it complete */
if (need_to_wait_nal_abort(ctx)) {
if (s5p_mfc_wait_for_done_ctx(ctx, S5P_FIMV_R2H_CMD_NAL_ABORT_RET)) {
- mfc_err_ctx("Failed to wait nal abort.\n");
+ mfc_err_ctx("Failed to wait nal abort\n");
s5p_mfc_cleanup_work_bit_and_try_run(ctx);
}
}
MFC_TRACE_CTX_HWLOCK("**release\n");
ret = s5p_mfc_get_hwlock_ctx(ctx);
if (ret < 0) {
- mfc_err_dev("Failed to get hwlock.\n");
+ mfc_err_dev("Failed to get hwlock\n");
mutex_unlock(&dev->mfc_mutex);
return -EBUSY;
}
mfc_debug_enter();
if (offset < DST_QUEUE_OFF_BASE) {
- mfc_debug(2, "mmaping source.\n");
+ mfc_debug(2, "mmaping source\n");
ret = vb2_mmap(&ctx->vq_src, vma);
} else { /* capture */
- mfc_debug(2, "mmaping destination.\n");
+ mfc_debug(2, "mmaping destination\n");
vma->vm_pgoff -= (DST_QUEUE_OFF_BASE >> PAGE_SHIFT);
ret = vb2_mmap(&ctx->vq_dst, vma);
}
if (MFC_MMU1_READL(MFC_MMU_INTERRUPT_STATUS) &&
((MFC_MMU1_READL(MFC_MMU_FAULT_TRANS_INFO) &
MFC_MMU_FAULT_TRANS_INFO_AXID_MASK) == 1)) {
- mfc_err_dev("There is TS-MUX page fault. skip SFR dump.\n");
+ mfc_err_dev("There is TS-MUX page fault. skip SFR dump\n");
return 0;
}
}
if (is_mfc_itmon) {
pr_err("mfc_itmon_notifier: MFC +\n");
- pr_err("MFC is %s.\n", is_master ? "master" : "dest");
+ pr_err("MFC is %s\n", is_master ? "master" : "dest");
if (!dev->itmon_notified) {
- pr_err("dump MFC information.\n");
+ pr_err("dump MFC information\n");
if (is_master || (!is_master && itmon_info->onoff))
call_dop(dev, dump_info, dev);
else
call_dop(dev, dump_info_without_regs, dev);
} else {
- pr_err("MFC notifier has already been called. skip MFC information.\n");
+ pr_err("MFC notifier has already been called. skip MFC information\n");
}
pr_err("mfc_itmon_notifier: MFC -\n");
dev->itmon_notified = 1;
dev_dbg(&pdev->dev, "%s()\n", __func__);
dev = devm_kzalloc(&pdev->dev, sizeof(struct s5p_mfc_dev), GFP_KERNEL);
if (!dev) {
- dev_err(&pdev->dev, "Not enough memory for MFC device.\n");
+ dev_err(&pdev->dev, "Not enough memory for MFC device\n");
return -ENOMEM;
}
ret = s5p_mfc_get_hwlock_dev(dev);
if (ret < 0)
- mfc_err_dev("Failed to get hwlock.\n");
+ mfc_err_dev("Failed to get hwlock\n");
if (!dev->shutdown) {
s5p_mfc_risc_off(dev);
{
struct s5p_mfc_ctx_buf_size *buf_size = dev->variant->buf_size->ctx_buf;
- mfc_debug(2, "Allocate a debug-info buffer.\n");
+ mfc_debug(2, "Allocate a debug-info buffer\n");
dev->dbg_info_buf.buftype = MFCBUF_NORMAL;
dev->dbg_info_buf.size = buf_size->dbg_info_buf;
s5p_mfc_release_codec_buffers(ctx);
ret = s5p_mfc_alloc_codec_buffers(ctx);
if (ret) {
- mfc_err_ctx("Failed to allocate decoding buffers.\n");
+ mfc_err_ctx("Failed to allocate decoding buffers\n");
return ret;
}
ret = s5p_mfc_set_dec_codec_buffers(ctx);
if (ret) {
- mfc_err_ctx("Failed to alloc frame mem.\n");
+ mfc_err_ctx("Failed to alloc frame mem\n");
return ret;
}
}
mfc_info_ctx("there isn't codec buffer, re-alloc!\n");
ret = s5p_mfc_alloc_codec_buffers(ctx);
if (ret) {
- mfc_err_ctx("Failed to allocate encoding buffers.\n");
+ mfc_err_ctx("Failed to allocate encoding buffers\n");
return ret;
}
}
s5p_mfc_release_codec_buffers(ctx);
ret = s5p_mfc_alloc_codec_buffers(ctx);
if (ret) {
- mfc_err_ctx("Failed to allocate encoding buffers.\n");
+ mfc_err_ctx("Failed to allocate encoding buffers\n");
return ret;
}
ret = s5p_mfc_set_enc_codec_buffers(ctx);
if (ret) {
- mfc_err_ctx("Failed to set enc codec buffers.\n");
+ mfc_err_ctx("Failed to set enc codec buffers\n");
return ret;
}
}
ret = s5p_mfc_reset_mfc(dev);
if (ret) {
- mfc_err_dev("Failed to reset MFC - timeout.\n");
+ mfc_err_dev("Failed to reset MFC - timeout\n");
goto err_init_hw;
}
mfc_debug(2, "Done MFC reset...\n");
/* 2. Release reset signal to the RISC */
s5p_mfc_risc_on(dev);
- mfc_debug(2, "Will now wait for completion of firmware transfer.\n");
+ mfc_debug(2, "Will now wait for completion of firmware transfer\n");
if (s5p_mfc_wait_for_done_dev(dev, S5P_FIMV_R2H_CMD_FW_STATUS_RET)) {
mfc_err_dev("Failed to RISC_ON\n");
s5p_mfc_clean_dev_int_flags(dev);
/* 3. Initialize firmware */
ret = s5p_mfc_cmd_sys_init(dev, buf_type);
if (ret) {
- mfc_err_dev("Failed to send command to MFC - timeout.\n");
+ mfc_err_dev("Failed to send command to MFC - timeout\n");
goto err_init_hw;
}
}
dev->int_condition = 0;
- if (dev->int_err != 0 || dev->int_reason !=
- S5P_FIMV_R2H_CMD_SYS_INIT_RET) {
+ if (dev->int_err != 0 || dev->int_reason != S5P_FIMV_R2H_CMD_SYS_INIT_RET) {
/* Failure. */
- mfc_err_dev("Failed to init firmware - error: %d"
- " int: %d.\n", dev->int_err, dev->int_reason);
+ mfc_err_dev("Failed to init firmware - error: %d, int: %d\n",
+ dev->int_err, dev->int_reason);
ret = -EIO;
goto err_init_hw;
}
MFC_TRACE_DEV_HWLOCK("**sleep (ctx:%d)\n", ctx->num);
ret = s5p_mfc_get_hwlock_dev(dev);
if (ret < 0) {
- mfc_err_dev("Failed to get hwlock.\n");
+ mfc_err_dev("Failed to get hwlock\n");
mfc_err_dev("dev.hwlock.dev = 0x%lx, bits = 0x%lx, owned_by_irq = %d, wl_count = %d, transfer_owner = %d\n",
dev->hwlock.dev, dev->hwlock.bits, dev->hwlock.owned_by_irq,
dev->hwlock.wl_count, dev->hwlock.transfer_owner);
}
dev->int_condition = 0;
- if (dev->int_err != 0 || dev->int_reason !=
- S5P_FIMV_R2H_CMD_SLEEP_RET) {
+ if (dev->int_err != 0 || dev->int_reason != S5P_FIMV_R2H_CMD_SLEEP_RET) {
/* Failure. */
- mfc_err_dev("Failed to sleep - error: %d"
- " int: %d.\n", dev->int_err, dev->int_reason);
+ mfc_err_dev("Failed to sleep - error: %d, int: %d\n",
+ dev->int_err, dev->int_reason);
ret = -EIO;
goto err_mfc_sleep;
}
MFC_TRACE_DEV_HWLOCK("**wakeup\n");
ret = s5p_mfc_get_hwlock_dev(dev);
if (ret < 0) {
- mfc_err_dev("Failed to get hwlock.\n");
+ mfc_err_dev("Failed to get hwlock\n");
mfc_err_dev("dev.hwlock.dev = 0x%lx, bits = 0x%lx, owned_by_irq = %d, wl_count = %d, transfer_owner = %d\n",
dev->hwlock.dev, dev->hwlock.bits, dev->hwlock.owned_by_irq,
dev->hwlock.wl_count, dev->hwlock.transfer_owner);
ret = s5p_mfc_reset_mfc(dev);
if (ret) {
- mfc_err_dev("Failed to reset MFC - timeout.\n");
+ mfc_err_dev("Failed to reset MFC - timeout\n");
goto err_mfc_wakeup;
}
mfc_debug(2, "Done MFC reset...\n");
/* 2. Release reset signal to the RISC */
s5p_mfc_risc_on(dev);
- mfc_debug(2, "Will now wait for completion of firmware transfer.\n");
+ mfc_debug(2, "Will now wait for completion of firmware transfer\n");
if (s5p_mfc_wait_for_done_dev(dev, S5P_FIMV_R2H_CMD_FW_STATUS_RET)) {
mfc_err_dev("Failed to RISC_ON\n");
dev->logging_data->cause |= (1 << MFC_CAUSE_FAIL_RISC_ON);
mfc_debug(2, "Ok, now will write a command to wakeup the system\n");
s5p_mfc_cmd_wakeup(dev);
- mfc_debug(2, "Will now wait for completion of firmware wake up.\n");
+ mfc_debug(2, "Will now wait for completion of firmware wake up\n");
if (s5p_mfc_wait_for_done_dev(dev, S5P_FIMV_R2H_CMD_WAKEUP_RET)) {
mfc_err_dev("Failed to WAKEUP\n");
dev->logging_data->cause |= (1 << MFC_CAUSE_FAIL_WAKEUP);
}
dev->int_condition = 0;
- if (dev->int_err != 0 || dev->int_reason !=
- S5P_FIMV_R2H_CMD_WAKEUP_RET) {
+ if (dev->int_err != 0 || dev->int_reason != S5P_FIMV_R2H_CMD_WAKEUP_RET) {
/* Failure. */
- mfc_err_dev("Failed to wakeup - error: %d"
- " int: %d.\n", dev->int_err, dev->int_reason);
+ mfc_err_dev("Failed to wakeup - error: %d, int: %d\n",
+ dev->int_err, dev->int_reason);
ret = -EIO;
goto err_mfc_wakeup;
}
debugfs->root = debugfs_create_dir("mfc", NULL);
if (!debugfs->root) {
- mfc_err_dev("debugfs: failed to create root derectory.\n");
+ mfc_err_dev("debugfs: failed to create root derectory\n");
return;
}
ctx->dst_fmt = mfc_dec_find_format(ctx, pix_fmt_mp->pixelformat);
if (!ctx->dst_fmt) {
- mfc_err_ctx("Unsupported format for destination.\n");
+ mfc_err_ctx("Unsupported format for destination\n");
return -EINVAL;
}
ctx->raw_buf.num_planes = ctx->dst_fmt->num_planes;
s5p_mfc_set_bit(ctx->num, &dev->work_bits);
s5p_mfc_clean_ctx_int_flags(ctx);
if (s5p_mfc_just_run(dev, ctx->num)) {
- mfc_err_ctx("Failed to run MFC.\n");
+ mfc_err_ctx("Failed to run MFC\n");
s5p_mfc_release_hwlock_ctx(ctx);
s5p_mfc_cleanup_work_bit_and_try_run(ctx);
return -EIO;
ctx->src_fmt = mfc_dec_find_format(ctx, pix_fmt_mp->pixelformat);
if (!ctx->src_fmt) {
- mfc_err_ctx("Unsupported format for source.\n");
+ mfc_err_ctx("Unsupported format for source\n");
return -EINVAL;
}
MFC_TRACE_CTX_HWLOCK("**DEC s_fmt\n");
ret = s5p_mfc_get_hwlock_ctx(ctx);
if (ret < 0) {
- mfc_err_ctx("Failed to get hwlock.\n");
+ mfc_err_ctx("Failed to get hwlock\n");
return -EBUSY;
}
ret = s5p_mfc_alloc_instance_context(ctx);
if (ret) {
- mfc_err_ctx("Failed to allocate dec instance[%d] buffers.\n",
+ mfc_err_ctx("Failed to allocate dec instance[%d] buffers\n",
ctx->num);
s5p_mfc_release_hwlock_ctx(ctx);
return -ENOMEM;
s5p_mfc_set_bit(ctx->num, &dev->work_bits);
ret = s5p_mfc_just_run(dev, ctx->num);
if (ret) {
- mfc_err_ctx("Failed to run MFC.\n");
+ mfc_err_ctx("Failed to run MFC\n");
s5p_mfc_release_hwlock_ctx(ctx);
s5p_mfc_cleanup_work_bit_and_try_run(ctx);
s5p_mfc_release_instance_context(ctx);
}
if (reqbufs->memory == V4L2_MEMORY_MMAP) {
- mfc_err_ctx("Not supported memory type (%d).\n", reqbufs->memory);
+ mfc_err_ctx("Not supported memory type (%d)\n", reqbufs->memory);
return -EINVAL;
}
/* Decoding */
if (ctx->output_state != QUEUE_FREE) {
- mfc_err_ctx("Bufs have already been requested.\n");
+ mfc_err_ctx("Bufs have already been requested\n");
return -EINVAL;
}
ret = vb2_reqbufs(&ctx->vq_src, reqbufs);
if (ret) {
- mfc_err_ctx("vb2_reqbufs on output failed.\n");
+ mfc_err_ctx("vb2_reqbufs on src failed\n");
return ret;
}
dec->dst_memtype = reqbufs->memory;
if (ctx->capture_state != QUEUE_FREE) {
- mfc_err_ctx("Bufs have already been requested.\n");
+ mfc_err_ctx("Bufs have already been requested\n");
return -EINVAL;
}
ret = vb2_reqbufs(&ctx->vq_dst, reqbufs);
if (ret) {
- mfc_err_ctx("vb2_reqbufs on capture failed.\n");
+ mfc_err_ctx("vb2_reqbufs on capture failed\n");
return ret;
}
if (reqbufs->count < ctx->dpb_count) {
- mfc_err_ctx("Not enough buffers allocated.\n");
+ mfc_err_ctx("Not enough buffers allocated\n");
reqbufs->count = 0;
vb2_reqbufs(&ctx->vq_dst, reqbufs);
return -ENOMEM;
ret = s5p_mfc_alloc_codec_buffers(ctx);
if (ret) {
- mfc_err_ctx("Failed to allocate decoding buffers.\n");
+ mfc_err_ctx("Failed to allocate decoding buffers\n");
reqbufs->count = 0;
vb2_reqbufs(&ctx->vq_dst, reqbufs);
return -ENOMEM;
mfc_debug_enter();
if (ctx->state == MFCINST_ERROR) {
- mfc_err_ctx("Call on QBUF after unrecoverable error.\n");
+ mfc_err_ctx("Call on QBUF after unrecoverable error\n");
return -EIO;
}
if (!buf->m.planes[0].bytesused) {
buf->m.planes[0].bytesused = buf->m.planes[0].length;
- mfc_debug(2, "Src input size zero, changed to buf size %d\n",
+ mfc_debug(2, "Src size zero, changed to buf size %d\n",
buf->m.planes[0].bytesused);
} else {
- mfc_debug(2, "Src input size = %d\n", buf->m.planes[0].bytesused);
+ mfc_debug(2, "Src size = %d\n", buf->m.planes[0].bytesused);
}
ret = vb2_qbuf(&ctx->vq_src, buf);
} else {
mfc_debug_enter();
if (ctx->state == MFCINST_ERROR) {
- mfc_err_ctx("Call on DQBUF after unrecoverable error.\n");
+ mfc_err_ctx("Call on DQBUF after unrecoverable error\n");
return -EIO;
}
if (buf->type == V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE) {
ctrl->value = ctx->dpb_count;
break;
} else if (ctx->state != MFCINST_INIT) {
- mfc_err_ctx("Decoding not initialised.\n");
+ mfc_err_ctx("Decoding not initialised\n");
return -EINVAL;
}
ctx->state < MFCINST_ABORT) {
ctrl->value = ctx->dpb_count;
} else {
- mfc_err_ctx("Decoding not initialised.\n");
+ mfc_err_ctx("Decoding not initialised\n");
return -EINVAL;
}
break;
case V4L2_CID_MPEG_MFC_SET_DYNAMIC_DPB_MODE:
dec->is_dynamic_dpb = ctrl->value;
if (dec->is_dynamic_dpb == 0)
- mfc_err_dev("[DPB] is_dynamic_dpb is 0. it has to be enabled.\n");
+ mfc_err_dev("[DPB] is_dynamic_dpb is 0. it has to be enabled\n");
break;
case V4L2_CID_MPEG_MFC_SET_USER_SHARED_HANDLE:
if (dec->sh_handle.fd == -1) {
vb->index) < 0)
mfc_err_ctx("failed in init_buf_ctrls\n");
} else {
- mfc_err_ctx("s5p_mfc_dec_buf_init: unknown queue type.\n");
+ mfc_err_ctx("s5p_mfc_dec_buf_init: unknown queue type\n");
return -EINVAL;
}
MFC_CTRL_TYPE_SRC, index) < 0)
mfc_err_ctx("failed in cleanup_buf_ctrls\n");
} else {
- mfc_err_ctx("s5p_mfc_dec_buf_cleanup: unknown queue type.\n");
+ mfc_err_ctx("s5p_mfc_dec_buf_cleanup: unknown queue type\n");
}
mfc_debug_leave();
ret = s5p_mfc_just_run(dev, ctx->num);
if (ret) {
- mfc_err_ctx("Failed to run MFC.\n");
+ mfc_err_ctx("Failed to run MFC\n");
} else {
if (s5p_mfc_wait_for_done_ctx(ctx, condition))
mfc_err_ctx("special parsing time out\n");
/* If a H/W operation is in progress, wait for it complete */
ret = s5p_mfc_get_hwlock_ctx(ctx);
if (ret < 0) {
- mfc_err_ctx("Failed to get hwlock.\n");
+ mfc_err_ctx("Failed to get hwlock\n");
return;
}
mfc_info_ctx("try to DPB flush\n");
ret = s5p_mfc_just_run(dev, ctx->num);
if (ret) {
- mfc_err_ctx("Failed to run MFC.\n");
+ mfc_err_ctx("Failed to run MFC\n");
s5p_mfc_release_hwlock_ctx(ctx);
s5p_mfc_cleanup_work_bit_and_try_run(ctx);
return;
ctx->dst_fmt = mfc_enc_find_format(ctx, pix_fmt_mp->pixelformat);
if (!ctx->dst_fmt) {
- mfc_err_ctx("Unsupported format for destination.\n");
+ mfc_err_ctx("Unsupported format for destination\n");
return -EINVAL;
}
ret = s5p_mfc_alloc_instance_context(ctx);
if (ret) {
- mfc_err_ctx("Failed to allocate enc instance[%d] buffers.\n",
+ mfc_err_ctx("Failed to allocate enc instance[%d] buffers\n",
ctx->num);
return -ENOMEM;
}
ret = s5p_mfc_get_hwlock_ctx(ctx);
if (ret < 0) {
- mfc_err_dev("Failed to get hwlock.\n");
+ mfc_err_dev("Failed to get hwlock\n");
s5p_mfc_release_instance_context(ctx);
s5p_mfc_release_enc_roi_buffer(ctx);
return -EBUSY;
s5p_mfc_set_bit(ctx->num, &dev->work_bits);
ret = s5p_mfc_just_run(dev, ctx->num);
if (ret) {
- mfc_err_ctx("Failed to run MFC.\n");
+ mfc_err_ctx("Failed to run MFC\n");
s5p_mfc_release_hwlock_ctx(ctx);
s5p_mfc_cleanup_work_bit_and_try_run(ctx);
s5p_mfc_release_instance_context(ctx);
ctx->src_fmt = mfc_enc_find_format(ctx, pix_fmt_mp->pixelformat);
if (!ctx->src_fmt) {
- mfc_err_ctx("Unsupported format for source.\n");
+ mfc_err_ctx("Unsupported format for source\n");
return -EINVAL;
}
mfc_debug_enter();
if (reqbufs->memory == V4L2_MEMORY_MMAP) {
- mfc_err_ctx("Not supported memory type (%d).\n", reqbufs->memory);
+ mfc_err_ctx("Not supported memory type (%d)\n", reqbufs->memory);
return -EINVAL;
}
}
if (ctx->state == MFCINST_ERROR) {
- mfc_err_ctx("Call on QBUF after unrecoverable error.\n");
+ mfc_err_ctx("Call on QBUF after unrecoverable error\n");
return -EIO;
}
}
if (ctx->state == MFCINST_ERROR) {
- mfc_err_ctx("Call on DQBUF after unrecoverable error.\n");
+ mfc_err_ctx("Call on DQBUF after unrecoverable error\n");
return -EIO;
}
if (buf->type == V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE) {
dma_buf_put(dmabuf[i]);
start_raw = s5p_mfc_mem_get_daddr_vb(vb, 0);
if (start_raw == 0) {
- mfc_err_ctx("Plane mem not allocated.\n");
+ mfc_err_ctx("Plane mem not allocated\n");
return -ENOMEM;
}
if (ctx->src_fmt->fourcc == V4L2_PIX_FMT_NV12N) {
MFC_CTRL_TYPE_SRC, index) < 0)
mfc_err_ctx("failed in cleanup_buf_ctrls\n");
} else {
- mfc_err_ctx("s5p_mfc_enc_buf_cleanup: unknown queue type.\n");
+ mfc_err_ctx("s5p_mfc_enc_buf_cleanup: unknown queue type\n");
}
mfc_debug_leave();
MFC_TRACE_CTX_HWLOCK("**ENC streamoff(type:%d)\n", q->type);
ret = s5p_mfc_get_hwlock_ctx(ctx);
if (ret < 0) {
- mfc_err_ctx("Failed to get hwlock.\n");
+ mfc_err_ctx("Failed to get hwlock\n");
return;
}
while (s5p_mfc_get_buf(&ctx->buf_queue_lock, &ctx->dst_buf_queue, MFC_BUF_NO_TOUCH_USED)) {
ret = s5p_mfc_just_run(dev, ctx->num);
if (ret) {
- mfc_err_ctx("Failed to run MFC.\n");
+ mfc_err_ctx("Failed to run MFC\n");
break;
}
if (s5p_mfc_wait_for_done_ctx(ctx, S5P_FIMV_R2H_CMD_FRAME_DONE_RET)) {
mfc_print_hwlock(dev);
if (dev->shutdown) {
- mfc_info_dev("Couldn't lock HW. Shutdown was called.\n");
+ mfc_info_dev("Couldn't lock HW. Shutdown was called\n");
spin_unlock_irqrestore(&dev->hwlock.lock, flags);
mutex_unlock(&dev->hwlock_wq.wait_mutex);
return -EINVAL;
spin_unlock_irqrestore(&dev->hwlock.lock, flags);
- mfc_debug(2, "Waiting for hwlock to be released.\n");
+ mfc_debug(2, "Waiting for hwlock to be released\n");
ret = wait_event_timeout(dev->hwlock_wq.wait_queue,
((dev->hwlock.transfer_owner == 1) && (dev->hwlock.dev == 1)),
mfc_print_hwlock(dev);
if (dev->shutdown) {
- mfc_info_dev("Couldn't lock HW. Shutdown was called.\n");
+ mfc_info_dev("Couldn't lock HW. Shutdown was called\n");
spin_unlock_irqrestore(&dev->hwlock.lock, flags);
mutex_unlock(&curr_ctx->hwlock_wq.wait_mutex);
return -EINVAL;
dev->hwlock.dev, dev->hwlock.bits, dev->hwlock.owned_by_irq,
dev->hwlock.wl_count, dev->hwlock.transfer_owner);
- mfc_debug(2, "Waiting for hwlock to be released.\n");
+ mfc_debug(2, "Waiting for hwlock to be released\n");
ret = wait_event_timeout(curr_ctx->hwlock_wq.wait_queue,
((dev->hwlock.transfer_owner == 1) && (test_bit(curr_ctx->num, &dev->hwlock.bits))),
dev->hwlock.owned_by_irq = 0;
if (dev->shutdown) {
- mfc_debug(2, "Couldn't wakeup module. Shutdown was called.\n");
+ mfc_debug(2, "Couldn't wakeup module. Shutdown was called\n");
ret = 0;
} else if (list_empty(&dev->hwlock.waiting_list)) {
- mfc_debug(2, "No waiting module.\n");
+ mfc_debug(2, "No waiting module\n");
ret = 0;
} else {
- mfc_debug(2, "There is a waiting module.\n");
+ mfc_debug(2, "There is a waiting module\n");
listable_wq = list_entry(dev->hwlock.waiting_list.next, struct s5p_mfc_listable_wq, list);
list_del(&listable_wq->list);
dev->hwlock.wl_count--;
dev->hwlock.transfer_owner = 1;
- MFC_TRACE_DEV_HWLOCK("release_hwlock_dev: wakeup.\n");
+ MFC_TRACE_DEV_HWLOCK("release_hwlock_dev: wakeup\n");
MFC_TRACE_DEV_HWLOCK(">>dev:0x%lx, bits:0x%lx, owned:%d, wl:%d, trans:%d\n",
dev->hwlock.dev, dev->hwlock.bits, dev->hwlock.owned_by_irq,
dev->hwlock.wl_count, dev->hwlock.transfer_owner);
dev->hwlock.owned_by_irq = 0;
if (dev->shutdown) {
- mfc_debug(2, "Couldn't wakeup module. Shutdown was called.\n");
+ mfc_debug(2, "Couldn't wakeup module. Shutdown was called\n");
ret = 0;
} else if (list_empty(&dev->hwlock.waiting_list)) {
- mfc_debug(2, "No waiting module.\n");
+ mfc_debug(2, "No waiting module\n");
ret = 0;
} else {
- mfc_debug(2, "There is a waiting module.\n");
+ mfc_debug(2, "There is a waiting module\n");
listable_wq = list_entry(dev->hwlock.waiting_list.next, struct s5p_mfc_listable_wq, list);
list_del(&listable_wq->list);
dev->hwlock.wl_count--;
dev->hwlock.transfer_owner = 1;
- MFC_TRACE_CTX_HWLOCK("release_hwlock_ctx: wakeup.\n");
+ MFC_TRACE_CTX_HWLOCK("release_hwlock_ctx: wakeup\n");
MFC_TRACE_CTX_HWLOCK(">>dev:0x%lx, bits:0x%lx, owned:%d, wl:%d, trans:%d\n",
dev->hwlock.dev, dev->hwlock.bits, dev->hwlock.owned_by_irq,
dev->hwlock.wl_count, dev->hwlock.transfer_owner);
}
if (dev->shutdown) {
- mfc_info_dev("Couldn't lock HW. Shutdown was called.\n");
+ mfc_info_dev("Couldn't lock HW. Shutdown was called\n");
return -EINVAL;
}
if (dev->sleep) {
- mfc_info_dev("Couldn't lock HW. Sleep was called.\n");
+ mfc_info_dev("Couldn't lock HW. Sleep was called\n");
return -EINVAL;
}
/* Check whether hardware is not running */
if ((dev->hwlock.bits != 0) || (dev->hwlock.dev != 0)) {
/* This is perfectly ok, the scheduled ctx should wait */
- mfc_debug(2, "Couldn't lock HW.\n");
+ mfc_debug(2, "Couldn't lock HW\n");
return -1;
}
/* This is perfectly ok, the scheduled ctx should wait
* No contexts to run
*/
- mfc_debug(2, "No ctx is scheduled to be run.\n");
+ mfc_debug(2, "No ctx is scheduled to be run\n");
ret = -1;
return ret;
}
new_ctx_index = mfc_try_to_get_new_ctx_protected(dev);
if (new_ctx_index < 0) {
- mfc_debug(2, "Failed to get new context to run.\n");
+ mfc_debug(2, "Failed to get new context to run\n");
mfc_print_hwlock(dev);
spin_unlock_irqrestore(&dev->hwlock.lock, flags);
return;
mfc_info_ctx("[NALQ] stop NAL QUEUE\n");
if (s5p_mfc_wait_for_done_dev(dev,
S5P_FIMV_R2H_CMD_COMPLETE_QUEUE_RET)) {
- mfc_err_dev("[NALQ] Failed to stop queue.\n");
+ mfc_err_dev("[NALQ] Failed to stop queue\n");
dev->logging_data->cause |= (1 << MFC_CAUSE_FAIL_STOP_NAL_Q);
call_dop(dev, dump_and_stop_always, dev);
}
ret = s5p_mfc_cmd_open_inst(ctx);
if (ret) {
- mfc_err_ctx("Failed to create a new instance.\n");
+ mfc_err_ctx("Failed to create a new instance\n");
s5p_mfc_change_state(ctx, MFCINST_ERROR);
}
ret = s5p_mfc_cmd_close_inst(ctx);
if (ret) {
- mfc_err_ctx("Failed to return an instance.\n");
+ mfc_err_ctx("Failed to return an instance\n");
s5p_mfc_change_state(ctx, MFCINST_ERROR);
}
break;
}
- mfc_debug(2, "Decoding a usual frame.\n");
+ mfc_debug(2, "Decoding a usual frame\n");
return 0;
}
else if (IS_BPG_ENC(ctx))
s5p_mfc_set_enc_params_bpg(ctx);
else {
- mfc_err_ctx("Unknown codec for encoding (%x).\n",
+ mfc_err_ctx("Unknown codec for encoding (%x)\n",
ctx->codec_mode);
return -EINVAL;
}
src_mb = s5p_mfc_get_del_buf(&ctx->buf_queue_lock, &ctx->src_buf_queue, MFC_BUF_NO_TOUCH_USED);
if (!src_mb) {
- mfc_err_dev("no src buffers.\n");
+ mfc_err_dev("no src buffers\n");
} else {
index = src_mb->vb.vb2_buf.index;
if (call_cop(ctx, recover_buf_ctrls_val, ctx, &ctx->src_ctrls[index]) < 0)
mfc_err_ctx("failed in recover_buf_ctrls_val\n");
- mfc_debug(2, "MFC needs next buffer.\n");
+ mfc_debug(2, "MFC needs next buffer\n");
dec->consumed = 0;
if (call_cop(ctx, get_buf_ctrls_val, ctx, &ctx->src_ctrls[index]) < 0)
vb2_buffer_done(&src_mb->vb.vb2_buf, VB2_BUF_STATE_ERROR);
}
- mfc_debug(2, "Assesing whether this context should be run again.\n");
+ mfc_debug(2, "Assesing whether this context should be run again\n");
}
static void mfc_handle_ref_frame(struct s5p_mfc_ctx *ctx)
* For non-paired field, the same buffer need to be
* resubmitted and the consumed stream will be 0
*/
- mfc_debug(2, "Not paired field. Running again the same buffer.\n");
+ mfc_debug(2, "Not paired field. Running again the same buffer\n");
return;
}
src_mb = s5p_mfc_get_del_if_consumed(ctx, &ctx->src_buf_queue,
s5p_mfc_get_consumed_stream(), STUFF_BYTE, err, &deleted);
if (!src_mb) {
- mfc_err_dev("no src buffers.\n");
+ mfc_err_dev("no src buffers\n");
return;
}
if (IS_H264_DEC(ctx) && sei_avail_frame_pack &&
dst_frame_status == S5P_FIMV_DEC_STATUS_DECODING_ONLY) {
- mfc_debug(2, "Frame packing SEI exists for a frame.\n");
- mfc_debug(2, "Reallocate DPBs and issue init_buffer.\n");
+ mfc_debug(2, "Frame packing SEI exists for a frame\n");
+ mfc_debug(2, "Reallocate DPBs and issue init_buffer\n");
ctx->is_dpb_realloc = 1;
s5p_mfc_change_state(ctx, MFCINST_HEAD_PARSED);
ctx->capture_state = QUEUE_FREE;
if (ctx->state == MFCINST_RES_CHANGE_FLUSH) {
struct mfc_timestamp *temp_ts = NULL;
- mfc_debug(2, "[DRC] Last frame received after resolution change.\n");
+ mfc_debug(2, "[DRC] Last frame received after resolution change\n");
mfc_handle_frame_all_extracted(ctx);
s5p_mfc_change_state(ctx, MFCINST_RES_CHANGE_END);
/* If there is no display frame after resolution change,
if (s5p_mfc_dec_status_display(dst_frame_status))
mfc_handle_frame_new(ctx, err);
else
- mfc_debug(2, "No frame decode.\n");
+ mfc_debug(2, "No frame decode\n");
/* Mark source buffer as complete */
if (dst_frame_status != S5P_FIMV_DEC_STATUS_DISPLAY_ONLY)
mfc_handle_frame_input(ctx, err);
leave_handle_frame:
- mfc_debug(2, "Assesing whether this context should be run again.\n");
+ mfc_debug(2, "Assesing whether this context should be run again\n");
}
static void mfc_handle_stream_copy_timestamp(struct s5p_mfc_ctx *ctx, struct s5p_mfc_buf *src_mb)
dst_mb = s5p_mfc_get_del_buf(&ctx->buf_queue_lock,
&ctx->dst_buf_queue, MFC_BUF_NO_TOUCH_USED);
if (!dst_mb) {
- mfc_err_ctx("no dst buffers.\n");
+ mfc_err_ctx("no dst buffers\n");
return;
}
s5p_mfc_cleanup_queue(&ctx->buf_queue_lock, &ctx->src_buf_queue);
break;
default:
- mfc_err_ctx("Encountered an error interrupt which had not been handled.\n");
+ mfc_err_ctx("Encountered an error interrupt which had not been handled\n");
mfc_err_ctx("ctx->state = %d, ctx->inst_no = %d\n",
ctx->state, ctx->inst_no);
break;
if (IS_BPG_ENC(ctx)) {
dst_mb = s5p_mfc_get_buf(&ctx->buf_queue_lock, &ctx->dst_buf_queue, MFC_BUF_NO_TOUCH_USED);
if (!dst_mb) {
- mfc_err_dev("no dst buffers.\n");
+ mfc_err_dev("no dst buffers\n");
return -EAGAIN;
}
dst_mb = s5p_mfc_get_del_buf(&ctx->buf_queue_lock,
&ctx->dst_buf_queue, MFC_BUF_NO_TOUCH_USED);
if (!dst_mb) {
- mfc_err_dev("no dst buffers.\n");
+ mfc_err_dev("no dst buffers\n");
return -EAGAIN;
}
}
ret = s5p_mfc_alloc_codec_buffers(ctx);
if (ret) {
- mfc_err_ctx("Failed to allocate encoding buffers.\n");
+ mfc_err_ctx("Failed to allocate encoding buffers\n");
return ret;
}
break;
}
if (time_after(jiffies, timeout)) {
- mfc_err_dev("[MMCACHE] Timeout while invalidation.\n");
+ mfc_err_dev("[MMCACHE] Timeout while invalidation\n");
call_dop(dev, dump_and_stop_debug_mode, dev);
break;
}
}
/* NAL-Q doesn't support OTF mode */
if (temp_ctx->otf_handle) {
- mfc_debug(2, "There is a OTF node.\n");
+ mfc_debug(2, "There is a OTF node\n");
return 0;
}
/* NAL-Q doesn't support BPG */
mfc_debug(2, "[NALQ] nal_q_clk_cnt = %d\n", nal_q_handle->nal_q_clk_cnt);
if (!nal_q_handle->nal_q_clk_cnt) {
- mfc_err_dev("[NALQ] nal_q_clk_cnt is already zero.\n");
+ mfc_err_dev("[NALQ] nal_q_clk_cnt is already zero\n");
return;
}
/* Get the next source buffer */
src_mb = s5p_mfc_get_buf(&ctx->buf_queue_lock, &ctx->src_buf_nal_queue, MFC_BUF_NO_TOUCH_USED);
if (!src_mb) {
- mfc_err_dev("[NALQ] no src buffers.\n");
+ mfc_err_dev("[NALQ] no src buffers\n");
return;
}
src_mb = s5p_mfc_get_del_if_consumed(ctx, &ctx->src_buf_nal_queue,
consumed, STUFF_BYTE, err, &deleted);
if (!src_mb) {
- mfc_err_dev("[NALQ] no src buffers.\n");
+ mfc_err_dev("[NALQ] no src buffers\n");
return;
}
if (!deleted) {
/* Run MFC again on the same buffer */
- mfc_debug(2, "[NALQ][MULTIFRAME] Running again the same buffer.\n");
+ mfc_debug(2, "[NALQ][MULTIFRAME] Running again the same buffer\n");
if (CODEC_MULTIFRAME(ctx))
dec->y_addr_for_pb = (dma_addr_t)pOutStr->DecodedAddr[0];
if (s5p_mfc_dec_status_display(dst_frame_status))
mfc_nal_q_handle_frame_new(ctx, err, pOutStr);
else
- mfc_debug(2, "[NALQ] No display frame.\n");
+ mfc_debug(2, "[NALQ] No display frame\n");
/* Mark source buffer as complete */
if (dst_frame_status != S5P_FIMV_DEC_STATUS_DISPLAY_ONLY)
&ctx->src_buf_nal_queue, MFC_BUF_NO_TOUCH_USED);
if (!src_mb) {
- mfc_err_dev("[NALQ] no src buffers.\n");
+ mfc_err_dev("[NALQ] no src buffers\n");
} else {
dec->consumed = 0;
vb2_buffer_done(&src_mb->vb.vb2_buf, VB2_BUF_STATE_ERROR);
&ctx->src_buf_nal_queue, MFC_BUF_NO_TOUCH_USED);
if (!src_mb)
- mfc_err_dev("[NALQ] no src buffers.\n");
+ mfc_err_dev("[NALQ] no src buffers\n");
else
vb2_buffer_done(&src_mb->vb.vb2_buf, VB2_BUF_STATE_ERROR);
/* Get the next source buffer */
src_mb = s5p_mfc_get_buf(&ctx->buf_queue_lock, &ctx->src_buf_queue, MFC_BUF_NO_TOUCH_USED);
if (!src_mb) {
- mfc_err_dev("no src buffers.\n");
+ mfc_err_dev("no src buffers\n");
return -EAGAIN;
}
- mfc_debug(2, "Preparing to init decoding.\n");
+ mfc_debug(2, "Preparing to init decoding\n");
mfc_debug(2, "Header size: %d, (offset: %lu)\n",
src_mb->vb.vb2_buf.planes[0].bytesused, dec->consumed);
/* Get the next source buffer */
src_mb = s5p_mfc_get_buf(&ctx->buf_queue_lock, &ctx->src_buf_queue, MFC_BUF_SET_USED);
if (!src_mb) {
- mfc_debug(2, "no src buffers.\n");
+ mfc_debug(2, "no src buffers\n");
return -EAGAIN;
}
/* Frames are being decoded */
if (!src_mb) {
- mfc_debug(2, "no src buffers.\n");
+ mfc_debug(2, "no src buffers\n");
s5p_mfc_set_dec_stream_buffer(ctx, 0, 0, 0);
} else {
if (dec->consumed) {
dst_mb = s5p_mfc_get_buf(&ctx->buf_queue_lock, &ctx->dst_buf_queue, MFC_BUF_NO_TOUCH_USED);
if (!dst_mb) {
- mfc_debug(2, "no dst buffers.\n");
+ mfc_debug(2, "no dst buffers\n");
return -EAGAIN;
}
/* Get the next source buffer */
src_mb = s5p_mfc_get_buf(&ctx->buf_queue_lock, &ctx->src_buf_queue, MFC_BUF_SET_USED);
if (!src_mb) {
- mfc_debug(2, "no src buffers.\n");
+ mfc_debug(2, "no src buffers\n");
return -EAGAIN;
}
dst_mb = s5p_mfc_get_buf(&ctx->buf_queue_lock, &ctx->dst_buf_queue, MFC_BUF_SET_USED);
if (!dst_mb) {
- mfc_debug(2, "no dst buffers.\n");
+ mfc_debug(2, "no dst buffers\n");
return -EAGAIN;
}
dst_mb = s5p_mfc_get_buf(&ctx->buf_queue_lock, &ctx->dst_buf_queue, MFC_BUF_SET_USED);
if (!dst_mb) {
- mfc_debug(2, "no dst buffers.\n");
+ mfc_debug(2, "no dst buffers\n");
return -EAGAIN;
}
if (ctx->state == MFCINST_RUNNING && handle->otf_work_bit)
return 1;
- mfc_debug(2, "[OTF] ctx is not ready.\n");
+ mfc_debug(2, "[OTF] ctx is not ready\n");
mfc_debug_leave();
s5p_mfc_change_state(ctx, MFCINST_HEAD_PARSED);
if (s5p_mfc_alloc_codec_buffers(ctx)) {
- mfc_err_ctx("[OTF] Failed to allocate encoding buffers.\n");
+ mfc_err_ctx("[OTF] Failed to allocate encoding buffers\n");
return -EINVAL;
}
#endif
break;
default:
- mfc_err_ctx("Encountered an error interrupt which had not been handled.\n");
+ mfc_err_ctx("Encountered an error interrupt which had not been handled\n");
mfc_err_ctx("ctx->state = %d, ctx->inst_no = %d\n",
ctx->state, ctx->inst_no);
break;
mfc_err_ctx("[DPB] dst_buf_queue is empty\n");
return NULL;
}
- mfc_debug(3, "[DPB] We should use this buffer.\n");
+ mfc_debug(3, "[DPB] We should use this buffer\n");
mfc_buf = list_entry(ctx->dst_buf_queue.head.next,
struct s5p_mfc_buf, list);
} else if ((ctx->dst_buf_queue.count == 0)
mfc_err_ctx("[DPB] ref_buf_queue is empty\n");
return NULL;
}
- mfc_debug(3, "[DPB] All buffers are referenced.\n");
+ mfc_debug(3, "[DPB] All buffers are referenced\n");
mfc_buf = list_entry(ctx->ref_buf_queue.head.next,
struct s5p_mfc_buf, list);
} else {
wait_condition(dev, command),
msecs_to_jiffies(MFC_INT_TIMEOUT));
if (ret == 0) {
- mfc_err_dev("Interrupt (dev->int_reason:%d, command:%d) timed out.\n",
+ mfc_err_dev("Interrupt (dev->int_reason:%d, command:%d) timed out\n",
dev->int_reason, command);
if (s5p_mfc_check_risc2host(dev)) {
ret = wait_event_timeout(dev->cmd_wq,
}
wait_done:
- mfc_debug(2, "Finished waiting (dev->int_reason:%d, command: %d).\n",
+ mfc_debug(2, "Finished waiting (dev->int_reason:%d, command: %d)\n",
dev->int_reason, command);
return 0;
}
wait_condition(ctx, command),
msecs_to_jiffies(timeout));
if (ret == 0) {
- mfc_err_ctx("Interrupt (ctx->int_reason:%d, command:%d) timed out.\n",
+ mfc_err_ctx("Interrupt (ctx->int_reason:%d, command:%d) timed out\n",
ctx->int_reason, command);
if (s5p_mfc_check_risc2host(dev)) {
ret = wait_event_timeout(ctx->cmd_wq,
wait_done:
if (is_err_cond(ctx)) {
- mfc_err_ctx("Finished (ctx->int_reason:%d, command: %d).\n",
+ mfc_err_ctx("Finished (ctx->int_reason:%d, command: %d)\n",
ctx->int_reason, command);
- mfc_err_ctx("But error (ctx->int_err:%d).\n", ctx->int_err);
+ mfc_err_ctx("But error (ctx->int_err:%d)\n", ctx->int_err);
call_dop(dev, dump_and_stop_debug_mode, dev);
return -1;
}
- mfc_debug(2, "Finished waiting (ctx->int_reason:%d, command: %d).\n",
+ mfc_debug(2, "Finished waiting (ctx->int_reason:%d, command: %d)\n",
ctx->int_reason, command);
return 0;
}
return 1;
s5p_mfc_perf_cancel_drv_margin(dev);
- mfc_debug(2, "ctx is not ready.\n");
+ mfc_debug(2, "ctx is not ready\n");
return 0;
}
return 1;
s5p_mfc_perf_cancel_drv_margin(dev);
- mfc_debug(2, "ctx is not ready.\n");
+ mfc_debug(2, "ctx is not ready\n");
return 0;
}