diff --git a/driver/platform/kalama/src/msm_vidc_kalama.c b/driver/platform/kalama/src/msm_vidc_kalama.c index c7c41c5e58..c377b56bf2 100644 --- a/driver/platform/kalama/src/msm_vidc_kalama.c +++ b/driver/platform/kalama/src/msm_vidc_kalama.c @@ -1327,8 +1327,7 @@ static struct msm_platform_inst_capability instance_cap_data_kalama[] = { 0, HFI_PROP_PIPE}, - {POC, DEC, H264, - 0, 18, 1, 1, + {POC, DEC, H264, 0, 2, 1, 1, 0, HFI_PROP_PIC_ORDER_CNT_TYPE}, diff --git a/driver/vidc/inc/msm_vidc_driver.h b/driver/vidc/inc/msm_vidc_driver.h index 76a31031d5..fac616bc4c 100644 --- a/driver/vidc/inc/msm_vidc_driver.h +++ b/driver/vidc/inc/msm_vidc_driver.h @@ -153,6 +153,36 @@ static inline bool is_meta_tx_out_enabled(struct msm_vidc_inst *inst, u32 cap) return enabled; } +static inline bool is_any_meta_tx_out_enabled(struct msm_vidc_inst *inst) +{ + bool enabled = false; + u32 i; + + for (i = INST_CAP_NONE + 1; i < META_CAP_MAX; i++) { + if (is_meta_tx_out_enabled(inst, i)) { + enabled = true; + break; + } + } + + return enabled; +} + +static inline bool is_any_meta_tx_inp_enabled(struct msm_vidc_inst *inst) +{ + bool enabled = false; + u32 i; + + for (i = INST_CAP_NONE + 1; i < META_CAP_MAX; i++) { + if (is_meta_tx_inp_enabled(inst, i)) { + enabled = true; + break; + } + } + + return enabled; +} + static inline bool is_input_meta_enabled(struct msm_vidc_inst *inst) { bool enabled = false; diff --git a/driver/vidc/src/msm_vdec.c b/driver/vidc/src/msm_vdec.c index 2c4da109e5..61e010b29c 100644 --- a/driver/vidc/src/msm_vdec.c +++ b/driver/vidc/src/msm_vdec.c @@ -2050,18 +2050,6 @@ int msm_vdec_qbuf(struct msm_vidc_inst *inst, struct vb2_buffer *vb2) } } - if (vb2->type == OUTPUT_META_PLANE) { - if (is_meta_rx_out_enabled(inst, META_DPB_TAG_LIST)) { - /* - * vb2 is not allowing client to pass data in output meta plane. - * adjust the bytesused as client will send buffer tag metadata - * in output meta plane if DPB_TAG_LIST metadata enabled. - */ - if (!vb2->planes[0].bytesused) - vb2->planes[0].bytesused = 1024; - } - } - if (inst->adjust_priority) { s32 priority = inst->capabilities->cap[PRIORITY].value; diff --git a/driver/vidc/src/msm_vidc_control.c b/driver/vidc/src/msm_vidc_control.c index 227e535692..0d2169f2bb 100644 --- a/driver/vidc/src/msm_vidc_control.c +++ b/driver/vidc/src/msm_vidc_control.c @@ -2810,6 +2810,7 @@ int msm_vidc_adjust_dec_lowlatency_mode(void *instance, struct v4l2_ctrl *ctrl) &outbuf_fence, __func__)) return -EINVAL; + /* enable lowlatency if outbuf fence is enabled */ if (outbuf_fence & V4L2_MPEG_VIDC_META_ENABLE && outbuf_fence & V4L2_MPEG_VIDC_META_RX_INPUT) adjusted_value = 1; diff --git a/driver/vidc/src/msm_vidc_driver.c b/driver/vidc/src/msm_vidc_driver.c index ec496fecda..395dc4bab5 100644 --- a/driver/vidc/src/msm_vidc_driver.c +++ b/driver/vidc/src/msm_vidc_driver.c @@ -5568,8 +5568,7 @@ void msm_vidc_destroy_buffers(struct msm_vidc_inst *inst) } list_for_each_entry_safe(fence, dummy_fence, &inst->fence_list, list) { - i_vpr_e(inst, "%s: destroying fence id: %llu\n", - __func__, fence->dma_fence.seqno); + i_vpr_e(inst, "%s: destroying fence %s\n", __func__, fence->name); msm_vidc_fence_destroy(inst, (u32)fence->dma_fence.seqno); } diff --git a/driver/vidc/src/msm_vidc_vb2.c b/driver/vidc/src/msm_vidc_vb2.c index 52cbcab52f..e3d6ddb980 100644 --- a/driver/vidc/src/msm_vidc_vb2.c +++ b/driver/vidc/src/msm_vidc_vb2.c @@ -450,12 +450,24 @@ void msm_vidc_buf_queue(struct vb2_buffer *vb2) goto unlock; } - /* Expecting non-zero filledlen on INPUT port */ - if (vb2->type == INPUT_MPLANE && !vb2->planes[0].bytesused) { - i_vpr_e(inst, - "%s: zero bytesused input buffer not supported\n", __func__); - rc = -EINVAL; - goto unlock; + if (!vb2->planes[0].bytesused) { + if (vb2->type == INPUT_MPLANE) { + /* Expecting non-zero filledlen on INPUT port */ + i_vpr_e(inst, + "%s: zero bytesused input buffer not supported\n", __func__); + rc = -EINVAL; + goto unlock; + } + if ((vb2->type == OUTPUT_META_PLANE && is_any_meta_tx_out_enabled(inst)) || + (vb2->type == INPUT_META_PLANE && is_any_meta_tx_inp_enabled(inst))) { + /* + * vb2 is not allowing client to pass data in output meta plane. + * adjust the bytesused as client will send buffer tag metadata + * in output meta plane if DPB_TAG_LIST, or OUTBUF_FENCE metadata + * is enabled. + */ + vb2->planes[0].bytesused = vb2->planes[0].length; + } } if (is_encode_session(inst) && vb2->type == INPUT_MPLANE) {