static void __mfc_dec_calc_codec_buffer_size(struct mfc_ctx *ctx)
{
struct mfc_dec *dec;
- int i;
dec = ctx->dec_priv;
int mfc_cmd_dec_init_buffers(struct mfc_ctx *ctx)
{
struct mfc_dev *dev = ctx->dev;
- struct mfc_dec *dec = ctx->dec_priv;
unsigned int reg = 0, pix_val;
int ret;
static int mfc_dec_s_ctrl(struct file *file, void *priv,
struct v4l2_control *ctrl)
{
- struct mfc_dev *dev = video_drvdata(file);
struct mfc_ctx *ctx = fh_to_mfc_ctx(file->private_data);
struct mfc_dec *dec = ctx->dec_priv;
struct mfc_ctx_ctrl *ctx_ctrl;
{
struct vb2_queue *vq = vb->vb2_queue;
struct mfc_ctx *ctx = vq->drv_priv;
- struct mfc_dev *dev = ctx->dev;
- struct mfc_dec *dec = ctx->dec_priv;
struct mfc_buf *buf = vb_to_mfc_buf(vb);
dma_addr_t start_raw;
int i, ret;
mfc_debug(2, "[FRAME] single plane vb size: %lu, calc size: %d\n",
buf_size, raw->total_plane_size);
if (buf_size < raw->total_plane_size) {
- mfc_err_ctx("[FRAME] single plane size(%d) is smaller than (%d)\n",
+ mfc_err_ctx("[FRAME] single plane size(%lu) is smaller than (%d)\n",
buf_size, raw->total_plane_size);
return -EINVAL;
}
mfc_debug(2, "[FRAME] plane[%d] vb size: %lu, calc size: %d\n",
i, buf_size, raw->plane_size[i]);
if (buf_size < raw->plane_size[i]) {
- mfc_err_ctx("[FRAME] plane[%d] size(%d) is smaller than (%d)\n",
+ mfc_err_ctx("[FRAME] plane[%d] size(%lu) is smaller than (%d)\n",
i, buf_size, raw->plane_size[i]);
return -EINVAL;
}
buf_size, dec->src_buf_size);
if (buf_size < dec->src_buf_size) {
- mfc_err_ctx("[STREAM] size(%d) is smaller than (%d)\n",
+ mfc_err_ctx("[STREAM] size(%lu) is smaller than (%d)\n",
buf_size, dec->src_buf_size);
return -EINVAL;
}
buf_size, enc->dst_buf_size);
if (buf_size < enc->dst_buf_size) {
- mfc_err_ctx("[STREAM] size(%d) is smaller than (%d)\n",
+ mfc_err_ctx("[STREAM] size(%lu) is smaller than (%d)\n",
buf_size, enc->dst_buf_size);
return -EINVAL;
}
mfc_debug(2, "[FRAME] single plane vb size: %lu, calc size: %d\n",
buf_size, raw->total_plane_size);
if (buf_size < raw->total_plane_size) {
- mfc_err_ctx("[FRAME] single plane size(%d) is smaller than (%d)\n",
+ mfc_err_ctx("[FRAME] single plane size(%lu) is smaller than (%d)\n",
buf_size, raw->total_plane_size);
return -EINVAL;
}
mfc_debug(2, "[FRAME] plane[%d] vb size: %lu, calc size: %d\n",
i, buf_size, raw->plane_size[i]);
if (buf_size < raw->plane_size[i]) {
- mfc_err_ctx("[FRAME] plane[%d] size(%d) is smaller than (%d)\n",
+ mfc_err_ctx("[FRAME] plane[%d] size(%lu) is smaller than (%d)\n",
i, buf_size, raw->plane_size[i]);
return -EINVAL;
}
MFC_WRITEL(fw_buf->daddr, MFC_REG_RISC_BASE_ADDRESS);
mfc_debug(2, "[MEMINFO][F/W] %s Base Address : %#x\n",
- buf_type == MFCBUF_DRM ? "DRM" : "NORMAL", fw_buf->daddr);
+ buf_type == MFCBUF_DRM ? "DRM" : "NORMAL", (u32)fw_buf->daddr);
MFC_TRACE_DEV("%s F/W Base Address : %#x\n",
- buf_type == MFCBUF_DRM ? "DRM" : "NORMAL", fw_buf->daddr);
+ buf_type == MFCBUF_DRM ? "DRM" : "NORMAL", (u32)fw_buf->daddr);
}
void mfc_cmd_host2risc(struct mfc_dev *dev, int cmd)
static void __mfc_handle_stream_copy_timestamp(struct mfc_ctx *ctx, struct mfc_buf *src_mb)
{
- struct mfc_dev *dev = ctx->dev;
struct mfc_enc *enc = ctx->enc_priv;
struct mfc_enc_params *p = &enc->params;
struct mfc_buf *dst_mb;
for (i = 0; i < raw->num_planes; i++) {
pInStr->Frame2bitAddr[i] = addr_2bit[i];
- mfc_debug(2, "[NALQ][BUFINFO] ctx[%d] set src 2bit addr[%d]: 0x%08llx\n",
+ mfc_debug(2, "[NALQ][BUFINFO] ctx[%d] set src index:%d, 2bit addr[%d]: 0x%08llx\n",
ctx->num, index, i, addr_2bit[i]);
}
} else if (ctx->src_fmt->fourcc == V4L2_PIX_FMT_NV16M_S10B ||
for (i = 0; i < raw->num_planes; i++) {
pInStr->Frame2bitAddr[i] = addr_2bit[i];
- mfc_debug(2, "[NALQ][BUFINFO] ctx[%d] set src 2bit addr[%d]: 0x%08llx\n",
+ mfc_debug(2, "[NALQ][BUFINFO] ctx[%d] set src index:%d, 2bit addr[%d]: 0x%08llx\n",
ctx->num, index, i, addr_2bit[i]);
}
}
if (call_cop(ctx, set_buf_ctrls_val_nal_q_enc, ctx, &ctx->src_ctrls[index], pInStr) < 0)
mfc_err_ctx("[NALQ] failed in set_buf_ctrals_val in nal q\n");
- mfc_debug(2, "[NALQ][BUFINFO] ctx[%d] set dst index: %d, addr: 0x%08llx\n",
+ mfc_debug(2, "[NALQ][BUFINFO] ctx[%d] set dst index: %d, addr: 0x%08x\n",
ctx->num, dst_mb->vb.vb2_buf.index, pInStr->StreamBufferAddr);
mfc_debug(2, "[NALQ] input queue, src_buf_queue -> src_buf_nal_queue, index:%d\n",
src_mb->vb.vb2_buf.index);
mfc_debug(2, "[NALQ][BUFINFO] ctx[%d] set src index: %d, addr: 0x%08llx\n",
ctx->num, src_index, buf_addr);
- mfc_debug(2, "[NALQ][STREAM] strm_size: %#lx(%d), buf_size: %u\n",
+ mfc_debug(2, "[NALQ][STREAM] strm_size: %#x(%d), buf_size: %u\n",
strm_size, strm_size, cpb_buf_size);
if (strm_size == 0)
static void __mfc_nal_q_handle_stream_copy_timestamp(struct mfc_ctx *ctx, struct mfc_buf *src_mb)
{
- struct mfc_dev *dev = ctx->dev;
struct mfc_enc *enc = ctx->enc_priv;
struct mfc_enc_params *p = &enc->params;
struct mfc_buf *dst_mb;
static void __mfc_nal_q_handle_frame_copy_timestamp(struct mfc_ctx *ctx, DecoderOutputStr *pOutStr)
{
- struct mfc_dec *dec = ctx->dec_priv;
- struct mfc_dev *dev = ctx->dev;
struct mfc_buf *ref_mb, *src_mb;
dma_addr_t dec_y_addr;
{
#ifdef CONFIG_VIDEO_EXYNOS_REPEATER
struct shared_buffer_info *shared_buf_info;
-#endif
struct _otf_handle *handle = ctx->otf_handle;
struct _otf_buf_info *buf_info = &handle->otf_buf_info;
+#endif
mfc_debug_enter();
mfc_debug(2, "[BUFINFO] addr[0]: 0x%08llx\n", mfc_buf->addr[0][0]);
if (mfc_check_vb_flag(mfc_buf, f)) {
- mfc_debug(2, "find flag %ld\n", f);
+ mfc_debug(2, "find flag %d\n", f);
spin_unlock_irqrestore(&ctx->buf_queue_lock, flags);
return 1;
}
- mfc_debug(4, "no flag %ld\n", f);
+ mfc_debug(4, "no flag %d\n", f);
spin_unlock_irqrestore(&ctx->buf_queue_lock, flags);
return 0;
mfc_debug(2, "[BUFINFO] ctx[%d] set src index: %d, addr: 0x%08llx\n",
ctx->num, index, addr);
- mfc_debug(2, "[STREAM] strm_size: %#lx(%d), buf_size: %u, offset: %u\n",
+ mfc_debug(2, "[STREAM] strm_size: %#x(%d), buf_size: %u, offset: %u\n",
strm_size, strm_size, cpb_buf_size, start_num_byte);
if (strm_size == 0)
int mfc_run_sleep(struct mfc_dev *dev)
{
struct mfc_ctx *ctx;
- int old_state, i;
+ int i;
int need_cache_flush = 0;
mfc_debug_enter();
int mfc_run_dec_init(struct mfc_ctx *ctx)
{
- struct mfc_dev *dev = ctx->dev;
struct mfc_dec *dec = ctx->dec_priv;
struct mfc_buf *src_mb;
int mfc_run_dec_frame(struct mfc_ctx *ctx)
{
- struct mfc_dev *dev = ctx->dev;
struct mfc_dec *dec = ctx->dec_priv;
struct mfc_buf *src_mb, *dst_mb;
int last_frame = 0;
int mfc_run_dec_last_frames(struct mfc_ctx *ctx)
{
- struct mfc_dev *dev = ctx->dev;
struct mfc_dec *dec = ctx->dec_priv;
struct mfc_buf *src_mb, *dst_mb;
void mfc_dec_calc_dpb_size(struct mfc_ctx *ctx)
{
- struct mfc_dev *dev = ctx->dev;
- struct mfc_dec *dec = ctx->dec_priv;
struct mfc_raw_info *raw;
int i;
int extra = MFC_LINEAR_BUF_SIZE;
void mfc_enc_calc_src_size(struct mfc_ctx *ctx)
{
- struct mfc_dev *dev = ctx->dev;
struct mfc_raw_info *raw;
unsigned int mb_width, mb_height, default_size;
int i, extra;