Loading drivers/media/platform/msm/vidc/msm_vidc.c +1 −0 Original line number Diff line number Diff line Loading @@ -1911,6 +1911,7 @@ void *msm_vidc_open(int core_id, int session_type) inst->profile = V4L2_MPEG_VIDEO_H264_PROFILE_BASELINE; inst->level = V4L2_MPEG_VIDEO_H264_LEVEL_1_0; inst->entropy_mode = V4L2_MPEG_VIDEO_H264_ENTROPY_MODE_CAVLC; inst->max_filled_length = 0; for (i = SESSION_MSG_INDEX(SESSION_MSG_START); i <= SESSION_MSG_INDEX(SESSION_MSG_END); i++) { init_completion(&inst->completions[i]); Loading drivers/media/platform/msm/vidc/msm_vidc_common.c +5 −65 Original line number Diff line number Diff line Loading @@ -2684,8 +2684,8 @@ static void handle_fbd(enum hal_command_response cmd, void *data) fill_buf_done->mark_data, fill_buf_done->mark_target); } if (inst->session_type == MSM_VIDC_ENCODER) { msm_comm_store_filled_length(&inst->fbd_data, vb->index, fill_buf_done->filled_len1); if (inst->max_filled_length < fill_buf_done->filled_len1) inst->max_filled_length = fill_buf_done->filled_len1; } tag_data.index = vb->index; Loading Loading @@ -6449,14 +6449,11 @@ int msm_comm_qbuf_cache_operations(struct msm_vidc_inst *inst, } else if (vb->type == V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE) { if (!i) { /* bitstream */ u32 size_u32; skip = false; offset = 0; size_u32 = vb->planes[i].length; msm_comm_fetch_filled_length( &inst->fbd_data, vb->index, &size_u32); size = size_u32; size = vb->planes[i].length; if (inst->max_filled_length) size = inst->max_filled_length; cache_op = SMEM_CACHE_INVALIDATE; } } Loading Loading @@ -6998,63 +6995,6 @@ void msm_comm_fetch_tags(struct msm_vidc_inst *inst, mutex_unlock(&inst->buffer_tags.lock); } void msm_comm_store_filled_length(struct msm_vidc_list *data_list, u32 index, u32 filled_length) { struct msm_vidc_buf_data *pdata = NULL; bool found = false; if (!data_list) { dprintk(VIDC_ERR, "%s: invalid params %pK\n", __func__, data_list); return; } mutex_lock(&data_list->lock); list_for_each_entry(pdata, &data_list->list, list) { if (pdata->index == index) { pdata->filled_length = filled_length; found = true; break; } } if (!found) { pdata = kzalloc(sizeof(*pdata), GFP_KERNEL); if (!pdata) { dprintk(VIDC_WARN, "%s: malloc failure.\n", __func__); goto exit; } pdata->index = index; pdata->filled_length = filled_length; list_add_tail(&pdata->list, &data_list->list); } exit: mutex_unlock(&data_list->lock); } void msm_comm_fetch_filled_length(struct msm_vidc_list *data_list, u32 index, u32 *filled_length) { struct msm_vidc_buf_data *pdata = NULL; if (!data_list || !filled_length) { dprintk(VIDC_ERR, "%s: invalid params %pK %pK\n", __func__, data_list, filled_length); return; } mutex_lock(&data_list->lock); list_for_each_entry(pdata, &data_list->list, list) { if (pdata->index == index) { *filled_length = pdata->filled_length; break; } } mutex_unlock(&data_list->lock); } void msm_comm_store_mark_data(struct msm_vidc_list *data_list, u32 index, u32 mark_data, u32 mark_target) { Loading drivers/media/platform/msm/vidc/msm_vidc_common.h +0 −4 Original line number Diff line number Diff line Loading @@ -249,10 +249,6 @@ void print_v4l2_buffer(u32 tag, const char *str, struct msm_vidc_inst *inst, struct v4l2_buffer *v4l2); void kref_put_mbuf(struct msm_vidc_buffer *mbuf); bool kref_get_mbuf(struct msm_vidc_inst *inst, struct msm_vidc_buffer *mbuf); void msm_comm_store_filled_length(struct msm_vidc_list *data_list, u32 index, u32 filled_length); void msm_comm_fetch_filled_length(struct msm_vidc_list *data_list, u32 index, u32 *filled_length); void msm_comm_store_mark_data(struct msm_vidc_list *data_list, u32 index, u32 mark_data, u32 mark_target); void msm_comm_fetch_mark_data(struct msm_vidc_list *data_list, Loading drivers/media/platform/msm/vidc/msm_vidc_internal.h +1 −1 Original line number Diff line number Diff line Loading @@ -198,7 +198,6 @@ struct msm_vidc_buf_data { u32 index; u32 mark_data; u32 mark_target; u32 filled_length; }; struct msm_vidc_common_data { Loading Loading @@ -488,6 +487,7 @@ struct msm_vidc_inst { struct timer_list batch_timer; struct work_struct batch_work; bool decode_batching; u32 max_filled_length; }; extern struct msm_vidc_drv *vidc_driver; Loading Loading
drivers/media/platform/msm/vidc/msm_vidc.c +1 −0 Original line number Diff line number Diff line Loading @@ -1911,6 +1911,7 @@ void *msm_vidc_open(int core_id, int session_type) inst->profile = V4L2_MPEG_VIDEO_H264_PROFILE_BASELINE; inst->level = V4L2_MPEG_VIDEO_H264_LEVEL_1_0; inst->entropy_mode = V4L2_MPEG_VIDEO_H264_ENTROPY_MODE_CAVLC; inst->max_filled_length = 0; for (i = SESSION_MSG_INDEX(SESSION_MSG_START); i <= SESSION_MSG_INDEX(SESSION_MSG_END); i++) { init_completion(&inst->completions[i]); Loading
drivers/media/platform/msm/vidc/msm_vidc_common.c +5 −65 Original line number Diff line number Diff line Loading @@ -2684,8 +2684,8 @@ static void handle_fbd(enum hal_command_response cmd, void *data) fill_buf_done->mark_data, fill_buf_done->mark_target); } if (inst->session_type == MSM_VIDC_ENCODER) { msm_comm_store_filled_length(&inst->fbd_data, vb->index, fill_buf_done->filled_len1); if (inst->max_filled_length < fill_buf_done->filled_len1) inst->max_filled_length = fill_buf_done->filled_len1; } tag_data.index = vb->index; Loading Loading @@ -6449,14 +6449,11 @@ int msm_comm_qbuf_cache_operations(struct msm_vidc_inst *inst, } else if (vb->type == V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE) { if (!i) { /* bitstream */ u32 size_u32; skip = false; offset = 0; size_u32 = vb->planes[i].length; msm_comm_fetch_filled_length( &inst->fbd_data, vb->index, &size_u32); size = size_u32; size = vb->planes[i].length; if (inst->max_filled_length) size = inst->max_filled_length; cache_op = SMEM_CACHE_INVALIDATE; } } Loading Loading @@ -6998,63 +6995,6 @@ void msm_comm_fetch_tags(struct msm_vidc_inst *inst, mutex_unlock(&inst->buffer_tags.lock); } void msm_comm_store_filled_length(struct msm_vidc_list *data_list, u32 index, u32 filled_length) { struct msm_vidc_buf_data *pdata = NULL; bool found = false; if (!data_list) { dprintk(VIDC_ERR, "%s: invalid params %pK\n", __func__, data_list); return; } mutex_lock(&data_list->lock); list_for_each_entry(pdata, &data_list->list, list) { if (pdata->index == index) { pdata->filled_length = filled_length; found = true; break; } } if (!found) { pdata = kzalloc(sizeof(*pdata), GFP_KERNEL); if (!pdata) { dprintk(VIDC_WARN, "%s: malloc failure.\n", __func__); goto exit; } pdata->index = index; pdata->filled_length = filled_length; list_add_tail(&pdata->list, &data_list->list); } exit: mutex_unlock(&data_list->lock); } void msm_comm_fetch_filled_length(struct msm_vidc_list *data_list, u32 index, u32 *filled_length) { struct msm_vidc_buf_data *pdata = NULL; if (!data_list || !filled_length) { dprintk(VIDC_ERR, "%s: invalid params %pK %pK\n", __func__, data_list, filled_length); return; } mutex_lock(&data_list->lock); list_for_each_entry(pdata, &data_list->list, list) { if (pdata->index == index) { *filled_length = pdata->filled_length; break; } } mutex_unlock(&data_list->lock); } void msm_comm_store_mark_data(struct msm_vidc_list *data_list, u32 index, u32 mark_data, u32 mark_target) { Loading
drivers/media/platform/msm/vidc/msm_vidc_common.h +0 −4 Original line number Diff line number Diff line Loading @@ -249,10 +249,6 @@ void print_v4l2_buffer(u32 tag, const char *str, struct msm_vidc_inst *inst, struct v4l2_buffer *v4l2); void kref_put_mbuf(struct msm_vidc_buffer *mbuf); bool kref_get_mbuf(struct msm_vidc_inst *inst, struct msm_vidc_buffer *mbuf); void msm_comm_store_filled_length(struct msm_vidc_list *data_list, u32 index, u32 filled_length); void msm_comm_fetch_filled_length(struct msm_vidc_list *data_list, u32 index, u32 *filled_length); void msm_comm_store_mark_data(struct msm_vidc_list *data_list, u32 index, u32 mark_data, u32 mark_target); void msm_comm_fetch_mark_data(struct msm_vidc_list *data_list, Loading
drivers/media/platform/msm/vidc/msm_vidc_internal.h +1 −1 Original line number Diff line number Diff line Loading @@ -198,7 +198,6 @@ struct msm_vidc_buf_data { u32 index; u32 mark_data; u32 mark_target; u32 filled_length; }; struct msm_vidc_common_data { Loading Loading @@ -488,6 +487,7 @@ struct msm_vidc_inst { struct timer_list batch_timer; struct work_struct batch_work; bool decode_batching; u32 max_filled_length; }; extern struct msm_vidc_drv *vidc_driver; Loading