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;
}
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;
}
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;
}
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;
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;
break;
}
- mfc_debug_leave();
+ mfc_debug(5, "[CTRLS] get id: %#x, value: %d\n", ctrl->id, ctrl->value);
return 0;
}
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;
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;
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);
}
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;
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);
}
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;
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;
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;
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);
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;
}
}
}
- 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;
}
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;
}
}
- 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;
}
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);
}
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);
}
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);
}
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);
}
}
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);
}
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;
}
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);
}
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) {
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;
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;
}
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;
}
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;
}
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;
break;
}
+ mfc_debug(5, "[CTRLS] get id: %#x, value: %d\n", ctrl->id, ctrl->value);
+
return ret;
}
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");
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;
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;
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);
}
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;
}
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;
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;
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);
}
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;
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;
}
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);
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;
}
}
}
- 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;
}
}
}
- 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;
}
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) {
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));
}
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);
}
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);
}
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);
}
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);
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);
}