From: ming_qian Date: Tue, 20 Aug 2019 08:24:57 +0000 (+0800) Subject: MLK-22460: VPU Decoder: export buffer info to help analysis some hang X-Git-Tag: rel_imx_4.19.35_1.1.0~108 X-Git-Url: https://git.somdevices.com/?a=commitdiff_plain;h=3554ed783036c9955cbd4a64ad63c51732480450;p=linux.git MLK-22460: VPU Decoder: export buffer info to help analysis some hang case Some hang case is caused by the frame count in the stream buffer is not reach the threshold, export these infomations, can help us locate the problem quickly Signed-off-by: ming_qian Reviewed-by: Shijie Qin --- diff --git a/drivers/mxc/vpu_malone/vpu_b0.c b/drivers/mxc/vpu_malone/vpu_b0.c index 9958905c6f2a..38650b326841 100644 --- a/drivers/mxc/vpu_malone/vpu_b0.c +++ b/drivers/mxc/vpu_malone/vpu_b0.c @@ -5200,9 +5200,13 @@ static ssize_t show_instance_buffer_info(struct device *dev, pSTREAM_BUFFER_DESCRIPTOR_TYPE pStrBufDesc; u_int32 stream_length = 0; int i, size, num = 0; + pDEC_RPC_HOST_IFACE pSharedInterface; + pBUFFER_INFO_TYPE buffer_info; ctx = container_of(attr, struct vpu_ctx, dev_attr_instance_buffer); statistic = &ctx->statistic; + pSharedInterface = ctx->dev->shared_mem.pSharedInterface; + buffer_info = &pSharedInterface->StreamBuffInfo[ctx->str_index]; This = &ctx->q_data[V4L2_SRC]; num += scnprintf(buf + num, PAGE_SIZE - num, @@ -5253,7 +5257,9 @@ static ssize_t show_instance_buffer_info(struct device *dev, pStrBufDesc->end); num += scnprintf(buf + num, PAGE_SIZE - num, - "\t%40s:%16d\n", "stream length", stream_length); + "\t%40s:%16d / %16d\n", "stream length", + stream_length, + ctx->stream_buffer.dma_size); num += scnprintf(buf + num, PAGE_SIZE - num, "\t%40s:%16d\n", "decode dealy frame", ctx->frm_dec_delay); @@ -5341,6 +5347,22 @@ static ssize_t show_instance_buffer_info(struct device *dev, ctx->seqinfo.uNumRefFrms, ctx->seqinfo.uNumDFEAreas); + num += scnprintf(buf + num, PAGE_SIZE - num, + "\t%40s:%16d\n", "stream_pic_input_count", + buffer_info->stream_pic_input_count); + num += scnprintf(buf + num, PAGE_SIZE - num, + "\t%40s:%16d\n", "stream_pic_parsed_count", + buffer_info->stream_pic_parsed_count); + num += scnprintf(buf + num, PAGE_SIZE - num, + "\t%40s:%16d\n", "stream_pic_end_flag", + buffer_info->stream_pic_end_flag); + num += scnprintf(buf + num, PAGE_SIZE - num, + "\t%40s:%16d\n", "stream_input_mode", + buffer_info->stream_input_mode); + num += scnprintf(buf + num, PAGE_SIZE - num, + "\t%40s:%16d\n", "stream_buffer_threshold", + buffer_info->stream_buffer_threshold); + return num; }