mfc_debug_leave();
}
-static void __mfc_calc_dec_codec_buffer_size(struct mfc_ctx *ctx)
+static void __mfc_dec_calc_codec_buffer_size(struct mfc_ctx *ctx)
{
struct mfc_dec *dec;
int i;
NUM_MPEG4_LF_BUF);
}
-static void __mfc_calc_enc_codec_buffer_size(struct mfc_ctx *ctx)
+static void __mfc_enc_calc_codec_buffer_size(struct mfc_ctx *ctx)
{
struct mfc_enc *enc;
unsigned int mb_width, mb_height;
}
if (ctx->type == MFCINST_DECODER) {
- __mfc_calc_dec_codec_buffer_size(ctx);
+ __mfc_dec_calc_codec_buffer_size(ctx);
} else if (ctx->type == MFCINST_ENCODER) {
- __mfc_calc_enc_codec_buffer_size(ctx);
+ __mfc_enc_calc_codec_buffer_size(ctx);
} else {
mfc_err_ctx("invalid type: %d\n", ctx->type);
return -EINVAL;
return 0;
}
-static void __mfc_dec_remove_buf_ctrls(struct list_head *head)
+static void __mfc_dec_cleanup_buf_ctrls(struct list_head *head)
{
struct mfc_buf_ctrl *buf_ctrl;
mfc_ctrl_list[i].id,
mfc_ctrl_list[i].type);
- __mfc_dec_remove_buf_ctrls(head);
+ __mfc_dec_cleanup_buf_ctrls(head);
return -ENOMEM;
}
return -EINVAL;
}
- __mfc_dec_remove_buf_ctrls(head);
+ __mfc_dec_cleanup_buf_ctrls(head);
return 0;
}
return 0;
}
-static int mfc_dec_set_buf_ctrls_val_nal_q_dec(struct mfc_ctx *ctx,
+static int mfc_dec_set_buf_ctrls_val_nal_q(struct mfc_ctx *ctx,
struct list_head *head, DecoderInputStr *pInStr)
{
struct mfc_buf_ctrl *buf_ctrl;
return 0;
}
-static int mfc_dec_get_buf_ctrls_val_nal_q_dec(struct mfc_ctx *ctx,
+static int mfc_dec_get_buf_ctrls_val_nal_q(struct mfc_ctx *ctx,
struct list_head *head, DecoderOutputStr *pOutStr)
{
struct mfc_dec *dec = ctx->dec_priv;
.to_ctx_ctrls = mfc_dec_to_ctx_ctrls,
.set_buf_ctrls_val = mfc_dec_set_buf_ctrls_val,
.get_buf_ctrls_val = mfc_dec_get_buf_ctrls_val,
- .set_buf_ctrls_val_nal_q_dec = mfc_dec_set_buf_ctrls_val_nal_q_dec,
- .get_buf_ctrls_val_nal_q_dec = mfc_dec_get_buf_ctrls_val_nal_q_dec,
+ .set_buf_ctrls_val_nal_q_dec = mfc_dec_set_buf_ctrls_val_nal_q,
+ .get_buf_ctrls_val_nal_q_dec = mfc_dec_get_buf_ctrls_val_nal_q,
.recover_buf_ctrls_val = mfc_dec_recover_buf_ctrls_val,
.get_buf_update_val = mfc_dec_get_buf_update_val,
.recover_buf_ctrls_nal_q = mfc_dec_recover_buf_ctrls_nal_q,
return 0;
}
-static int mfc_enc_set_buf_ctrls_val_nal_q_enc(struct mfc_ctx *ctx,
+static int mfc_enc_set_buf_ctrls_val_nal_q(struct mfc_ctx *ctx,
struct list_head *head, EncoderInputStr *pInStr)
{
struct mfc_buf_ctrl *buf_ctrl;
return 0;
}
-static int mfc_enc_get_buf_ctrls_val_nal_q_enc(struct mfc_ctx *ctx,
+static int mfc_enc_get_buf_ctrls_val_nal_q(struct mfc_ctx *ctx,
struct list_head *head, EncoderOutputStr *pOutStr)
{
struct mfc_buf_ctrl *buf_ctrl;
.get_buf_ctrls_val = mfc_enc_get_buf_ctrls_val,
.recover_buf_ctrls_val = mfc_enc_recover_buf_ctrls_val,
.get_buf_update_val = mfc_enc_get_buf_update_val,
- .set_buf_ctrls_val_nal_q_enc = mfc_enc_set_buf_ctrls_val_nal_q_enc,
- .get_buf_ctrls_val_nal_q_enc = mfc_enc_get_buf_ctrls_val_nal_q_enc,
+ .set_buf_ctrls_val_nal_q_enc = mfc_enc_set_buf_ctrls_val_nal_q,
+ .get_buf_ctrls_val_nal_q_enc = mfc_enc_get_buf_ctrls_val_nal_q,
.recover_buf_ctrls_nal_q = mfc_enc_recover_buf_ctrls_nal_q,
};
#define mfc_get_int_reason() (MFC_READL(MFC_REG_RISC2HOST_CMD) \
& MFC_REG_RISC2HOST_CMD_MASK)
-#define mfc_clear_int_sfr() \
+#define mfc_clear_int() \
do { \
MFC_WRITEL(0, MFC_REG_RISC2HOST_CMD); \
MFC_WRITEL(0, MFC_REG_RISC2HOST_INT); \
for (i = 0; i < ctx->dst_fmt->num_planes; i++)
ctx->min_dpb_size[i] = mfc_get_min_dpb_size(i);
- mfc_dec_store_crop_info(ctx);
+ mfc_dec_get_crop_info(ctx);
dec->mv_count = mfc_get_mv_count();
if (CODEC_10BIT(ctx) && dev->pdata->support_10bit) {
if (mfc_get_luma_bit_depth_minus8() ||
return 0;
}
-static inline int is_err_condition(unsigned int err)
+static inline int __mfc_is_err_condition(unsigned int err)
{
if (err == MFC_REG_ERR_NO_AVAILABLE_DPB ||
err == MFC_REG_ERR_INSUFFICIENT_DPB_SIZE ||
if (nal_q_handle->nal_q_exception)
mfc_set_bit(nal_q_handle->nal_q_out_handle->nal_q_ctx,
&dev->work_bits);
- mfc_clear_int_sfr();
+ mfc_clear_int();
if (!nal_q_handle->nal_q_exception)
mfc_nal_q_clock_off(dev, nal_q_handle);
mfc_debug(2, "[NALQ] return to created state\n");
mfc_nal_q_cleanup_queue(dev);
mfc_nal_q_cleanup_clock(dev);
- mfc_clear_int_sfr();
+ mfc_clear_int();
mfc_pm_clock_off(dev);
mfc_wake_up_dev(dev, reason, err);
nal_q_handle->nal_q_state == NAL_Q_STATE_STOPPED) {
mfc_err_dev("[NALQ] Should not be here! state: %d, int reason : %d\n",
nal_q_handle->nal_q_state, reason);
- mfc_clear_int_sfr();
+ mfc_clear_int();
ret = -1;
} else {
if (ctx->type == MFCINST_DECODER) {
if (ctx->state == MFCINST_SPECIAL_PARSING_NAL) {
- mfc_clear_int_sfr();
+ mfc_clear_int();
mfc_pm_clock_off(dev);
mfc_clear_bit(ctx->num, &dev->work_bits);
mfc_change_state(ctx, MFCINST_RUNNING);
case MFC_REG_R2H_CMD_FW_STATUS_RET:
case MFC_REG_R2H_CMD_SLEEP_RET:
case MFC_REG_R2H_CMD_WAKEUP_RET:
- mfc_clear_int_sfr();
+ mfc_clear_int();
mfc_wake_up_dev(dev, reason, err);
return 0;
}
(err && (reason != MFC_REG_R2H_CMD_ERR_RET)))
call_dop(dev, dump_regs, dev);
- if (is_err_condition(err))
+ if (__mfc_is_err_condition(err))
call_dop(dev, dump_and_stop_debug_mode, dev);
if (dev->nal_q_handle) {
ctx = dev->ctx[dev->curr_ctx];
if (!ctx) {
mfc_err_dev("no mfc context to run\n");
- mfc_clear_int_sfr();
+ mfc_clear_int();
mfc_pm_clock_off(dev);
goto irq_end;
}
goto irq_end;
/* clean-up interrupt */
- mfc_clear_int_sfr();
+ mfc_clear_int();
if ((ctx->state != MFCINST_RES_CHANGE_INIT) && (mfc_ctx_ready(ctx) == 0))
mfc_clear_bit(ctx->num, &dev->work_bits);
#include "mfc_buf.h"
#include "mfc_mem.h"
-static struct mfc_fmt *__mfc_enc_hwfc_find_format(unsigned int pixelformat)
+static struct mfc_fmt *__mfc_otf_find_hwfc_format(unsigned int pixelformat)
{
unsigned long i;
mfc_debug_enter();
- ctx->src_fmt = __mfc_enc_hwfc_find_format(buf_info->pixel_format);
+ ctx->src_fmt = __mfc_otf_find_hwfc_format(buf_info->pixel_format);
if (!ctx->src_fmt) {
mfc_err_ctx("[OTF] failed to set source format\n");
return -EINVAL;
MFC_WRITEL(input_count, MFC_REG_NAL_QUEUE_INPUT_COUNT);
}
-static inline void mfc_dec_store_crop_info(struct mfc_ctx *ctx)
+static inline void mfc_dec_get_crop_info(struct mfc_ctx *ctx)
{
struct mfc_dev *dev = ctx->dev;
struct mfc_dec *dec = ctx->dec_priv;
#endif
}
-static void __mfc_display_state(struct mfc_dev *dev)
+static void __mfc_dump_state(struct mfc_dev *dev)
{
nal_queue_handle *nal_q_handle = dev->nal_q_handle;
int i;
dev->ctx[i]->int_err);
}
-static void __mfc_print_trace(struct mfc_dev *dev)
+static void __mfc_dump_trace(struct mfc_dev *dev)
{
int i, cnt, trace_cnt;
static void __mfc_dump_info_without_regs(struct mfc_dev *dev)
{
- __mfc_display_state(dev);
- __mfc_print_trace(dev);
+ __mfc_dump_state(dev);
+ __mfc_dump_trace(dev);
}
static void __mfc_dump_info(struct mfc_dev *dev)