From 5cec6773ecbad10769ca9375022bc9ba84762d9e Mon Sep 17 00:00:00 2001 From: Ayoung Sim Date: Wed, 20 Jun 2018 16:24:27 +0900 Subject: [PATCH] [COMMON] media: mfc: DRV4.0: update prefix [CTRLS] Change-Id: I9eadb7876eb598c7955b3c7079bbb2738a9c8189 Signed-off-by: Ayoung Sim --- .../media/platform/exynos/mfc/s5p_mfc_dec.c | 23 ++++-- .../platform/exynos/mfc/s5p_mfc_dec_ops.c | 69 ++---------------- .../media/platform/exynos/mfc/s5p_mfc_enc.c | 29 ++++++-- .../platform/exynos/mfc/s5p_mfc_enc_ops.c | 73 ++++--------------- 4 files changed, 60 insertions(+), 134 deletions(-) diff --git a/drivers/media/platform/exynos/mfc/s5p_mfc_dec.c b/drivers/media/platform/exynos/mfc/s5p_mfc_dec.c index 80f5adb63c0c..a54647f23660 100644 --- a/drivers/media/platform/exynos/mfc/s5p_mfc_dec.c +++ b/drivers/media/platform/exynos/mfc/s5p_mfc_dec.c @@ -70,12 +70,14 @@ static int mfc_dec_check_ctrl_val(struct s5p_mfc_ctx *ctx, struct v4l2_control * struct v4l2_queryctrl *c; c = mfc_dec_get_ctrl(ctrl->id); - if (!c) + if (!c) { + mfc_err_ctx("[CTRLS] not supported control id (%#x)\n", ctrl->id); return -EINVAL; + } if (ctrl->value < c->minimum || ctrl->value > c->maximum || (c->step != 0 && ctrl->value % c->step != 0)) { - mfc_err_ctx("Invalid control value (%#x)\n", ctrl->value); + mfc_err_ctx("[CTRLS] Invalid control value (%#x)\n", ctrl->value); return -ERANGE; } @@ -848,8 +850,11 @@ static int vidioc_queryctrl(struct file *file, void *priv, struct v4l2_queryctrl *c; c = mfc_dec_get_ctrl(qc->id); - if (!c) + if (!c) { + mfc_err_dev("[CTRLS] not supported control id (%#x)\n", qc->id); return -EINVAL; + } + *qc = *c; return 0; } @@ -863,6 +868,8 @@ static int mfc_dec_ext_info(struct s5p_mfc_ctx *ctx) if (MFC_FEATURE_SUPPORT(dev, dev->pdata->skype)) val |= DEC_SET_SKYPE_FLAG; + mfc_debug(5, "[CTRLS] ext info val: %#x\n", val); + return val; } @@ -874,7 +881,6 @@ static int mfc_dec_get_ctrl_val(struct s5p_mfc_ctx *ctx, struct v4l2_control *ct struct s5p_mfc_ctx_ctrl *ctx_ctrl; int found = 0; - mfc_debug_enter(); if (!ctx) { mfc_err_dev("no mfc context to run\n"); return -EINVAL; @@ -983,7 +989,7 @@ static int mfc_dec_get_ctrl_val(struct s5p_mfc_ctx *ctx, struct v4l2_control *ct ctx_ctrl->has_new = 0; ctrl->value = ctx_ctrl->val; } else { - mfc_debug(8, "Control value "\ + mfc_debug(5, "[CTRLS] Control value "\ "is not up to date: "\ "0x%08x\n", ctrl->id); return -EINVAL; @@ -1001,7 +1007,7 @@ static int mfc_dec_get_ctrl_val(struct s5p_mfc_ctx *ctx, struct v4l2_control *ct break; } - mfc_debug_leave(); + mfc_debug(5, "[CTRLS] get id: %#x, value: %d\n", ctrl->id, ctrl->value); return 0; } @@ -1048,6 +1054,8 @@ static int vidioc_s_ctrl(struct file *file, void *priv, if (ret) return ret; + mfc_debug(5, "[CTRLS] set id: %#x, value: %d\n", ctrl->id, ctrl->value); + switch (ctrl->id) { case V4L2_CID_MPEG_VIDEO_DECODER_MPEG4_DEBLOCK_FILTER: dec->loop_filter_mpeg4 = ctrl->value; @@ -1215,7 +1223,8 @@ static int vidioc_g_ext_ctrls(struct file *file, void *priv, break; } - mfc_debug(2, "[%d] id: 0x%08x, value: %d\n", i, ext_ctrl->id, ext_ctrl->value); + mfc_debug(5, "[CTRLS][%d] id: %#x, value: %d\n", + i, ext_ctrl->id, ext_ctrl->value); } return ret; diff --git a/drivers/media/platform/exynos/mfc/s5p_mfc_dec_ops.c b/drivers/media/platform/exynos/mfc/s5p_mfc_dec_ops.c index b794812b05dd..ce7da533281c 100644 --- a/drivers/media/platform/exynos/mfc/s5p_mfc_dec_ops.c +++ b/drivers/media/platform/exynos/mfc/s5p_mfc_dec_ops.c @@ -351,11 +351,6 @@ static int s5p_mfc_dec_cleanup_ctx_ctrls(struct s5p_mfc_ctx *ctx) while (!list_empty(&ctx->ctrls)) { ctx_ctrl = list_entry((&ctx->ctrls)->next, struct s5p_mfc_ctx_ctrl, list); - - mfc_debug(7, "Cleanup context control "\ - "id: 0x%08x, type: %d\n", - ctx_ctrl->id, ctx_ctrl->type); - list_del(&ctx_ctrl->list); kfree(ctx_ctrl); } @@ -392,9 +387,6 @@ static int s5p_mfc_dec_init_ctx_ctrls(struct s5p_mfc_ctx *ctx) ctx_ctrl->val = 0; list_add_tail(&ctx_ctrl->list, &ctx->ctrls); - - mfc_debug(7, "Add context control id: 0x%08x, type : %d\n", - ctx_ctrl->id, ctx_ctrl->type); } return 0; @@ -407,11 +399,6 @@ static void mfc_dec_remove_buf_ctrls(struct list_head *head) while (!list_empty(head)) { buf_ctrl = list_entry(head->next, struct s5p_mfc_buf_ctrl, list); - - mfc_debug(7, "Cleanup buffer control "\ - "id: 0x%08x, type: %d\n", - buf_ctrl->id, buf_ctrl->type); - list_del(&buf_ctrl->list); kfree(buf_ctrl); } @@ -424,10 +411,6 @@ static void s5p_mfc_dec_reset_buf_ctrls(struct list_head *head) struct s5p_mfc_buf_ctrl *buf_ctrl; list_for_each_entry(buf_ctrl, head, list) { - mfc_debug(8, "Reset buffer control value "\ - "id: 0x%08x, type: %d\n", - buf_ctrl->id, buf_ctrl->type); - buf_ctrl->has_new = 0; buf_ctrl->val = 0; buf_ctrl->old_val = 0; @@ -450,9 +433,6 @@ static int s5p_mfc_dec_init_buf_ctrls(struct s5p_mfc_ctx *ctx, if (type & MFC_CTRL_TYPE_SRC) { if (test_bit(index, &ctx->src_ctrls_avail)) { - mfc_debug(7, "Source per-buffer control is already "\ - "initialized [%d]\n", index); - s5p_mfc_dec_reset_buf_ctrls(&ctx->src_ctrls[index]); return 0; @@ -461,9 +441,6 @@ static int s5p_mfc_dec_init_buf_ctrls(struct s5p_mfc_ctx *ctx, head = &ctx->src_ctrls[index]; } else if (type & MFC_CTRL_TYPE_DST) { if (test_bit(index, &ctx->dst_ctrls_avail)) { - mfc_debug(7, "Dest. per-buffer control is already "\ - "initialized [%d]\n", index); - s5p_mfc_dec_reset_buf_ctrls(&ctx->dst_ctrls[index]); return 0; @@ -519,9 +496,6 @@ static int s5p_mfc_dec_init_buf_ctrls(struct s5p_mfc_ctx *ctx, buf_ctrl->flag_shft = mfc_ctrl_list[i].flag_shft; list_add_tail(&buf_ctrl->list, head); - - mfc_debug(7, "Add buffer control id: 0x%08x, type : %d\n",\ - buf_ctrl->id, buf_ctrl->type); } s5p_mfc_dec_reset_buf_ctrls(head); @@ -546,16 +520,12 @@ static int s5p_mfc_dec_cleanup_buf_ctrls(struct s5p_mfc_ctx *ctx, if (type & MFC_CTRL_TYPE_SRC) { if (!(test_and_clear_bit(index, &ctx->src_ctrls_avail))) { - mfc_debug(7, "Source per-buffer control is "\ - "not available [%d]\n", index); return 0; } head = &ctx->src_ctrls[index]; } else if (type & MFC_CTRL_TYPE_DST) { if (!(test_and_clear_bit(index, &ctx->dst_ctrls_avail))) { - mfc_debug(7, "Dest. per-buffer Control is "\ - "not available [%d]\n", index); return 0; } @@ -595,13 +565,6 @@ static int s5p_mfc_dec_to_buf_ctrls(struct s5p_mfc_ctx *ctx, struct list_head *h } } - list_for_each_entry(buf_ctrl, head, list) { - if (buf_ctrl->has_new) - mfc_debug(8, "Updated buffer control "\ - "id: 0x%08x val: %d\n", - buf_ctrl->id, buf_ctrl->val); - } - return 0; } @@ -619,12 +582,6 @@ static int s5p_mfc_dec_to_ctx_ctrls(struct s5p_mfc_ctx *ctx, struct list_head *h continue; if (ctx_ctrl->id == buf_ctrl->id) { - if (ctx_ctrl->has_new) - mfc_debug(8, - "Overwrite context control "\ - "value id: 0x%08x, val: %d\n", - ctx_ctrl->id, ctx_ctrl->val); - ctx_ctrl->has_new = 1; ctx_ctrl->val = buf_ctrl->val; @@ -633,13 +590,6 @@ static int s5p_mfc_dec_to_ctx_ctrls(struct s5p_mfc_ctx *ctx, struct list_head *h } } - list_for_each_entry(ctx_ctrl, &ctx->ctrls, list) { - if (ctx_ctrl->has_new) - mfc_debug(8, "Updated context control "\ - "id: 0x%08x val: %d\n", - ctx_ctrl->id, ctx_ctrl->val); - } - return 0; } @@ -679,8 +629,7 @@ static int s5p_mfc_dec_set_buf_ctrls_val(struct s5p_mfc_ctx *ctx, struct list_he if (buf_ctrl->id == V4L2_CID_MPEG_MFC51_VIDEO_FRAME_TAG) dec->stored_tag = buf_ctrl->val; - mfc_debug(8, "Set buffer control "\ - "id: 0x%08x val: %d\n", + mfc_debug(6, "[CTRLS] Set buffer control id: 0x%08x, val: %d\n", buf_ctrl->id, buf_ctrl->val); } @@ -710,8 +659,8 @@ static int s5p_mfc_dec_get_buf_ctrls_val(struct s5p_mfc_ctx *ctx, struct list_he else if (buf_ctrl->id == V4L2_CID_MPEG_VIDEO_COLOUR_PRIMARIES) buf_ctrl->val = dec->color_space; } - mfc_debug(8, "Get buffer control "\ - "id: 0x%08x val: %d\n", + + mfc_debug(6, "[CTRLS] Get buffer control id: 0x%08x, val: %d\n", buf_ctrl->id, buf_ctrl->val); } @@ -744,7 +693,7 @@ static int s5p_mfc_dec_set_buf_ctrls_val_nal_q_dec(struct s5p_mfc_ctx *ctx, buf_ctrl->has_new = 0; buf_ctrl->updated = 1; - mfc_debug(3, "NAL Q: dec_set_buf_ctrls, ctrl id: 0x%x, val: %d\n", + mfc_debug(6, "NAL Q:[CTRLS] Set buffer control id: 0x%08x, val: %d\n", buf_ctrl->id, buf_ctrl->val); } @@ -852,7 +801,7 @@ static int s5p_mfc_dec_get_buf_ctrls_val_nal_q_dec(struct s5p_mfc_ctx *ctx, buf_ctrl->val = dec->color_space; } - mfc_debug(3, "NAL Q: dec_get_buf_ctrls, ctrl id: 0x%x, val: %d\n", + mfc_debug(6, "NAL Q:[CTRLS] Get buffer control id: 0x%08x, val: %d\n", buf_ctrl->id, buf_ctrl->val); } @@ -886,9 +835,7 @@ static int s5p_mfc_dec_recover_buf_ctrls_val(struct s5p_mfc_ctx *ctx, struct lis } buf_ctrl->updated = 0; - - mfc_debug(8, "Recover buffer control "\ - "id: 0x%08x old val: %d\n", + mfc_debug(6, "[CTRLS] Recover buffer control id: 0x%08x, old val: %d\n", buf_ctrl->id, buf_ctrl->old_val); } @@ -903,7 +850,7 @@ static int s5p_mfc_dec_get_buf_update_val(struct s5p_mfc_ctx *ctx, list_for_each_entry(buf_ctrl, head, list) { if (buf_ctrl->id == id) { buf_ctrl->val = value; - mfc_debug(5, "++id: 0x%08x val: %d\n", + mfc_debug(6, "[CTRLS] Update buffer control id: 0x%08x, val: %d\n", buf_ctrl->id, buf_ctrl->val); break; } @@ -924,7 +871,7 @@ static int s5p_mfc_dec_recover_buf_ctrls_nal_q(struct s5p_mfc_ctx *ctx, buf_ctrl->has_new = 1; buf_ctrl->updated = 0; - mfc_debug(5, "recover has_new, id: 0x%08x val: %d\n", + mfc_debug(6, "NAL Q:[CTRLS] Recover buffer control id: 0x%08x, val: %d\n", buf_ctrl->id, buf_ctrl->val); } diff --git a/drivers/media/platform/exynos/mfc/s5p_mfc_enc.c b/drivers/media/platform/exynos/mfc/s5p_mfc_enc.c index c85f80e882ed..3032f3a44d9a 100644 --- a/drivers/media/platform/exynos/mfc/s5p_mfc_enc.c +++ b/drivers/media/platform/exynos/mfc/s5p_mfc_enc.c @@ -69,8 +69,10 @@ static int mfc_enc_check_ctrl_val(struct s5p_mfc_ctx *ctx, struct v4l2_control * struct v4l2_queryctrl *c; c = mfc_enc_get_ctrl(ctrl->id); - if (!c) + if (!c) { + mfc_err_ctx("[CTRLS] not supported control id (%#x)\n", ctrl->id); return -EINVAL; + } if (ctrl->id == V4L2_CID_MPEG_VIDEO_GOP_SIZE && ctrl->value > c->maximum) { @@ -82,7 +84,8 @@ static int mfc_enc_check_ctrl_val(struct s5p_mfc_ctx *ctx, struct v4l2_control * if (ctrl->id == V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING_LAYER) { if ((ctrl->value & ~(1 << 16)) < c->minimum || (ctrl->value & ~(1 << 16)) > c->maximum || (c->step != 0 && (ctrl->value & ~(1 << 16)) % c->step != 0)) { - mfc_err_ctx("Invalid control value for %#x (%#x)\n", ctrl->id, ctrl->value); + mfc_err_ctx("[CTRLS][HIERARCHICAL] Invalid control value for %#x (%#x)\n", + ctrl->id, ctrl->value); return -ERANGE; } else { return 0; @@ -91,7 +94,8 @@ static int mfc_enc_check_ctrl_val(struct s5p_mfc_ctx *ctx, struct v4l2_control * if (ctrl->value < c->minimum || ctrl->value > c->maximum || (c->step != 0 && ctrl->value % c->step != 0)) { - mfc_err_ctx("Invalid control value for %#x (%#x)\n", ctrl->id, ctrl->value); + mfc_err_ctx("[CTRLS] Invalid control value for %#x (%#x)\n", + ctrl->id, ctrl->value); return -ERANGE; } @@ -761,8 +765,11 @@ static int vidioc_queryctrl(struct file *file, void *priv, struct v4l2_queryctrl *c; c = mfc_enc_get_ctrl(qc->id); - if (!c) + if (!c) { + mfc_err_dev("[CTRLS] not supported control id (%#x)\n", qc->id); return -EINVAL; + } + *qc = *c; return 0; } @@ -792,6 +799,8 @@ static int mfc_enc_ext_info(struct s5p_mfc_ctx *ctx) if (MFC_FEATURE_SUPPORT(dev, dev->pdata->static_info_enc)) val |= ENC_SET_STATIC_INFO; + mfc_debug(5, "[CTRLS] ext info val: %#x\n", val); + return val; } @@ -829,7 +838,7 @@ static int mfc_enc_get_ctrl_val(struct s5p_mfc_ctx *ctx, struct v4l2_control *ct ctx_ctrl->has_new = 0; ctrl->value = ctx_ctrl->val; } else { - mfc_debug(8, "Control value "\ + mfc_debug(5, "[CTRLS] Control value "\ "is not up to date: "\ "0x%08x\n", ctrl->id); return -EINVAL; @@ -869,6 +878,8 @@ static int mfc_enc_get_ctrl_val(struct s5p_mfc_ctx *ctx, struct v4l2_control *ct break; } + mfc_debug(5, "[CTRLS] get id: %#x, value: %d\n", ctrl->id, ctrl->value); + return ret; } @@ -1666,6 +1677,8 @@ static int mfc_enc_set_ctrl_val(struct s5p_mfc_ctx *ctx, struct v4l2_control *ct int found = 0; int index = 0; + mfc_debug(5, "[CTRLS] id: %#x, value: %d\n", ctrl->id, ctrl->value); + switch (ctrl->id) { case V4L2_CID_CACHEABLE: mfc_debug(5, "it is supported only V4L2_MEMORY_MMAP\n"); @@ -1849,7 +1862,8 @@ static int vidioc_g_ext_ctrls(struct file *file, void *priv, break; } - mfc_debug(2, "[%d] id: 0x%08x, value: %d\n", i, ext_ctrl->id, ext_ctrl->value); + mfc_debug(5, "[CTRLS][%d] id: %#x, value: %d\n", + i, ext_ctrl->id, ext_ctrl->value); } return ret; @@ -1885,7 +1899,8 @@ static int vidioc_s_ext_ctrls(struct file *file, void *priv, break; } - mfc_debug(2, "[%d] id: 0x%08x, value: %d\n", i, ext_ctrl->id, ext_ctrl->value); + mfc_debug(5, "[CTRLS][%d] id: %#x, value: %d\n", + i, ext_ctrl->id, ext_ctrl->value); } return ret; diff --git a/drivers/media/platform/exynos/mfc/s5p_mfc_enc_ops.c b/drivers/media/platform/exynos/mfc/s5p_mfc_enc_ops.c index 8733e2588d61..e5b5b1a64bab 100644 --- a/drivers/media/platform/exynos/mfc/s5p_mfc_enc_ops.c +++ b/drivers/media/platform/exynos/mfc/s5p_mfc_enc_ops.c @@ -671,11 +671,6 @@ static int s5p_mfc_enc_cleanup_ctx_ctrls(struct s5p_mfc_ctx *ctx) while (!list_empty(&ctx->ctrls)) { ctx_ctrl = list_entry((&ctx->ctrls)->next, struct s5p_mfc_ctx_ctrl, list); - - mfc_debug(7, "Cleanup context control "\ - "id: 0x%08x, type: %d\n", - ctx_ctrl->id, ctx_ctrl->type); - list_del(&ctx_ctrl->list); kfree(ctx_ctrl); } @@ -693,7 +688,7 @@ static int s5p_mfc_enc_get_buf_update_val(struct s5p_mfc_ctx *ctx, list_for_each_entry(buf_ctrl, head, list) { if (buf_ctrl->id == id) { buf_ctrl->val = value; - mfc_debug(5, "++id: 0x%08x val: %d\n", + mfc_debug(6, "[CTRLS] Update buffer control id: 0x%08x, val: %d\n", buf_ctrl->id, buf_ctrl->val); break; } @@ -728,9 +723,6 @@ static int s5p_mfc_enc_init_ctx_ctrls(struct s5p_mfc_ctx *ctx) ctx_ctrl->val = 0; list_add_tail(&ctx_ctrl->list, &ctx->ctrls); - - mfc_debug(7, "Add context control id: 0x%08x, type : %d\n", - ctx_ctrl->id, ctx_ctrl->type); } return 0; @@ -741,10 +733,6 @@ static void s5p_mfc_enc_reset_buf_ctrls(struct list_head *head) struct s5p_mfc_buf_ctrl *buf_ctrl; list_for_each_entry(buf_ctrl, head, list) { - mfc_debug(8, "Reset buffer control value "\ - "id: 0x%08x, type: %d\n", - buf_ctrl->id, buf_ctrl->type); - buf_ctrl->has_new = 0; buf_ctrl->val = 0; buf_ctrl->old_val = 0; @@ -759,11 +747,6 @@ static void mfc_enc_remove_buf_ctrls(struct list_head *head) while (!list_empty(head)) { buf_ctrl = list_entry(head->next, struct s5p_mfc_buf_ctrl, list); - - mfc_debug(7, "Cleanup buffer control "\ - "id: 0x%08x, type: %d\n", - buf_ctrl->id, buf_ctrl->type); - list_del(&buf_ctrl->list); kfree(buf_ctrl); } @@ -785,9 +768,6 @@ static int s5p_mfc_enc_init_buf_ctrls(struct s5p_mfc_ctx *ctx, if (type & MFC_CTRL_TYPE_SRC) { if (test_bit(index, &ctx->src_ctrls_avail)) { - mfc_debug(7, "Source per-buffer control is already "\ - "initialized [%d]\n", index); - s5p_mfc_enc_reset_buf_ctrls(&ctx->src_ctrls[index]); return 0; @@ -796,9 +776,6 @@ static int s5p_mfc_enc_init_buf_ctrls(struct s5p_mfc_ctx *ctx, head = &ctx->src_ctrls[index]; } else if (type & MFC_CTRL_TYPE_DST) { if (test_bit(index, &ctx->dst_ctrls_avail)) { - mfc_debug(7, "Dest. per-buffer control is already "\ - "initialized [%d]\n", index); - s5p_mfc_enc_reset_buf_ctrls(&ctx->dst_ctrls[index]); return 0; @@ -844,9 +821,6 @@ static int s5p_mfc_enc_init_buf_ctrls(struct s5p_mfc_ctx *ctx, } list_add_tail(&buf_ctrl->list, head); - - mfc_debug(7, "Add buffer control id: 0x%08x, type : %d\n", - buf_ctrl->id, buf_ctrl->type); } s5p_mfc_enc_reset_buf_ctrls(head); @@ -871,16 +845,12 @@ static int s5p_mfc_enc_cleanup_buf_ctrls(struct s5p_mfc_ctx *ctx, if (type & MFC_CTRL_TYPE_SRC) { if (!(test_and_clear_bit(index, &ctx->src_ctrls_avail))) { - mfc_debug(7, "Source per-buffer control is "\ - "not available [%d]\n", index); return 0; } head = &ctx->src_ctrls[index]; } else if (type & MFC_CTRL_TYPE_DST) { if (!(test_and_clear_bit(index, &ctx->dst_ctrls_avail))) { - mfc_debug(7, "Dest. per-buffer Control is "\ - "not available [%d]\n", index); return 0; } @@ -945,13 +915,6 @@ static int s5p_mfc_enc_to_buf_ctrls(struct s5p_mfc_ctx *ctx, struct list_head *h } } - list_for_each_entry(buf_ctrl, head, list) { - if (buf_ctrl->has_new) - mfc_debug(8, "Updated buffer control "\ - "id: 0x%08x val: %d\n", - buf_ctrl->id, buf_ctrl->val); - } - return 0; } @@ -983,13 +946,6 @@ static int s5p_mfc_enc_to_ctx_ctrls(struct s5p_mfc_ctx *ctx, struct list_head *h } } - list_for_each_entry(ctx_ctrl, &ctx->ctrls, list) { - if (ctx_ctrl->has_new) - mfc_debug(8, "Updated context control "\ - "id: 0x%08x val: %d\n", - ctx_ctrl->id, ctx_ctrl->val); - } - return 0; } @@ -1210,10 +1166,8 @@ static int s5p_mfc_enc_set_buf_ctrls_val(struct s5p_mfc_ctx *ctx, struct list_he mfc_enc_set_buf_ctrls_exception(ctx, buf_ctrl); - mfc_debug(8, "Set buffer control "\ - "id: 0x%x, val: %d (%#x)\n", - buf_ctrl->id, buf_ctrl->val, - MFC_READL(buf_ctrl->addr)); + mfc_debug(6, "[CTRLS] Set buffer control id: 0x%08x, val: %d\n", + buf_ctrl->id, buf_ctrl->val); } if (!p->rc_frame && !p->rc_mb && p->dynamic_qp) { @@ -1221,7 +1175,7 @@ static int s5p_mfc_enc_set_buf_ctrls_val(struct s5p_mfc_ctx *ctx, struct list_he value &= ~(0xFF000000); value |= (p->config_qp & 0xFF) << 24; MFC_WRITEL(value, S5P_FIMV_E_FIXED_PICTURE_QP); - mfc_debug(8, "Dynamic QP changed %#x\n", + mfc_debug(6, "[CTRLS] Dynamic QP changed %#x\n", MFC_READL(S5P_FIMV_E_FIXED_PICTURE_QP)); } @@ -1248,8 +1202,7 @@ static int s5p_mfc_enc_get_buf_ctrls_val(struct s5p_mfc_ctx *ctx, struct list_he buf_ctrl->val = value; buf_ctrl->has_new = 1; - mfc_debug(8, "Get buffer control "\ - "id: 0x%08x val: %d\n", + mfc_debug(6, "[CTRLS] Get buffer control id: 0x%08x, val: %d\n", buf_ctrl->id, buf_ctrl->val); } @@ -1485,14 +1438,15 @@ static int s5p_mfc_enc_set_buf_ctrls_val_nal_q_enc(struct s5p_mfc_ctx *ctx, buf_ctrl->has_new = 0; buf_ctrl->updated = 1; - mfc_debug(8, "NAL Q: Set buffer control id: 0x%x, val: %d\n", + + mfc_debug(6, "NAL Q:[CTRLS] Set buffer control id: 0x%08x, val: %d\n", buf_ctrl->id, buf_ctrl->val); } if (!p->rc_frame && !p->rc_mb && p->dynamic_qp) { pInStr->FixedPictureQp &= ~(0xFF000000); pInStr->FixedPictureQp |= (p->config_qp & 0xFF) << 24; - mfc_debug(8, "NAL Q: Dynamic QP changed %#x\n", + mfc_debug(6, "NAL Q:[CTRLS] Dynamic QP changed %#x\n", pInStr->FixedPictureQp); } @@ -1536,7 +1490,7 @@ static int s5p_mfc_enc_get_buf_ctrls_val_nal_q_enc(struct s5p_mfc_ctx *ctx, buf_ctrl->val = value; buf_ctrl->has_new = 1; - mfc_debug(2, "NAL Q: enc_get_buf_ctrls, ctrl id: 0x%x, val: %d\n", + mfc_debug(6, "NAL Q:[CTRLS] Get buffer control id: 0x%08x, val: %d\n", buf_ctrl->id, buf_ctrl->val); } @@ -1575,9 +1529,9 @@ static int s5p_mfc_enc_recover_buf_ctrls_val(struct s5p_mfc_ctx *ctx, MFC_WRITEL(value, buf_ctrl->flag_addr); } - mfc_debug(8, "Recover buffer control "\ - "id: 0x%08x old val: %#x old val2: %#x\n", - buf_ctrl->id, buf_ctrl->old_val, buf_ctrl->old_val2); + mfc_debug(6, "[CTRLS] Recover buffer control id: 0x%08x, old val: %d\n", + buf_ctrl->id, buf_ctrl->old_val); + if (buf_ctrl->id == V4L2_CID_MPEG_MFC51_VIDEO_I_PERIOD_CH) { value = MFC_READL(S5P_FIMV_E_GOP_CONFIG2); value &= ~(0x3FFF); @@ -1642,7 +1596,8 @@ static int s5p_mfc_enc_recover_buf_ctrls_nal_q(struct s5p_mfc_ctx *ctx, buf_ctrl->has_new = 1; buf_ctrl->updated = 0; - mfc_debug(5, "recover has_new, id: 0x%08x val: %d\n", + + mfc_debug(6, "NAL Q:[CTRLS] Recover buffer control id: 0x%08x, val: %d\n", buf_ctrl->id, buf_ctrl->val); } -- 2.20.1