Loading msm/vidc/hfi_response_handler.c +30 −2 Original line number Diff line number Diff line Loading @@ -110,6 +110,7 @@ static int hfi_process_sess_evt_seq_changed(u32 device_id, struct hfi_bit_depth *pixel_depth; struct hfi_pic_struct *pic_struct; struct hfi_buffer_requirements *buf_req; struct hfi_dpb_counts *dpb_counts; struct hfi_index_extradata_input_crop_payload *crop_info; u32 rem_size,entropy_mode = 0; u8 *data_ptr; Loading Loading @@ -266,10 +267,10 @@ static int hfi_process_sess_evt_seq_changed(u32 device_id, buf_req = (struct hfi_buffer_requirements *) data_ptr; event_notify.capture_buf_count = event_notify.fw_min_cnt = buf_req->buffer_count_min; s_vpr_hp(sid, "Capture Count : 0x%x\n", event_notify.capture_buf_count); event_notify.fw_min_cnt); data_ptr += sizeof(struct hfi_buffer_requirements); rem_size -= Loading Loading @@ -300,6 +301,33 @@ static int hfi_process_sess_evt_seq_changed(u32 device_id, rem_size -= sizeof(struct hfi_index_extradata_input_crop_payload); break; case HFI_PROPERTY_PARAM_VDEC_DPB_COUNTS: if (!validate_pkt_size(rem_size, sizeof(struct hfi_dpb_counts))) return -E2BIG; data_ptr = data_ptr + sizeof(u32); dpb_counts = (struct hfi_dpb_counts *) data_ptr; event_notify.max_dpb_count = dpb_counts->max_dpb_count; event_notify.max_ref_frames = dpb_counts->max_ref_frames; event_notify.max_dec_buffering = dpb_counts->max_dec_buffering; event_notify.max_reorder_frames = dpb_counts->max_reorder_frames; event_notify.fw_min_cnt = dpb_counts->fw_min_cnt; s_vpr_h(sid, "FW DPB counts: dpb %d ref %d buff %d reorder %d fw_min_cnt %d\n", dpb_counts->max_dpb_count, dpb_counts->max_ref_frames, dpb_counts->max_dec_buffering, dpb_counts->max_reorder_frames, dpb_counts->fw_min_cnt); data_ptr += sizeof(struct hfi_dpb_counts); rem_size -= sizeof(struct hfi_dpb_counts); break; default: s_vpr_e(sid, "%s: cmd: %#x not supported\n", __func__, prop_id); Loading msm/vidc/msm_vidc_common.c +2 −1 Original line number Diff line number Diff line Loading @@ -1764,6 +1764,7 @@ static void handle_event_change(enum hal_command_response cmd, void *data) event_notify->profile, inst->sid); ptr[10] = msm_comm_get_v4l2_level(codec, event_notify->level, inst->sid); ptr[11] = event_notify->fw_min_cnt; s_vpr_h(inst->sid, "seq: height = %u width = %u profile = %u level = %u\n", Loading Loading @@ -1803,7 +1804,7 @@ static void handle_event_change(enum hal_command_response cmd, void *data) msm_dcvs_try_enable(inst); extra_buff_count = msm_vidc_get_extra_buff_count(inst, HAL_BUFFER_OUTPUT); fmt->count_min = event_notify->capture_buf_count; fmt->count_min = event_notify->fw_min_cnt; fmt->count_min_host = fmt->count_min + extra_buff_count; s_vpr_h(inst->sid, "seq: hal buffer[%d] count: min %d min_host %d\n", Loading msm/vidc/vidc_hfi.h +2 −0 Original line number Diff line number Diff line Loading @@ -157,6 +157,8 @@ struct hfi_extradata_header { (HFI_PROPERTY_PARAM_VDEC_OX_START + 0x00C) #define HFI_PROPERTY_PARAM_VDEC_THUMBNAIL_MODE \ (HFI_PROPERTY_PARAM_VDEC_OX_START + 0x00D) #define HFI_PROPERTY_PARAM_VDEC_DPB_COUNTS \ (HFI_PROPERTY_PARAM_VDEC_OX_START + 0x00E) #define HFI_PROPERTY_PARAM_VDEC_TIMESTAMP_EXTRADATA \ (HFI_PROPERTY_PARAM_VDEC_OX_START + 0x013) #define HFI_PROPERTY_PARAM_VDEC_INTERLACE_VIDEO_EXTRADATA \ Loading msm/vidc/vidc_hfi_api.h +5 −1 Original line number Diff line number Diff line Loading @@ -622,7 +622,11 @@ struct msm_vidc_cb_event { u32 profile; u32 level; u32 entropy_mode; u32 capture_buf_count; u32 max_dpb_count; u32 max_ref_frames; u32 max_dec_buffering; u32 max_reorder_frames; u32 fw_min_cnt; struct hal_index_extradata_input_crop_payload crop_data; }; Loading msm/vidc/vidc_hfi_helper.h +8 −0 Original line number Diff line number Diff line Loading @@ -587,6 +587,14 @@ struct hfi_profile_level { u32 level; }; struct hfi_dpb_counts { u32 max_dpb_count; u32 max_ref_frames; u32 max_dec_buffering; u32 max_reorder_frames; u32 fw_min_cnt; }; struct hfi_profile_level_supported { u32 profile_count; struct hfi_profile_level rg_profile_level[1]; Loading Loading
msm/vidc/hfi_response_handler.c +30 −2 Original line number Diff line number Diff line Loading @@ -110,6 +110,7 @@ static int hfi_process_sess_evt_seq_changed(u32 device_id, struct hfi_bit_depth *pixel_depth; struct hfi_pic_struct *pic_struct; struct hfi_buffer_requirements *buf_req; struct hfi_dpb_counts *dpb_counts; struct hfi_index_extradata_input_crop_payload *crop_info; u32 rem_size,entropy_mode = 0; u8 *data_ptr; Loading Loading @@ -266,10 +267,10 @@ static int hfi_process_sess_evt_seq_changed(u32 device_id, buf_req = (struct hfi_buffer_requirements *) data_ptr; event_notify.capture_buf_count = event_notify.fw_min_cnt = buf_req->buffer_count_min; s_vpr_hp(sid, "Capture Count : 0x%x\n", event_notify.capture_buf_count); event_notify.fw_min_cnt); data_ptr += sizeof(struct hfi_buffer_requirements); rem_size -= Loading Loading @@ -300,6 +301,33 @@ static int hfi_process_sess_evt_seq_changed(u32 device_id, rem_size -= sizeof(struct hfi_index_extradata_input_crop_payload); break; case HFI_PROPERTY_PARAM_VDEC_DPB_COUNTS: if (!validate_pkt_size(rem_size, sizeof(struct hfi_dpb_counts))) return -E2BIG; data_ptr = data_ptr + sizeof(u32); dpb_counts = (struct hfi_dpb_counts *) data_ptr; event_notify.max_dpb_count = dpb_counts->max_dpb_count; event_notify.max_ref_frames = dpb_counts->max_ref_frames; event_notify.max_dec_buffering = dpb_counts->max_dec_buffering; event_notify.max_reorder_frames = dpb_counts->max_reorder_frames; event_notify.fw_min_cnt = dpb_counts->fw_min_cnt; s_vpr_h(sid, "FW DPB counts: dpb %d ref %d buff %d reorder %d fw_min_cnt %d\n", dpb_counts->max_dpb_count, dpb_counts->max_ref_frames, dpb_counts->max_dec_buffering, dpb_counts->max_reorder_frames, dpb_counts->fw_min_cnt); data_ptr += sizeof(struct hfi_dpb_counts); rem_size -= sizeof(struct hfi_dpb_counts); break; default: s_vpr_e(sid, "%s: cmd: %#x not supported\n", __func__, prop_id); Loading
msm/vidc/msm_vidc_common.c +2 −1 Original line number Diff line number Diff line Loading @@ -1764,6 +1764,7 @@ static void handle_event_change(enum hal_command_response cmd, void *data) event_notify->profile, inst->sid); ptr[10] = msm_comm_get_v4l2_level(codec, event_notify->level, inst->sid); ptr[11] = event_notify->fw_min_cnt; s_vpr_h(inst->sid, "seq: height = %u width = %u profile = %u level = %u\n", Loading Loading @@ -1803,7 +1804,7 @@ static void handle_event_change(enum hal_command_response cmd, void *data) msm_dcvs_try_enable(inst); extra_buff_count = msm_vidc_get_extra_buff_count(inst, HAL_BUFFER_OUTPUT); fmt->count_min = event_notify->capture_buf_count; fmt->count_min = event_notify->fw_min_cnt; fmt->count_min_host = fmt->count_min + extra_buff_count; s_vpr_h(inst->sid, "seq: hal buffer[%d] count: min %d min_host %d\n", Loading
msm/vidc/vidc_hfi.h +2 −0 Original line number Diff line number Diff line Loading @@ -157,6 +157,8 @@ struct hfi_extradata_header { (HFI_PROPERTY_PARAM_VDEC_OX_START + 0x00C) #define HFI_PROPERTY_PARAM_VDEC_THUMBNAIL_MODE \ (HFI_PROPERTY_PARAM_VDEC_OX_START + 0x00D) #define HFI_PROPERTY_PARAM_VDEC_DPB_COUNTS \ (HFI_PROPERTY_PARAM_VDEC_OX_START + 0x00E) #define HFI_PROPERTY_PARAM_VDEC_TIMESTAMP_EXTRADATA \ (HFI_PROPERTY_PARAM_VDEC_OX_START + 0x013) #define HFI_PROPERTY_PARAM_VDEC_INTERLACE_VIDEO_EXTRADATA \ Loading
msm/vidc/vidc_hfi_api.h +5 −1 Original line number Diff line number Diff line Loading @@ -622,7 +622,11 @@ struct msm_vidc_cb_event { u32 profile; u32 level; u32 entropy_mode; u32 capture_buf_count; u32 max_dpb_count; u32 max_ref_frames; u32 max_dec_buffering; u32 max_reorder_frames; u32 fw_min_cnt; struct hal_index_extradata_input_crop_payload crop_data; }; Loading
msm/vidc/vidc_hfi_helper.h +8 −0 Original line number Diff line number Diff line Loading @@ -587,6 +587,14 @@ struct hfi_profile_level { u32 level; }; struct hfi_dpb_counts { u32 max_dpb_count; u32 max_ref_frames; u32 max_dec_buffering; u32 max_reorder_frames; u32 fw_min_cnt; }; struct hfi_profile_level_supported { u32 profile_count; struct hfi_profile_level rg_profile_level[1]; Loading