Loading drivers/media/platform/msm/vidc/hfi_packetization.c +17 −15 Original line number Diff line number Diff line Loading @@ -267,7 +267,7 @@ int create_pkt_set_cmd_sys_resource( break; } default: dprintk(VIDC_ERR, "Invalid resource_id %d", dprintk(VIDC_ERR, "Invalid resource_id %d\n", resource_hdr->resource_id); rc = -EINVAL; } Loading Loading @@ -912,7 +912,7 @@ int create_pkt_cmd_session_set_property( HFI_PROPERTY_PARAM_NAL_STREAM_FORMAT_SELECT; hfi = (struct hfi_nal_stream_format_select *) &pkt->rg_property_data[1]; dprintk(VIDC_DBG, "data is :%d", dprintk(VIDC_DBG, "data is :%d\n", prop->nal_stream_format_select); hfi->nal_stream_format_select = hal_to_hfi_type( HAL_PARAM_NAL_STREAM_FORMAT_SELECT, Loading @@ -934,7 +934,7 @@ int create_pkt_cmd_session_set_property( pkt->rg_property_data[1] = HFI_OUTPUT_ORDER_DISPLAY; break; default: dprintk(VIDC_ERR, "invalid output order: 0x%x", dprintk(VIDC_ERR, "invalid output order: 0x%x\n", *data); break; } Loading Loading @@ -1023,7 +1023,7 @@ int create_pkt_cmd_session_set_property( pkt->rg_property_data[1] = HFI_DIVX_FORMAT_6; break; default: dprintk(VIDC_ERR, "Invalid divx format: 0x%x", *data); dprintk(VIDC_ERR, "Invalid divx format: 0x%x\n", *data); break; } pkt->size += sizeof(u32) * 2; Loading Loading @@ -1118,14 +1118,14 @@ int create_pkt_cmd_session_set_property( if (hfi->profile <= 0) { hfi->profile = HFI_H264_PROFILE_HIGH; dprintk(VIDC_WARN, "Profile %d not supported, falling back to high", "Profile %d not supported, falling back to high\n", prop->profile); } if (!hfi->level) { hfi->level = 1; dprintk(VIDC_WARN, "Level %d not supported, falling back to high", "Level %d not supported, falling back to high\n", prop->level); } Loading Loading @@ -1175,7 +1175,8 @@ int create_pkt_cmd_session_set_property( pkt->rg_property_data[1] = HFI_RATE_CONTROL_VBR_VFR; break; default: dprintk(VIDC_ERR, "Invalid Rate control setting: 0x%x", dprintk(VIDC_ERR, "Invalid Rate control setting: 0x%x\n", (int)pdata); break; } Loading Loading @@ -1225,7 +1226,7 @@ int create_pkt_cmd_session_set_property( hfi->mode = HFI_H264_DB_MODE_ALL_BOUNDARY; break; default: dprintk(VIDC_ERR, "Invalid deblocking mode: 0x%x", dprintk(VIDC_ERR, "Invalid deblocking mode: 0x%x\n", prop->mode); break; } Loading Loading @@ -1358,7 +1359,7 @@ int create_pkt_cmd_session_set_property( hfi->rotation = HFI_ROTATE_270; break; default: dprintk(VIDC_ERR, "Invalid rotation setting: 0x%x", dprintk(VIDC_ERR, "Invalid rotation setting: 0x%x\n", prop->rotate); rc = -EINVAL; break; Loading @@ -1374,7 +1375,7 @@ int create_pkt_cmd_session_set_property( hfi->flip = HFI_FLIP_VERTICAL; break; default: dprintk(VIDC_ERR, "Invalid flip setting: 0x%x", dprintk(VIDC_ERR, "Invalid flip setting: 0x%x\n", prop->flip); rc = -EINVAL; break; Loading Loading @@ -1407,7 +1408,8 @@ int create_pkt_cmd_session_set_property( hfi->mode = HFI_INTRA_REFRESH_RANDOM; break; default: dprintk(VIDC_ERR, "Invalid intra refresh setting: 0x%x", dprintk(VIDC_ERR, "Invalid intra refresh setting: 0x%x\n", prop->mode); break; } Loading Loading @@ -1440,7 +1442,7 @@ int create_pkt_cmd_session_set_property( hfi->multi_slice = HFI_MULTI_SLICE_BY_BYTE_COUNT; break; default: dprintk(VIDC_ERR, "Invalid slice settings: 0x%x", dprintk(VIDC_ERR, "Invalid slice settings: 0x%x\n", prop->multi_slice); break; } Loading Loading @@ -1630,7 +1632,7 @@ int create_pkt_cmd_session_set_property( case HAL_CONFIG_VENC_TIMESTAMP_SCALE: case HAL_PARAM_VENC_LOW_LATENCY: default: dprintk(VIDC_ERR, "DEFAULT: Calling 0x%x", ptype); dprintk(VIDC_ERR, "DEFAULT: Calling 0x%x\n", ptype); rc = -ENOTSUPP; break; } Loading drivers/media/platform/msm/vidc/hfi_response_handler.c +94 −79 Original line number Diff line number Diff line Loading @@ -112,10 +112,11 @@ static void hfi_process_sess_evt_seq_changed( struct hfi_profile_level *profile_level; u8 *data_ptr; int prop_id; dprintk(VIDC_DBG, "RECEIVED:EVENT_NOTIFY"); dprintk(VIDC_DBG, "RECEIVED: EVENT_NOTIFY\n"); if (sizeof(struct hfi_msg_event_notify_packet) > pkt->size) { dprintk(VIDC_ERR, "hal_process_session_init_done:bad_pkt_size"); dprintk(VIDC_ERR, "hal_process_session_init_done: bad_pkt_size\n"); return; } Loading Loading @@ -168,7 +169,8 @@ static void hfi_process_sess_evt_seq_changed( sizeof(struct hfi_profile_level); break; default: dprintk(VIDC_ERR, "%s cmd:0x%x not supported\n", dprintk(VIDC_ERR, "%s cmd: 0x%x not supported\n", __func__, prop_id); break; } Loading @@ -188,10 +190,12 @@ static void hfi_process_evt_release_buffer_ref( struct hfi_msg_release_buffer_ref_event_packet *data; dprintk(VIDC_DBG, "RECEIVED:EVENT_NOTIFY - release_buffer_reference"); dprintk(VIDC_DBG, "RECEIVED: EVENT_NOTIFY - release_buffer_reference\n"); if (sizeof(struct hfi_msg_event_notify_packet) > pkt->size) { dprintk(VIDC_ERR, "hal_process_session_init_done:bad_pkt_size"); dprintk(VIDC_ERR, "hal_process_session_init_done: bad_pkt_size\n"); return; } Loading Loading @@ -248,11 +252,11 @@ static void hfi_process_event_notify( struct list_head *sessions, struct mutex *session_lock) { struct hal_session *sess = NULL; dprintk(VIDC_DBG, "RECVD:EVENT_NOTIFY"); dprintk(VIDC_DBG, "Received: EVENT_NOTIFY\n"); if (!callback || !pkt || pkt->size < sizeof(struct hfi_msg_event_notify_packet)) { dprintk(VIDC_ERR, "Invalid Params"); dprintk(VIDC_ERR, "Invalid Params\n"); return; } sess = (struct hal_session *)pkt->session_id; Loading @@ -264,25 +268,26 @@ static void hfi_process_event_notify( hfi_process_sys_error(callback, device_id); break; case HFI_EVENT_SESSION_ERROR: dprintk(VIDC_INFO, "HFI_EVENT_SESSION_ERROR"); dprintk(VIDC_INFO, "HFI_EVENT_SESSION_ERROR\n"); if (!validate_session_pkt(sessions, sess, session_lock)) hfi_process_session_error(callback, device_id, pkt); break; case HFI_EVENT_SESSION_SEQUENCE_CHANGED: dprintk(VIDC_INFO, "HFI_EVENT_SESSION_SEQUENCE_CHANGED"); dprintk(VIDC_INFO, "HFI_EVENT_SESSION_SEQUENCE_CHANGED\n"); if (!validate_session_pkt(sessions, sess, session_lock)) hfi_process_sess_evt_seq_changed(callback, device_id, pkt); break; case HFI_EVENT_SESSION_PROPERTY_CHANGED: dprintk(VIDC_INFO, "HFI_EVENT_SESSION_PROPERTY_CHANGED"); dprintk(VIDC_INFO, "HFI_EVENT_SESSION_PROPERTY_CHANGED\n"); break; case HFI_EVENT_RELEASE_BUFFER_REFERENCE: dprintk(VIDC_INFO, "HFI_EVENT_RELEASE_BUFFER_REFERENCE\n"); hfi_process_evt_release_buffer_ref(callback, device_id, pkt); break; default: dprintk(VIDC_WARN, "hal_process_event_notify:unkown_event_id"); dprintk(VIDC_WARN, "hal_process_event_notify: unknown_event_id\n"); break; } } Loading @@ -297,9 +302,10 @@ static void hfi_process_sys_init_done( int prop_id; enum vidc_status status = VIDC_ERR_NONE; dprintk(VIDC_DBG, "RECEIVED:SYS_INIT_DONE"); dprintk(VIDC_DBG, "RECEIVED: SYS_INIT_DONE\n"); if (sizeof(struct hfi_msg_sys_init_done_packet) > pkt->size) { dprintk(VIDC_ERR, "hal_process_sys_init_done:bad_pkt_size: %d", dprintk(VIDC_ERR, "hal_process_sys_init_done: bad_pkt_size: %d\n", pkt->size); return; } Loading @@ -308,8 +314,8 @@ static void hfi_process_sys_init_done( if (!status) { if (pkt->num_properties == 0) { dprintk(VIDC_ERR, "hal_process_sys_init_done:" "no_properties"); dprintk(VIDC_ERR, "hal_process_sys_init_done: no_properties\n"); status = VIDC_ERR_FAIL; goto err_no_prop; } Loading @@ -318,8 +324,8 @@ static void hfi_process_sys_init_done( hfi_msg_sys_init_done_packet) + sizeof(u32); if (rem_bytes == 0) { dprintk(VIDC_ERR, "hal_process_sys_init_done:" "missing_prop_info"); dprintk(VIDC_ERR, "hal_process_sys_init_done: missing_prop_info\n"); status = VIDC_ERR_FAIL; goto err_no_prop; } Loading Loading @@ -351,8 +357,8 @@ static void hfi_process_sys_init_done( break; } default: dprintk(VIDC_ERR, "hal_process_sys_init_done:" "bad_prop_id"); dprintk(VIDC_ERR, "hal_process_sys_init_done: bad_prop_id\n"); status = VIDC_ERR_BAD_PARAM; break; } Loading Loading @@ -380,11 +386,11 @@ static void hfi_process_sys_rel_resource_done( enum vidc_status status = VIDC_ERR_NONE; u32 pkt_size; memset(&cmd_done, 0, sizeof(struct msm_vidc_cb_cmd_done)); dprintk(VIDC_DBG, "RECEIVED:SYS_RELEASE_RESOURCE_DONE"); dprintk(VIDC_DBG, "RECEIVED: SYS_RELEASE_RESOURCE_DONE\n"); pkt_size = sizeof(struct hfi_msg_sys_release_resource_done_packet); if (pkt_size > pkt->size) { dprintk(VIDC_ERR, "hal_process_sys_rel_resource_done:bad size:%d", "hal_process_sys_rel_resource_done: bad size: %d\n", pkt->size); return; } Loading Loading @@ -460,7 +466,7 @@ enum vidc_status hfi_process_sess_init_done_prop_read( if (rem_bytes == 0) { dprintk(VIDC_ERR, "hfi_msg_sys_session_init_done:missing_prop_info"); "hfi_msg_sys_session_init_done: missing_prop_info\n"); return VIDC_ERR_FAIL; } Loading Loading @@ -652,7 +658,7 @@ enum vidc_status hfi_process_sess_init_done_prop_read( } default: dprintk(VIDC_DBG, "%s default case - 0x%x", __func__, prop_id); "%s default case - 0x%x\n", __func__, prop_id); } rem_bytes -= next_offset; data_ptr += next_offset; Loading @@ -669,7 +675,7 @@ static void hfi_process_sess_get_prop_profile_level( dprintk(VIDC_DBG, "Entered %s\n", __func__); if (!prop) { dprintk(VIDC_ERR, "hal_process_sess_get_profile_level:bad_prop: %p", "hal_process_sess_get_profile_level: bad_prop: %p\n", prop); return; } Loading @@ -678,7 +684,7 @@ static void hfi_process_sess_get_prop_profile_level( if (!req_bytes || (req_bytes % sizeof(struct hfi_profile_level))) { dprintk(VIDC_ERR, "hal_process_sess_get_profile_level:bad_pkt: %d", "hal_process_sess_get_profile_level: bad_pkt: %d\n", req_bytes); return; } Loading @@ -698,10 +704,9 @@ static void hfi_process_sess_get_prop_buf_req( struct hfi_buffer_requirements *hfi_buf_req; u32 req_bytes; dprintk(VIDC_DBG, "Entered "); if (!prop) { dprintk(VIDC_ERR, "hal_process_sess_get_prop_buf_req:bad_prop: %p", "hal_process_sess_get_prop_buf_req: bad_prop: %p\n", prop); return; } Loading @@ -712,7 +717,7 @@ static void hfi_process_sess_get_prop_buf_req( struct hfi_buffer_requirements)) || (!prop->rg_property_data[1])) { dprintk(VIDC_ERR, "hal_process_sess_get_prop_buf_req:bad_pkt: %d", "hal_process_sess_get_prop_buf_req: bad_pkt: %d\n", req_bytes); return; } Loading @@ -726,9 +731,9 @@ static void hfi_process_sess_get_prop_buf_req( buffer_count_actual))) dprintk(VIDC_WARN, "hal_process_sess_get_prop_buf_req:" "bad_buf_req"); "bad_buf_req\n"); dprintk(VIDC_DBG, "got buffer requirements for: %d", dprintk(VIDC_DBG, "got buffer requirements for: %d\n", hfi_buf_req->buffer_type); switch (hfi_buf_req->buffer_type) { case HFI_BUFFER_INPUT: Loading Loading @@ -796,7 +801,7 @@ static void hfi_process_sess_get_prop_buf_req( break; default: dprintk(VIDC_ERR, "hal_process_sess_get_prop_buf_req: bad_buffer_type: %d", "hal_process_sess_get_prop_buf_req: bad_buffer_type: %d\n", hfi_buf_req->buffer_type); break; } Loading @@ -816,13 +821,14 @@ static void hfi_process_session_prop_info( dprintk(VIDC_DBG, "Received SESSION_PROPERTY_INFO\n"); if (pkt->size < sizeof(struct hfi_msg_session_property_info_packet)) { dprintk(VIDC_ERR, "hal_process_session_prop_info:bad_pkt_size"); dprintk(VIDC_ERR, "hal_process_session_prop_info: bad_pkt_size\n"); return; } if (pkt->num_properties == 0) { dprintk(VIDC_ERR, "hal_process_session_prop_info:no_properties"); "hal_process_session_prop_info: no_properties\n"); return; } Loading @@ -849,8 +855,8 @@ static void hfi_process_session_prop_info( callback(SESSION_PROPERTY_INFO, &cmd_done); break; default: dprintk(VIDC_ERR, "hal_process_session_prop_info:" "unknown_prop_id: %d", dprintk(VIDC_ERR, "hal_process_session_prop_info: unknown_prop_id: %d\n", pkt->rg_property_data[0]); break; } Loading @@ -863,10 +869,11 @@ static void hfi_process_session_init_done( struct msm_vidc_cb_cmd_done cmd_done; struct vidc_hal_session_init_done session_init_done; struct hal_session *sess_close = NULL; dprintk(VIDC_DBG, "RECEIVED:SESSION_INIT_DONE"); dprintk(VIDC_DBG, "RECEIVED: SESSION_INIT_DONE\n"); if (sizeof(struct hfi_msg_sys_session_init_done_packet) > pkt->size) { dprintk(VIDC_ERR, "hal_process_session_init_done:bad_pkt_size"); dprintk(VIDC_ERR, "hal_process_session_init_done: bad_pkt_size\n"); return; } Loading @@ -886,7 +893,7 @@ static void hfi_process_session_init_done( sess_close = (struct hal_session *)pkt->session_id; if (sess_close) { dprintk(VIDC_INFO, "Sess init failed: Deleting session: 0x%x 0x%p", "Sess init failed: Deleting session: 0x%x 0x%p\n", sess_close->session_id, sess_close); list_del(&sess_close->list); kfree(sess_close); Loading @@ -902,12 +909,13 @@ static void hfi_process_session_load_res_done( struct hfi_msg_session_load_resources_done_packet *pkt) { struct msm_vidc_cb_cmd_done cmd_done; dprintk(VIDC_DBG, "RECEIVED:SESSION_LOAD_RESOURCES_DONE"); dprintk(VIDC_DBG, "RECEIVED: SESSION_LOAD_RESOURCES_DONE\n"); if (sizeof(struct hfi_msg_session_load_resources_done_packet) != pkt->size) { dprintk(VIDC_ERR, "hal_process_session_load_res_done:" " bad packet size: %d", pkt->size); dprintk(VIDC_ERR, "hal_process_session_load_res_done: bad packet size: %d\n", pkt->size); return; } Loading @@ -928,11 +936,12 @@ static void hfi_process_session_flush_done( { struct msm_vidc_cb_cmd_done cmd_done; dprintk(VIDC_DBG, "RECEIVED:SESSION_FLUSH_DONE"); dprintk(VIDC_DBG, "RECEIVED: SESSION_FLUSH_DONE\n"); if (sizeof(struct hfi_msg_session_flush_done_packet) != pkt->size) { dprintk(VIDC_ERR, "hal_process_session_flush_done: " "bad packet size: %d", pkt->size); dprintk(VIDC_ERR, "hal_process_session_flush_done: bad packet size: %d\n", pkt->size); return; } Loading @@ -952,11 +961,12 @@ static void hfi_process_session_etb_done( { struct msm_vidc_cb_data_done data_done; dprintk(VIDC_DBG, "RECEIVED:SESSION_ETB_DONE"); dprintk(VIDC_DBG, "RECEIVED: SESSION_ETB_DONE\n"); if (!pkt || pkt->size < sizeof(struct hfi_msg_session_empty_buffer_done_packet)) { dprintk(VIDC_ERR, "hal_process_session_etb_done:bad_pkt_size"); dprintk(VIDC_ERR, "hal_process_session_etb_done: bad_pkt_size\n"); return; } Loading Loading @@ -988,13 +998,13 @@ static void hfi_process_session_ftb_done( struct hal_session *session; if (!msg_hdr) { dprintk(VIDC_ERR, "Invalid Params"); dprintk(VIDC_ERR, "Invalid Params\n"); return; } session = (struct hal_session *) ((struct hal_session *) pack->session_id)->session_id; dprintk(VIDC_DBG, "RECEIVED:SESSION_FTB_DONE"); dprintk(VIDC_DBG, "RECEIVED: SESSION_FTB_DONE\n"); memset(&data_done, 0, sizeof(struct msm_vidc_cb_data_done)); Loading @@ -1006,11 +1016,11 @@ static void hfi_process_session_ftb_done( hfi_msg_session_fill_buffer_done_compressed_packet) > pkt->size) { dprintk(VIDC_ERR, "hal_process_session_ftb_done: bad_pkt_size"); "hal_process_session_ftb_done: bad_pkt_size\n"); return; } else if (pkt->error_type != HFI_ERR_NONE) { dprintk(VIDC_ERR, "got buffer back with error %x", "got buffer back with error %x\n", pkt->error_type); /* Proceed with the FBD */ } Loading Loading @@ -1045,8 +1055,8 @@ static void hfi_process_session_ftb_done( if (sizeof(struct hfi_msg_session_fbd_uncompressed_plane0_packet) > pkt->size) { dprintk(VIDC_ERR, "hal_process_session_ftb_done:" "bad_pkt_size"); dprintk(VIDC_ERR, "hal_process_session_ftb_done: bad_pkt_size\n"); return; } Loading Loading @@ -1092,12 +1102,13 @@ static void hfi_process_session_start_done( { struct msm_vidc_cb_cmd_done cmd_done; dprintk(VIDC_DBG, "RECEIVED:SESSION_START_DONE"); dprintk(VIDC_DBG, "RECEIVED: SESSION_START_DONE\n"); if (!pkt || pkt->size != sizeof(struct hfi_msg_session_start_done_packet)) { dprintk(VIDC_ERR, "hal_process_session_start_done:" "bad packet/packet size: %d", pkt->size); dprintk(VIDC_ERR, "hal_process_session_start_done: bad packet/packet size: %d\n", pkt->size); return; } Loading @@ -1117,12 +1128,13 @@ static void hfi_process_session_stop_done( { struct msm_vidc_cb_cmd_done cmd_done; dprintk(VIDC_DBG, "RECEIVED:SESSION_STOP_DONE"); dprintk(VIDC_DBG, "RECEIVED: SESSION_STOP_DONE\n"); if (!pkt || pkt->size != sizeof(struct hfi_msg_session_stop_done_packet)) { dprintk(VIDC_ERR, "hal_process_session_stop_done:" "bad packet/packet size: %d", pkt->size); dprintk(VIDC_ERR, "hal_process_session_stop_done: bad packet/packet size: %d\n", pkt->size); return; } Loading @@ -1142,12 +1154,13 @@ static void hfi_process_session_rel_res_done( { struct msm_vidc_cb_cmd_done cmd_done; dprintk(VIDC_DBG, "RECEIVED:SESSION_RELEASE_RESOURCES_DONE"); dprintk(VIDC_DBG, "RECEIVED: SESSION_RELEASE_RESOURCES_DONE\n"); if (!pkt || pkt->size != sizeof(struct hfi_msg_session_release_resources_done_packet)) { dprintk(VIDC_ERR, "hal_process_session_rel_res_done:" "bad packet/packet size: %d", pkt->size); dprintk(VIDC_ERR, "hal_process_session_rel_res_done: bad packet/packet size: %d\n", pkt->size); return; } Loading @@ -1169,7 +1182,7 @@ static void hfi_process_session_rel_buf_done( if (!pkt || pkt->size != sizeof(struct hfi_msg_session_release_buffers_done_packet)) { dprintk(VIDC_ERR, "bad packet/packet size: %d", pkt->size); dprintk(VIDC_ERR, "bad packet/packet size: %d\n", pkt->size); return; } memset(&cmd_done, 0, sizeof(struct msm_vidc_cb_cmd_done)); Loading @@ -1193,12 +1206,13 @@ static void hfi_process_session_end_done( { struct msm_vidc_cb_cmd_done cmd_done; dprintk(VIDC_DBG, "RECEIVED:SESSION_END_DONE"); dprintk(VIDC_DBG, "RECEIVED: SESSION_END_DONE\n"); if (!pkt || pkt->size != sizeof(struct hfi_msg_sys_session_end_done_packet)) { dprintk(VIDC_ERR, "hal_process_session_end_done: " "bad packet/packet size: %d", pkt->size); dprintk(VIDC_ERR, "hal_process_session_end_done: bad packet/packet size: %d\n", pkt->size); return; } Loading @@ -1218,11 +1232,11 @@ static void hfi_process_session_abort_done( { struct msm_vidc_cb_cmd_done cmd_done; dprintk(VIDC_DBG, "RECEIVED:SESSION_ABORT_DONE"); dprintk(VIDC_DBG, "RECEIVED: SESSION_ABORT_DONE\n"); if (!pkt || pkt->size != sizeof(struct hfi_msg_sys_session_abort_done_packet)) { dprintk(VIDC_ERR, "%s: bad packet/packet size: %d", dprintk(VIDC_ERR, "%s: bad packet/packet size: %d\n", __func__, pkt ? pkt->size : 0); return; } Loading @@ -1245,7 +1259,7 @@ static void hfi_process_session_get_seq_hdr_done( if (!pkt || pkt->size != sizeof(struct hfi_msg_session_get_sequence_header_done_packet)) { dprintk(VIDC_ERR, "bad packet/packet size: %d", pkt->size); dprintk(VIDC_ERR, "bad packet/packet size: %d\n", pkt->size); return; } memset(&data_done, 0, sizeof(struct msm_vidc_cb_data_done)); Loading @@ -1256,7 +1270,7 @@ static void hfi_process_session_get_seq_hdr_done( data_done.status = hfi_map_err_status((u32)pkt->error_type); data_done.output_done.packet_buffer1 = pkt->sequence_header; data_done.output_done.filled_len1 = pkt->header_len; dprintk(VIDC_INFO, "seq_hdr: %p, Length: %d", dprintk(VIDC_INFO, "seq_hdr: %p, Length: %d\n", pkt->sequence_header, pkt->header_len); callback(SESSION_GET_SEQ_HDR_DONE, &data_done); } Loading @@ -1278,7 +1292,7 @@ static void hfi_process_sys_get_prop_image_version( !pkt->rg_property_data[1] || pkt->num_properties > 1) { dprintk(VIDC_ERR, "hfi_process_sys_get_prop_image_version:bad_pkt: %d", "hfi_process_sys_get_prop_image_version: bad_pkt: %d\n", req_bytes); return; } Loading Loading @@ -1344,13 +1358,14 @@ u32 hfi_process_msg_packet( struct hal_session *sess = NULL; if (!callback || !msg_hdr || msg_hdr->size < VIDC_IFACEQ_MIN_PKT_SIZE) { dprintk(VIDC_ERR, "hal_process_msg_packet:bad" "packet/packet size: %d", msg_hdr->size); dprintk(VIDC_ERR, "hal_process_msg_packet: bad packet/packet size: %d\n", msg_hdr->size); rc = -EINVAL; return rc; } dprintk(VIDC_INFO, "Received: 0x%x in ", msg_hdr->packet); dprintk(VIDC_INFO, "Received: 0x%x\n", msg_hdr->packet); rc = (u32) msg_hdr->packet; sess = (struct hal_session *)((struct vidc_hal_session_cmd_pkt*) msg_hdr)->session_id; Loading Loading @@ -1458,7 +1473,7 @@ u32 hfi_process_msg_packet( msg_hdr); break; default: dprintk(VIDC_DBG, "UNKNOWN_MSG_TYPE : %d", msg_hdr->packet); dprintk(VIDC_DBG, "UNKNOWN_MSG_TYPE : %d\n", msg_hdr->packet); break; } return rc; Loading drivers/media/platform/msm/vidc/msm_smem.c +10 −9 Original line number Diff line number Diff line Loading @@ -63,14 +63,15 @@ static int get_device_address(struct smem_client *smem_client, clnt = smem_client->clnt; if (!clnt) { dprintk(VIDC_ERR, "Invalid client"); dprintk(VIDC_ERR, "Invalid client\n"); return -EINVAL; } rc = msm_smem_get_domain_partition(smem_client, flags, buffer_type, &domain, &partition); if (rc) { dprintk(VIDC_ERR, "Failed to get domain and partition: %d", rc); dprintk(VIDC_ERR, "Failed to get domain and partition: %d\n", rc); goto mem_domain_get_failed; } Loading @@ -84,16 +85,16 @@ static int get_device_address(struct smem_client *smem_client, } if (is_iommu_present(smem_client->res)) { dprintk(VIDC_DBG, "Calling ion_map_iommu - domain: %d, partition: %d", "Calling ion_map_iommu - domain: %d, partition: %d\n", domain, partition); rc = ion_map_iommu(clnt, hndl, domain, partition, align, 0, iova, buffer_size, 0, 0); } else { dprintk(VIDC_DBG, "Using physical memory address"); dprintk(VIDC_DBG, "Using physical memory address\n"); rc = ion_phys(clnt, hndl, iova, (size_t *)buffer_size); } if (rc) { dprintk(VIDC_ERR, "ion memory map failed - %d", rc); dprintk(VIDC_ERR, "ion memory map failed - %d\n", rc); goto mem_map_failed; } Loading @@ -118,12 +119,12 @@ static void put_device_address(struct smem_client *smem_client, clnt = smem_client->clnt; if (!clnt) { dprintk(VIDC_WARN, "Invalid client"); dprintk(VIDC_WARN, "Invalid client\n"); return; } if (is_iommu_present(smem_client->res)) { dprintk(VIDC_DBG, "Calling ion_unmap_iommu - domain: %d, parition: %d", "Calling ion_unmap_iommu - domain: %d, parition: %d\n", domain_num, partition_num); ion_unmap_iommu(clnt, hndl, domain_num, partition_num); } Loading Loading @@ -270,7 +271,7 @@ static void free_ion_mem(struct smem_client *client, struct msm_smem *mem) rc = msm_smem_get_domain_partition((void *)client, mem->flags, mem->buffer_type, &domain, &partition); if (rc) { dprintk(VIDC_ERR, "Failed to get domain, partition: %d", rc); dprintk(VIDC_ERR, "Failed to get domain, partition: %d\n", rc); return; } Loading Loading @@ -514,7 +515,7 @@ int msm_smem_get_domain_partition(void *clt, u32 flags, enum hal_buffer bool is_secure = (flags & SMEM_SECURE); struct iommu_info *iommu_map; if (!domain_num || !partition_num) { dprintk(VIDC_DBG, "passed null to get domain partition!"); dprintk(VIDC_DBG, "passed null to get domain partition!\n"); return -EINVAL; } Loading drivers/media/platform/msm/vidc/msm_vdec.c +23 −21 Original line number Diff line number Diff line Loading @@ -541,7 +541,7 @@ static int is_ctrl_valid_for_codec(struct msm_vidc_inst *inst, switch (ctrl->id) { case V4L2_CID_MPEG_VIDC_VIDEO_MVC_BUFFER_LAYOUT: if (inst->fmts[OUTPUT_PORT]->fourcc != V4L2_PIX_FMT_H264_MVC) { dprintk(VIDC_ERR, "Control 0x%x only valid for MVC", dprintk(VIDC_ERR, "Control 0x%x only valid for MVC\n", ctrl->id); rc = -ENOTSUPP; break; Loading @@ -550,7 +550,8 @@ static int is_ctrl_valid_for_codec(struct msm_vidc_inst *inst, case V4L2_CID_MPEG_VIDEO_H264_PROFILE: if (inst->fmts[OUTPUT_PORT]->fourcc == V4L2_PIX_FMT_H264_MVC && ctrl->val != V4L2_MPEG_VIDEO_H264_PROFILE_STEREO_HIGH) { dprintk(VIDC_ERR, "Profile 0x%x not supported for MVC", dprintk(VIDC_ERR, "Profile 0x%x not supported for MVC\n", ctrl->val); rc = -ENOTSUPP; break; Loading @@ -559,7 +560,7 @@ static int is_ctrl_valid_for_codec(struct msm_vidc_inst *inst, case V4L2_CID_MPEG_VIDEO_H264_LEVEL: if (inst->fmts[OUTPUT_PORT]->fourcc == V4L2_PIX_FMT_H264_MVC && ctrl->val >= V4L2_MPEG_VIDEO_H264_LEVEL_5_2) { dprintk(VIDC_ERR, "Level 0x%x not supported for MVC", dprintk(VIDC_ERR, "Level 0x%x not supported for MVC\n", ctrl->val); rc = -ENOTSUPP; break; Loading Loading @@ -727,7 +728,7 @@ int msm_vdec_prepare_buf(struct msm_vidc_inst *inst, struct hfi_device *hdev; if (!inst || !inst->core || !inst->core->device) { dprintk(VIDC_ERR, "%s invalid parameters", __func__); dprintk(VIDC_ERR, "%s invalid parameters\n", __func__); return -EINVAL; } hdev = inst->core->device; Loading Loading @@ -775,7 +776,7 @@ int msm_vdec_prepare_buf(struct msm_vidc_inst *inst, (void *)inst->session, &buffer_info); if (rc) dprintk(VIDC_ERR, "vidc_hal_session_set_buffers failed"); "vidc_hal_session_set_buffers failed\n"); break; default: dprintk(VIDC_ERR, "Buffer type not recognized: %d\n", b->type); Loading @@ -795,7 +796,7 @@ int msm_vdec_release_buf(struct msm_vidc_inst *inst, struct hfi_device *hdev; if (!inst || !inst->core || !inst->core->device) { dprintk(VIDC_ERR, "%s invalid parameters", __func__); dprintk(VIDC_ERR, "%s invalid parameters\n", __func__); return -EINVAL; } Loading Loading @@ -854,7 +855,7 @@ int msm_vdec_release_buf(struct msm_vidc_inst *inst, (void *)inst->session, &buffer_info); if (rc) dprintk(VIDC_ERR, "vidc_hal_session_release_buffers failed"); "vidc_hal_session_release_buffers failed\n"); break; default: dprintk(VIDC_ERR, "Buffer type not recognized: %d\n", b->type); Loading Loading @@ -1115,7 +1116,7 @@ int msm_vdec_s_fmt(struct msm_vidc_inst *inst, struct v4l2_format *f) int max_input_size = 0; if (!inst || !f) { dprintk(VIDC_ERR, "%s invalid parameters", __func__); dprintk(VIDC_ERR, "%s invalid parameters\n", __func__); return -EINVAL; } if (f->type == V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE) { Loading Loading @@ -1322,7 +1323,7 @@ static int msm_vdec_queue_setup(struct vb2_queue *q, inst = q->drv_priv; if (!inst || !inst->core || !inst->core->device) { dprintk(VIDC_ERR, "%s invalid parameters", __func__); dprintk(VIDC_ERR, "%s invalid parameters\n", __func__); return -EINVAL; } Loading Loading @@ -1480,7 +1481,7 @@ static inline int start_streaming(struct msm_vidc_inst *inst) HAL_VIDEO_DECODER_SECONDARY) rc = msm_vidc_check_scaling_supported(inst); if (rc) { dprintk(VIDC_ERR, "H/w scaling is not in valid range"); dprintk(VIDC_ERR, "H/w scaling is not in valid range\n"); return -EINVAL; } rc = msm_comm_set_scratch_buffers(inst); Loading Loading @@ -1565,7 +1566,7 @@ static int msm_vdec_start_streaming(struct vb2_queue *q, unsigned int count) } inst = q->drv_priv; if (!inst || !inst->core || !inst->core->device) { dprintk(VIDC_ERR, "%s invalid parameters", __func__); dprintk(VIDC_ERR, "%s invalid parameters\n", __func__); return -EINVAL; } hdev = inst->core->device; Loading Loading @@ -1639,7 +1640,7 @@ int msm_vdec_cmd(struct msm_vidc_inst *inst, struct v4l2_decoder_cmd *dec) struct msm_vidc_core *core = inst->core; if (!dec || !inst || !inst->core) { dprintk(VIDC_ERR, "%s invalid params", __func__); dprintk(VIDC_ERR, "%s invalid params\n", __func__); return -EINVAL; } switch (dec->cmd) { Loading Loading @@ -1738,7 +1739,7 @@ static inline enum buffer_mode_type get_buf_type(int val) case V4L2_MPEG_VIDC_VIDEO_DYNAMIC: return HAL_BUFFER_MODE_DYNAMIC; default: dprintk(VIDC_ERR, "%s: invalid buf type: %d", __func__, val); dprintk(VIDC_ERR, "%s: invalid buf type: %d\n", __func__, val); } return 0; } Loading Loading @@ -1770,7 +1771,7 @@ static int try_get_ctrl(struct msm_vidc_inst *inst, struct v4l2_ctrl *ctrl) union hal_get_property hprop; if (!inst || !inst->core || !inst->core->device) { dprintk(VIDC_ERR, "%s invalid parameters", __func__); dprintk(VIDC_ERR, "%s invalid parameters\n", __func__); return -EINVAL; } Loading Loading @@ -1836,7 +1837,7 @@ static int try_set_ctrl(struct msm_vidc_inst *inst, struct v4l2_ctrl *ctrl) struct hal_mvc_buffer_layout layout; if (!inst || !inst->core || !inst->core->device) { dprintk(VIDC_ERR, "%s invalid parameters", __func__); dprintk(VIDC_ERR, "%s invalid parameters\n", __func__); return -EINVAL; } hdev = inst->core->device; Loading Loading @@ -1919,7 +1920,7 @@ static int try_set_ctrl(struct msm_vidc_inst *inst, struct v4l2_ctrl *ctrl) inst->flags |= VIDC_TURBO; break; default: dprintk(VIDC_ERR, "Perf mode %x not supported", dprintk(VIDC_ERR, "Perf mode %x not supported\n", ctrl->val); rc = -ENOTSUPP; break; Loading Loading @@ -1968,7 +1969,7 @@ static int try_set_ctrl(struct msm_vidc_inst *inst, struct v4l2_ctrl *ctrl) case V4L2_CID_MPEG_VIDC_VIDEO_STREAM_OUTPUT_MODE: if (ctrl->val && !(inst->capability.pixelprocess_capabilities & HAL_VIDEO_DECODER_MULTI_STREAM_CAPABILITY)) { dprintk(VIDC_ERR, "Downscaling not supported: 0x%x", dprintk(VIDC_ERR, "Downscaling not supported: 0x%x\n", ctrl->id); rc = -ENOTSUPP; break; Loading Loading @@ -2069,7 +2070,7 @@ static int msm_vdec_op_s_ctrl(struct v4l2_ctrl *ctrl) struct msm_vidc_inst *inst = container_of(ctrl->handler, struct msm_vidc_inst, ctrl_handler); if (!inst) { dprintk(VIDC_ERR, "%s invalid parameters", __func__); dprintk(VIDC_ERR, "%s invalid parameters\n", __func__); return -EINVAL; } rc = msm_comm_try_state(inst, MSM_VIDC_OPEN_DONE); Loading @@ -2083,7 +2084,7 @@ static int msm_vdec_op_s_ctrl(struct v4l2_ctrl *ctrl) if (ctrl->cluster[c]->is_new) { rc = try_set_ctrl(inst, ctrl->cluster[c]); if (rc) { dprintk(VIDC_ERR, "Failed setting %x", dprintk(VIDC_ERR, "Failed setting %x\n", ctrl->cluster[c]->id); break; } Loading Loading @@ -2113,7 +2114,7 @@ static int msm_vdec_op_g_volatile_ctrl(struct v4l2_ctrl *ctrl) if (master->cluster[c]->id == ctrl->id) { rc = try_get_ctrl(inst, ctrl); if (rc) { dprintk(VIDC_ERR, "Failed getting %x", dprintk(VIDC_ERR, "Failed getting %x\n", ctrl->id); return rc; } Loading Loading @@ -2256,7 +2257,8 @@ int msm_vdec_ctrl_init(struct msm_vidc_inst *inst) cluster = get_cluster(idx, &cluster_size); if (!cluster || !cluster_size) { dprintk(VIDC_WARN, "Failed to setup cluster of type %d", dprintk(VIDC_WARN, "Failed to setup cluster of type %d\n", idx); continue; } Loading drivers/media/platform/msm/vidc/msm_venc.c +27 −24 File changed.Preview size limit exceeded, changes collapsed. Show changes Loading
drivers/media/platform/msm/vidc/hfi_packetization.c +17 −15 Original line number Diff line number Diff line Loading @@ -267,7 +267,7 @@ int create_pkt_set_cmd_sys_resource( break; } default: dprintk(VIDC_ERR, "Invalid resource_id %d", dprintk(VIDC_ERR, "Invalid resource_id %d\n", resource_hdr->resource_id); rc = -EINVAL; } Loading Loading @@ -912,7 +912,7 @@ int create_pkt_cmd_session_set_property( HFI_PROPERTY_PARAM_NAL_STREAM_FORMAT_SELECT; hfi = (struct hfi_nal_stream_format_select *) &pkt->rg_property_data[1]; dprintk(VIDC_DBG, "data is :%d", dprintk(VIDC_DBG, "data is :%d\n", prop->nal_stream_format_select); hfi->nal_stream_format_select = hal_to_hfi_type( HAL_PARAM_NAL_STREAM_FORMAT_SELECT, Loading @@ -934,7 +934,7 @@ int create_pkt_cmd_session_set_property( pkt->rg_property_data[1] = HFI_OUTPUT_ORDER_DISPLAY; break; default: dprintk(VIDC_ERR, "invalid output order: 0x%x", dprintk(VIDC_ERR, "invalid output order: 0x%x\n", *data); break; } Loading Loading @@ -1023,7 +1023,7 @@ int create_pkt_cmd_session_set_property( pkt->rg_property_data[1] = HFI_DIVX_FORMAT_6; break; default: dprintk(VIDC_ERR, "Invalid divx format: 0x%x", *data); dprintk(VIDC_ERR, "Invalid divx format: 0x%x\n", *data); break; } pkt->size += sizeof(u32) * 2; Loading Loading @@ -1118,14 +1118,14 @@ int create_pkt_cmd_session_set_property( if (hfi->profile <= 0) { hfi->profile = HFI_H264_PROFILE_HIGH; dprintk(VIDC_WARN, "Profile %d not supported, falling back to high", "Profile %d not supported, falling back to high\n", prop->profile); } if (!hfi->level) { hfi->level = 1; dprintk(VIDC_WARN, "Level %d not supported, falling back to high", "Level %d not supported, falling back to high\n", prop->level); } Loading Loading @@ -1175,7 +1175,8 @@ int create_pkt_cmd_session_set_property( pkt->rg_property_data[1] = HFI_RATE_CONTROL_VBR_VFR; break; default: dprintk(VIDC_ERR, "Invalid Rate control setting: 0x%x", dprintk(VIDC_ERR, "Invalid Rate control setting: 0x%x\n", (int)pdata); break; } Loading Loading @@ -1225,7 +1226,7 @@ int create_pkt_cmd_session_set_property( hfi->mode = HFI_H264_DB_MODE_ALL_BOUNDARY; break; default: dprintk(VIDC_ERR, "Invalid deblocking mode: 0x%x", dprintk(VIDC_ERR, "Invalid deblocking mode: 0x%x\n", prop->mode); break; } Loading Loading @@ -1358,7 +1359,7 @@ int create_pkt_cmd_session_set_property( hfi->rotation = HFI_ROTATE_270; break; default: dprintk(VIDC_ERR, "Invalid rotation setting: 0x%x", dprintk(VIDC_ERR, "Invalid rotation setting: 0x%x\n", prop->rotate); rc = -EINVAL; break; Loading @@ -1374,7 +1375,7 @@ int create_pkt_cmd_session_set_property( hfi->flip = HFI_FLIP_VERTICAL; break; default: dprintk(VIDC_ERR, "Invalid flip setting: 0x%x", dprintk(VIDC_ERR, "Invalid flip setting: 0x%x\n", prop->flip); rc = -EINVAL; break; Loading Loading @@ -1407,7 +1408,8 @@ int create_pkt_cmd_session_set_property( hfi->mode = HFI_INTRA_REFRESH_RANDOM; break; default: dprintk(VIDC_ERR, "Invalid intra refresh setting: 0x%x", dprintk(VIDC_ERR, "Invalid intra refresh setting: 0x%x\n", prop->mode); break; } Loading Loading @@ -1440,7 +1442,7 @@ int create_pkt_cmd_session_set_property( hfi->multi_slice = HFI_MULTI_SLICE_BY_BYTE_COUNT; break; default: dprintk(VIDC_ERR, "Invalid slice settings: 0x%x", dprintk(VIDC_ERR, "Invalid slice settings: 0x%x\n", prop->multi_slice); break; } Loading Loading @@ -1630,7 +1632,7 @@ int create_pkt_cmd_session_set_property( case HAL_CONFIG_VENC_TIMESTAMP_SCALE: case HAL_PARAM_VENC_LOW_LATENCY: default: dprintk(VIDC_ERR, "DEFAULT: Calling 0x%x", ptype); dprintk(VIDC_ERR, "DEFAULT: Calling 0x%x\n", ptype); rc = -ENOTSUPP; break; } Loading
drivers/media/platform/msm/vidc/hfi_response_handler.c +94 −79 Original line number Diff line number Diff line Loading @@ -112,10 +112,11 @@ static void hfi_process_sess_evt_seq_changed( struct hfi_profile_level *profile_level; u8 *data_ptr; int prop_id; dprintk(VIDC_DBG, "RECEIVED:EVENT_NOTIFY"); dprintk(VIDC_DBG, "RECEIVED: EVENT_NOTIFY\n"); if (sizeof(struct hfi_msg_event_notify_packet) > pkt->size) { dprintk(VIDC_ERR, "hal_process_session_init_done:bad_pkt_size"); dprintk(VIDC_ERR, "hal_process_session_init_done: bad_pkt_size\n"); return; } Loading Loading @@ -168,7 +169,8 @@ static void hfi_process_sess_evt_seq_changed( sizeof(struct hfi_profile_level); break; default: dprintk(VIDC_ERR, "%s cmd:0x%x not supported\n", dprintk(VIDC_ERR, "%s cmd: 0x%x not supported\n", __func__, prop_id); break; } Loading @@ -188,10 +190,12 @@ static void hfi_process_evt_release_buffer_ref( struct hfi_msg_release_buffer_ref_event_packet *data; dprintk(VIDC_DBG, "RECEIVED:EVENT_NOTIFY - release_buffer_reference"); dprintk(VIDC_DBG, "RECEIVED: EVENT_NOTIFY - release_buffer_reference\n"); if (sizeof(struct hfi_msg_event_notify_packet) > pkt->size) { dprintk(VIDC_ERR, "hal_process_session_init_done:bad_pkt_size"); dprintk(VIDC_ERR, "hal_process_session_init_done: bad_pkt_size\n"); return; } Loading Loading @@ -248,11 +252,11 @@ static void hfi_process_event_notify( struct list_head *sessions, struct mutex *session_lock) { struct hal_session *sess = NULL; dprintk(VIDC_DBG, "RECVD:EVENT_NOTIFY"); dprintk(VIDC_DBG, "Received: EVENT_NOTIFY\n"); if (!callback || !pkt || pkt->size < sizeof(struct hfi_msg_event_notify_packet)) { dprintk(VIDC_ERR, "Invalid Params"); dprintk(VIDC_ERR, "Invalid Params\n"); return; } sess = (struct hal_session *)pkt->session_id; Loading @@ -264,25 +268,26 @@ static void hfi_process_event_notify( hfi_process_sys_error(callback, device_id); break; case HFI_EVENT_SESSION_ERROR: dprintk(VIDC_INFO, "HFI_EVENT_SESSION_ERROR"); dprintk(VIDC_INFO, "HFI_EVENT_SESSION_ERROR\n"); if (!validate_session_pkt(sessions, sess, session_lock)) hfi_process_session_error(callback, device_id, pkt); break; case HFI_EVENT_SESSION_SEQUENCE_CHANGED: dprintk(VIDC_INFO, "HFI_EVENT_SESSION_SEQUENCE_CHANGED"); dprintk(VIDC_INFO, "HFI_EVENT_SESSION_SEQUENCE_CHANGED\n"); if (!validate_session_pkt(sessions, sess, session_lock)) hfi_process_sess_evt_seq_changed(callback, device_id, pkt); break; case HFI_EVENT_SESSION_PROPERTY_CHANGED: dprintk(VIDC_INFO, "HFI_EVENT_SESSION_PROPERTY_CHANGED"); dprintk(VIDC_INFO, "HFI_EVENT_SESSION_PROPERTY_CHANGED\n"); break; case HFI_EVENT_RELEASE_BUFFER_REFERENCE: dprintk(VIDC_INFO, "HFI_EVENT_RELEASE_BUFFER_REFERENCE\n"); hfi_process_evt_release_buffer_ref(callback, device_id, pkt); break; default: dprintk(VIDC_WARN, "hal_process_event_notify:unkown_event_id"); dprintk(VIDC_WARN, "hal_process_event_notify: unknown_event_id\n"); break; } } Loading @@ -297,9 +302,10 @@ static void hfi_process_sys_init_done( int prop_id; enum vidc_status status = VIDC_ERR_NONE; dprintk(VIDC_DBG, "RECEIVED:SYS_INIT_DONE"); dprintk(VIDC_DBG, "RECEIVED: SYS_INIT_DONE\n"); if (sizeof(struct hfi_msg_sys_init_done_packet) > pkt->size) { dprintk(VIDC_ERR, "hal_process_sys_init_done:bad_pkt_size: %d", dprintk(VIDC_ERR, "hal_process_sys_init_done: bad_pkt_size: %d\n", pkt->size); return; } Loading @@ -308,8 +314,8 @@ static void hfi_process_sys_init_done( if (!status) { if (pkt->num_properties == 0) { dprintk(VIDC_ERR, "hal_process_sys_init_done:" "no_properties"); dprintk(VIDC_ERR, "hal_process_sys_init_done: no_properties\n"); status = VIDC_ERR_FAIL; goto err_no_prop; } Loading @@ -318,8 +324,8 @@ static void hfi_process_sys_init_done( hfi_msg_sys_init_done_packet) + sizeof(u32); if (rem_bytes == 0) { dprintk(VIDC_ERR, "hal_process_sys_init_done:" "missing_prop_info"); dprintk(VIDC_ERR, "hal_process_sys_init_done: missing_prop_info\n"); status = VIDC_ERR_FAIL; goto err_no_prop; } Loading Loading @@ -351,8 +357,8 @@ static void hfi_process_sys_init_done( break; } default: dprintk(VIDC_ERR, "hal_process_sys_init_done:" "bad_prop_id"); dprintk(VIDC_ERR, "hal_process_sys_init_done: bad_prop_id\n"); status = VIDC_ERR_BAD_PARAM; break; } Loading Loading @@ -380,11 +386,11 @@ static void hfi_process_sys_rel_resource_done( enum vidc_status status = VIDC_ERR_NONE; u32 pkt_size; memset(&cmd_done, 0, sizeof(struct msm_vidc_cb_cmd_done)); dprintk(VIDC_DBG, "RECEIVED:SYS_RELEASE_RESOURCE_DONE"); dprintk(VIDC_DBG, "RECEIVED: SYS_RELEASE_RESOURCE_DONE\n"); pkt_size = sizeof(struct hfi_msg_sys_release_resource_done_packet); if (pkt_size > pkt->size) { dprintk(VIDC_ERR, "hal_process_sys_rel_resource_done:bad size:%d", "hal_process_sys_rel_resource_done: bad size: %d\n", pkt->size); return; } Loading Loading @@ -460,7 +466,7 @@ enum vidc_status hfi_process_sess_init_done_prop_read( if (rem_bytes == 0) { dprintk(VIDC_ERR, "hfi_msg_sys_session_init_done:missing_prop_info"); "hfi_msg_sys_session_init_done: missing_prop_info\n"); return VIDC_ERR_FAIL; } Loading Loading @@ -652,7 +658,7 @@ enum vidc_status hfi_process_sess_init_done_prop_read( } default: dprintk(VIDC_DBG, "%s default case - 0x%x", __func__, prop_id); "%s default case - 0x%x\n", __func__, prop_id); } rem_bytes -= next_offset; data_ptr += next_offset; Loading @@ -669,7 +675,7 @@ static void hfi_process_sess_get_prop_profile_level( dprintk(VIDC_DBG, "Entered %s\n", __func__); if (!prop) { dprintk(VIDC_ERR, "hal_process_sess_get_profile_level:bad_prop: %p", "hal_process_sess_get_profile_level: bad_prop: %p\n", prop); return; } Loading @@ -678,7 +684,7 @@ static void hfi_process_sess_get_prop_profile_level( if (!req_bytes || (req_bytes % sizeof(struct hfi_profile_level))) { dprintk(VIDC_ERR, "hal_process_sess_get_profile_level:bad_pkt: %d", "hal_process_sess_get_profile_level: bad_pkt: %d\n", req_bytes); return; } Loading @@ -698,10 +704,9 @@ static void hfi_process_sess_get_prop_buf_req( struct hfi_buffer_requirements *hfi_buf_req; u32 req_bytes; dprintk(VIDC_DBG, "Entered "); if (!prop) { dprintk(VIDC_ERR, "hal_process_sess_get_prop_buf_req:bad_prop: %p", "hal_process_sess_get_prop_buf_req: bad_prop: %p\n", prop); return; } Loading @@ -712,7 +717,7 @@ static void hfi_process_sess_get_prop_buf_req( struct hfi_buffer_requirements)) || (!prop->rg_property_data[1])) { dprintk(VIDC_ERR, "hal_process_sess_get_prop_buf_req:bad_pkt: %d", "hal_process_sess_get_prop_buf_req: bad_pkt: %d\n", req_bytes); return; } Loading @@ -726,9 +731,9 @@ static void hfi_process_sess_get_prop_buf_req( buffer_count_actual))) dprintk(VIDC_WARN, "hal_process_sess_get_prop_buf_req:" "bad_buf_req"); "bad_buf_req\n"); dprintk(VIDC_DBG, "got buffer requirements for: %d", dprintk(VIDC_DBG, "got buffer requirements for: %d\n", hfi_buf_req->buffer_type); switch (hfi_buf_req->buffer_type) { case HFI_BUFFER_INPUT: Loading Loading @@ -796,7 +801,7 @@ static void hfi_process_sess_get_prop_buf_req( break; default: dprintk(VIDC_ERR, "hal_process_sess_get_prop_buf_req: bad_buffer_type: %d", "hal_process_sess_get_prop_buf_req: bad_buffer_type: %d\n", hfi_buf_req->buffer_type); break; } Loading @@ -816,13 +821,14 @@ static void hfi_process_session_prop_info( dprintk(VIDC_DBG, "Received SESSION_PROPERTY_INFO\n"); if (pkt->size < sizeof(struct hfi_msg_session_property_info_packet)) { dprintk(VIDC_ERR, "hal_process_session_prop_info:bad_pkt_size"); dprintk(VIDC_ERR, "hal_process_session_prop_info: bad_pkt_size\n"); return; } if (pkt->num_properties == 0) { dprintk(VIDC_ERR, "hal_process_session_prop_info:no_properties"); "hal_process_session_prop_info: no_properties\n"); return; } Loading @@ -849,8 +855,8 @@ static void hfi_process_session_prop_info( callback(SESSION_PROPERTY_INFO, &cmd_done); break; default: dprintk(VIDC_ERR, "hal_process_session_prop_info:" "unknown_prop_id: %d", dprintk(VIDC_ERR, "hal_process_session_prop_info: unknown_prop_id: %d\n", pkt->rg_property_data[0]); break; } Loading @@ -863,10 +869,11 @@ static void hfi_process_session_init_done( struct msm_vidc_cb_cmd_done cmd_done; struct vidc_hal_session_init_done session_init_done; struct hal_session *sess_close = NULL; dprintk(VIDC_DBG, "RECEIVED:SESSION_INIT_DONE"); dprintk(VIDC_DBG, "RECEIVED: SESSION_INIT_DONE\n"); if (sizeof(struct hfi_msg_sys_session_init_done_packet) > pkt->size) { dprintk(VIDC_ERR, "hal_process_session_init_done:bad_pkt_size"); dprintk(VIDC_ERR, "hal_process_session_init_done: bad_pkt_size\n"); return; } Loading @@ -886,7 +893,7 @@ static void hfi_process_session_init_done( sess_close = (struct hal_session *)pkt->session_id; if (sess_close) { dprintk(VIDC_INFO, "Sess init failed: Deleting session: 0x%x 0x%p", "Sess init failed: Deleting session: 0x%x 0x%p\n", sess_close->session_id, sess_close); list_del(&sess_close->list); kfree(sess_close); Loading @@ -902,12 +909,13 @@ static void hfi_process_session_load_res_done( struct hfi_msg_session_load_resources_done_packet *pkt) { struct msm_vidc_cb_cmd_done cmd_done; dprintk(VIDC_DBG, "RECEIVED:SESSION_LOAD_RESOURCES_DONE"); dprintk(VIDC_DBG, "RECEIVED: SESSION_LOAD_RESOURCES_DONE\n"); if (sizeof(struct hfi_msg_session_load_resources_done_packet) != pkt->size) { dprintk(VIDC_ERR, "hal_process_session_load_res_done:" " bad packet size: %d", pkt->size); dprintk(VIDC_ERR, "hal_process_session_load_res_done: bad packet size: %d\n", pkt->size); return; } Loading @@ -928,11 +936,12 @@ static void hfi_process_session_flush_done( { struct msm_vidc_cb_cmd_done cmd_done; dprintk(VIDC_DBG, "RECEIVED:SESSION_FLUSH_DONE"); dprintk(VIDC_DBG, "RECEIVED: SESSION_FLUSH_DONE\n"); if (sizeof(struct hfi_msg_session_flush_done_packet) != pkt->size) { dprintk(VIDC_ERR, "hal_process_session_flush_done: " "bad packet size: %d", pkt->size); dprintk(VIDC_ERR, "hal_process_session_flush_done: bad packet size: %d\n", pkt->size); return; } Loading @@ -952,11 +961,12 @@ static void hfi_process_session_etb_done( { struct msm_vidc_cb_data_done data_done; dprintk(VIDC_DBG, "RECEIVED:SESSION_ETB_DONE"); dprintk(VIDC_DBG, "RECEIVED: SESSION_ETB_DONE\n"); if (!pkt || pkt->size < sizeof(struct hfi_msg_session_empty_buffer_done_packet)) { dprintk(VIDC_ERR, "hal_process_session_etb_done:bad_pkt_size"); dprintk(VIDC_ERR, "hal_process_session_etb_done: bad_pkt_size\n"); return; } Loading Loading @@ -988,13 +998,13 @@ static void hfi_process_session_ftb_done( struct hal_session *session; if (!msg_hdr) { dprintk(VIDC_ERR, "Invalid Params"); dprintk(VIDC_ERR, "Invalid Params\n"); return; } session = (struct hal_session *) ((struct hal_session *) pack->session_id)->session_id; dprintk(VIDC_DBG, "RECEIVED:SESSION_FTB_DONE"); dprintk(VIDC_DBG, "RECEIVED: SESSION_FTB_DONE\n"); memset(&data_done, 0, sizeof(struct msm_vidc_cb_data_done)); Loading @@ -1006,11 +1016,11 @@ static void hfi_process_session_ftb_done( hfi_msg_session_fill_buffer_done_compressed_packet) > pkt->size) { dprintk(VIDC_ERR, "hal_process_session_ftb_done: bad_pkt_size"); "hal_process_session_ftb_done: bad_pkt_size\n"); return; } else if (pkt->error_type != HFI_ERR_NONE) { dprintk(VIDC_ERR, "got buffer back with error %x", "got buffer back with error %x\n", pkt->error_type); /* Proceed with the FBD */ } Loading Loading @@ -1045,8 +1055,8 @@ static void hfi_process_session_ftb_done( if (sizeof(struct hfi_msg_session_fbd_uncompressed_plane0_packet) > pkt->size) { dprintk(VIDC_ERR, "hal_process_session_ftb_done:" "bad_pkt_size"); dprintk(VIDC_ERR, "hal_process_session_ftb_done: bad_pkt_size\n"); return; } Loading Loading @@ -1092,12 +1102,13 @@ static void hfi_process_session_start_done( { struct msm_vidc_cb_cmd_done cmd_done; dprintk(VIDC_DBG, "RECEIVED:SESSION_START_DONE"); dprintk(VIDC_DBG, "RECEIVED: SESSION_START_DONE\n"); if (!pkt || pkt->size != sizeof(struct hfi_msg_session_start_done_packet)) { dprintk(VIDC_ERR, "hal_process_session_start_done:" "bad packet/packet size: %d", pkt->size); dprintk(VIDC_ERR, "hal_process_session_start_done: bad packet/packet size: %d\n", pkt->size); return; } Loading @@ -1117,12 +1128,13 @@ static void hfi_process_session_stop_done( { struct msm_vidc_cb_cmd_done cmd_done; dprintk(VIDC_DBG, "RECEIVED:SESSION_STOP_DONE"); dprintk(VIDC_DBG, "RECEIVED: SESSION_STOP_DONE\n"); if (!pkt || pkt->size != sizeof(struct hfi_msg_session_stop_done_packet)) { dprintk(VIDC_ERR, "hal_process_session_stop_done:" "bad packet/packet size: %d", pkt->size); dprintk(VIDC_ERR, "hal_process_session_stop_done: bad packet/packet size: %d\n", pkt->size); return; } Loading @@ -1142,12 +1154,13 @@ static void hfi_process_session_rel_res_done( { struct msm_vidc_cb_cmd_done cmd_done; dprintk(VIDC_DBG, "RECEIVED:SESSION_RELEASE_RESOURCES_DONE"); dprintk(VIDC_DBG, "RECEIVED: SESSION_RELEASE_RESOURCES_DONE\n"); if (!pkt || pkt->size != sizeof(struct hfi_msg_session_release_resources_done_packet)) { dprintk(VIDC_ERR, "hal_process_session_rel_res_done:" "bad packet/packet size: %d", pkt->size); dprintk(VIDC_ERR, "hal_process_session_rel_res_done: bad packet/packet size: %d\n", pkt->size); return; } Loading @@ -1169,7 +1182,7 @@ static void hfi_process_session_rel_buf_done( if (!pkt || pkt->size != sizeof(struct hfi_msg_session_release_buffers_done_packet)) { dprintk(VIDC_ERR, "bad packet/packet size: %d", pkt->size); dprintk(VIDC_ERR, "bad packet/packet size: %d\n", pkt->size); return; } memset(&cmd_done, 0, sizeof(struct msm_vidc_cb_cmd_done)); Loading @@ -1193,12 +1206,13 @@ static void hfi_process_session_end_done( { struct msm_vidc_cb_cmd_done cmd_done; dprintk(VIDC_DBG, "RECEIVED:SESSION_END_DONE"); dprintk(VIDC_DBG, "RECEIVED: SESSION_END_DONE\n"); if (!pkt || pkt->size != sizeof(struct hfi_msg_sys_session_end_done_packet)) { dprintk(VIDC_ERR, "hal_process_session_end_done: " "bad packet/packet size: %d", pkt->size); dprintk(VIDC_ERR, "hal_process_session_end_done: bad packet/packet size: %d\n", pkt->size); return; } Loading @@ -1218,11 +1232,11 @@ static void hfi_process_session_abort_done( { struct msm_vidc_cb_cmd_done cmd_done; dprintk(VIDC_DBG, "RECEIVED:SESSION_ABORT_DONE"); dprintk(VIDC_DBG, "RECEIVED: SESSION_ABORT_DONE\n"); if (!pkt || pkt->size != sizeof(struct hfi_msg_sys_session_abort_done_packet)) { dprintk(VIDC_ERR, "%s: bad packet/packet size: %d", dprintk(VIDC_ERR, "%s: bad packet/packet size: %d\n", __func__, pkt ? pkt->size : 0); return; } Loading @@ -1245,7 +1259,7 @@ static void hfi_process_session_get_seq_hdr_done( if (!pkt || pkt->size != sizeof(struct hfi_msg_session_get_sequence_header_done_packet)) { dprintk(VIDC_ERR, "bad packet/packet size: %d", pkt->size); dprintk(VIDC_ERR, "bad packet/packet size: %d\n", pkt->size); return; } memset(&data_done, 0, sizeof(struct msm_vidc_cb_data_done)); Loading @@ -1256,7 +1270,7 @@ static void hfi_process_session_get_seq_hdr_done( data_done.status = hfi_map_err_status((u32)pkt->error_type); data_done.output_done.packet_buffer1 = pkt->sequence_header; data_done.output_done.filled_len1 = pkt->header_len; dprintk(VIDC_INFO, "seq_hdr: %p, Length: %d", dprintk(VIDC_INFO, "seq_hdr: %p, Length: %d\n", pkt->sequence_header, pkt->header_len); callback(SESSION_GET_SEQ_HDR_DONE, &data_done); } Loading @@ -1278,7 +1292,7 @@ static void hfi_process_sys_get_prop_image_version( !pkt->rg_property_data[1] || pkt->num_properties > 1) { dprintk(VIDC_ERR, "hfi_process_sys_get_prop_image_version:bad_pkt: %d", "hfi_process_sys_get_prop_image_version: bad_pkt: %d\n", req_bytes); return; } Loading Loading @@ -1344,13 +1358,14 @@ u32 hfi_process_msg_packet( struct hal_session *sess = NULL; if (!callback || !msg_hdr || msg_hdr->size < VIDC_IFACEQ_MIN_PKT_SIZE) { dprintk(VIDC_ERR, "hal_process_msg_packet:bad" "packet/packet size: %d", msg_hdr->size); dprintk(VIDC_ERR, "hal_process_msg_packet: bad packet/packet size: %d\n", msg_hdr->size); rc = -EINVAL; return rc; } dprintk(VIDC_INFO, "Received: 0x%x in ", msg_hdr->packet); dprintk(VIDC_INFO, "Received: 0x%x\n", msg_hdr->packet); rc = (u32) msg_hdr->packet; sess = (struct hal_session *)((struct vidc_hal_session_cmd_pkt*) msg_hdr)->session_id; Loading Loading @@ -1458,7 +1473,7 @@ u32 hfi_process_msg_packet( msg_hdr); break; default: dprintk(VIDC_DBG, "UNKNOWN_MSG_TYPE : %d", msg_hdr->packet); dprintk(VIDC_DBG, "UNKNOWN_MSG_TYPE : %d\n", msg_hdr->packet); break; } return rc; Loading
drivers/media/platform/msm/vidc/msm_smem.c +10 −9 Original line number Diff line number Diff line Loading @@ -63,14 +63,15 @@ static int get_device_address(struct smem_client *smem_client, clnt = smem_client->clnt; if (!clnt) { dprintk(VIDC_ERR, "Invalid client"); dprintk(VIDC_ERR, "Invalid client\n"); return -EINVAL; } rc = msm_smem_get_domain_partition(smem_client, flags, buffer_type, &domain, &partition); if (rc) { dprintk(VIDC_ERR, "Failed to get domain and partition: %d", rc); dprintk(VIDC_ERR, "Failed to get domain and partition: %d\n", rc); goto mem_domain_get_failed; } Loading @@ -84,16 +85,16 @@ static int get_device_address(struct smem_client *smem_client, } if (is_iommu_present(smem_client->res)) { dprintk(VIDC_DBG, "Calling ion_map_iommu - domain: %d, partition: %d", "Calling ion_map_iommu - domain: %d, partition: %d\n", domain, partition); rc = ion_map_iommu(clnt, hndl, domain, partition, align, 0, iova, buffer_size, 0, 0); } else { dprintk(VIDC_DBG, "Using physical memory address"); dprintk(VIDC_DBG, "Using physical memory address\n"); rc = ion_phys(clnt, hndl, iova, (size_t *)buffer_size); } if (rc) { dprintk(VIDC_ERR, "ion memory map failed - %d", rc); dprintk(VIDC_ERR, "ion memory map failed - %d\n", rc); goto mem_map_failed; } Loading @@ -118,12 +119,12 @@ static void put_device_address(struct smem_client *smem_client, clnt = smem_client->clnt; if (!clnt) { dprintk(VIDC_WARN, "Invalid client"); dprintk(VIDC_WARN, "Invalid client\n"); return; } if (is_iommu_present(smem_client->res)) { dprintk(VIDC_DBG, "Calling ion_unmap_iommu - domain: %d, parition: %d", "Calling ion_unmap_iommu - domain: %d, parition: %d\n", domain_num, partition_num); ion_unmap_iommu(clnt, hndl, domain_num, partition_num); } Loading Loading @@ -270,7 +271,7 @@ static void free_ion_mem(struct smem_client *client, struct msm_smem *mem) rc = msm_smem_get_domain_partition((void *)client, mem->flags, mem->buffer_type, &domain, &partition); if (rc) { dprintk(VIDC_ERR, "Failed to get domain, partition: %d", rc); dprintk(VIDC_ERR, "Failed to get domain, partition: %d\n", rc); return; } Loading Loading @@ -514,7 +515,7 @@ int msm_smem_get_domain_partition(void *clt, u32 flags, enum hal_buffer bool is_secure = (flags & SMEM_SECURE); struct iommu_info *iommu_map; if (!domain_num || !partition_num) { dprintk(VIDC_DBG, "passed null to get domain partition!"); dprintk(VIDC_DBG, "passed null to get domain partition!\n"); return -EINVAL; } Loading
drivers/media/platform/msm/vidc/msm_vdec.c +23 −21 Original line number Diff line number Diff line Loading @@ -541,7 +541,7 @@ static int is_ctrl_valid_for_codec(struct msm_vidc_inst *inst, switch (ctrl->id) { case V4L2_CID_MPEG_VIDC_VIDEO_MVC_BUFFER_LAYOUT: if (inst->fmts[OUTPUT_PORT]->fourcc != V4L2_PIX_FMT_H264_MVC) { dprintk(VIDC_ERR, "Control 0x%x only valid for MVC", dprintk(VIDC_ERR, "Control 0x%x only valid for MVC\n", ctrl->id); rc = -ENOTSUPP; break; Loading @@ -550,7 +550,8 @@ static int is_ctrl_valid_for_codec(struct msm_vidc_inst *inst, case V4L2_CID_MPEG_VIDEO_H264_PROFILE: if (inst->fmts[OUTPUT_PORT]->fourcc == V4L2_PIX_FMT_H264_MVC && ctrl->val != V4L2_MPEG_VIDEO_H264_PROFILE_STEREO_HIGH) { dprintk(VIDC_ERR, "Profile 0x%x not supported for MVC", dprintk(VIDC_ERR, "Profile 0x%x not supported for MVC\n", ctrl->val); rc = -ENOTSUPP; break; Loading @@ -559,7 +560,7 @@ static int is_ctrl_valid_for_codec(struct msm_vidc_inst *inst, case V4L2_CID_MPEG_VIDEO_H264_LEVEL: if (inst->fmts[OUTPUT_PORT]->fourcc == V4L2_PIX_FMT_H264_MVC && ctrl->val >= V4L2_MPEG_VIDEO_H264_LEVEL_5_2) { dprintk(VIDC_ERR, "Level 0x%x not supported for MVC", dprintk(VIDC_ERR, "Level 0x%x not supported for MVC\n", ctrl->val); rc = -ENOTSUPP; break; Loading Loading @@ -727,7 +728,7 @@ int msm_vdec_prepare_buf(struct msm_vidc_inst *inst, struct hfi_device *hdev; if (!inst || !inst->core || !inst->core->device) { dprintk(VIDC_ERR, "%s invalid parameters", __func__); dprintk(VIDC_ERR, "%s invalid parameters\n", __func__); return -EINVAL; } hdev = inst->core->device; Loading Loading @@ -775,7 +776,7 @@ int msm_vdec_prepare_buf(struct msm_vidc_inst *inst, (void *)inst->session, &buffer_info); if (rc) dprintk(VIDC_ERR, "vidc_hal_session_set_buffers failed"); "vidc_hal_session_set_buffers failed\n"); break; default: dprintk(VIDC_ERR, "Buffer type not recognized: %d\n", b->type); Loading @@ -795,7 +796,7 @@ int msm_vdec_release_buf(struct msm_vidc_inst *inst, struct hfi_device *hdev; if (!inst || !inst->core || !inst->core->device) { dprintk(VIDC_ERR, "%s invalid parameters", __func__); dprintk(VIDC_ERR, "%s invalid parameters\n", __func__); return -EINVAL; } Loading Loading @@ -854,7 +855,7 @@ int msm_vdec_release_buf(struct msm_vidc_inst *inst, (void *)inst->session, &buffer_info); if (rc) dprintk(VIDC_ERR, "vidc_hal_session_release_buffers failed"); "vidc_hal_session_release_buffers failed\n"); break; default: dprintk(VIDC_ERR, "Buffer type not recognized: %d\n", b->type); Loading Loading @@ -1115,7 +1116,7 @@ int msm_vdec_s_fmt(struct msm_vidc_inst *inst, struct v4l2_format *f) int max_input_size = 0; if (!inst || !f) { dprintk(VIDC_ERR, "%s invalid parameters", __func__); dprintk(VIDC_ERR, "%s invalid parameters\n", __func__); return -EINVAL; } if (f->type == V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE) { Loading Loading @@ -1322,7 +1323,7 @@ static int msm_vdec_queue_setup(struct vb2_queue *q, inst = q->drv_priv; if (!inst || !inst->core || !inst->core->device) { dprintk(VIDC_ERR, "%s invalid parameters", __func__); dprintk(VIDC_ERR, "%s invalid parameters\n", __func__); return -EINVAL; } Loading Loading @@ -1480,7 +1481,7 @@ static inline int start_streaming(struct msm_vidc_inst *inst) HAL_VIDEO_DECODER_SECONDARY) rc = msm_vidc_check_scaling_supported(inst); if (rc) { dprintk(VIDC_ERR, "H/w scaling is not in valid range"); dprintk(VIDC_ERR, "H/w scaling is not in valid range\n"); return -EINVAL; } rc = msm_comm_set_scratch_buffers(inst); Loading Loading @@ -1565,7 +1566,7 @@ static int msm_vdec_start_streaming(struct vb2_queue *q, unsigned int count) } inst = q->drv_priv; if (!inst || !inst->core || !inst->core->device) { dprintk(VIDC_ERR, "%s invalid parameters", __func__); dprintk(VIDC_ERR, "%s invalid parameters\n", __func__); return -EINVAL; } hdev = inst->core->device; Loading Loading @@ -1639,7 +1640,7 @@ int msm_vdec_cmd(struct msm_vidc_inst *inst, struct v4l2_decoder_cmd *dec) struct msm_vidc_core *core = inst->core; if (!dec || !inst || !inst->core) { dprintk(VIDC_ERR, "%s invalid params", __func__); dprintk(VIDC_ERR, "%s invalid params\n", __func__); return -EINVAL; } switch (dec->cmd) { Loading Loading @@ -1738,7 +1739,7 @@ static inline enum buffer_mode_type get_buf_type(int val) case V4L2_MPEG_VIDC_VIDEO_DYNAMIC: return HAL_BUFFER_MODE_DYNAMIC; default: dprintk(VIDC_ERR, "%s: invalid buf type: %d", __func__, val); dprintk(VIDC_ERR, "%s: invalid buf type: %d\n", __func__, val); } return 0; } Loading Loading @@ -1770,7 +1771,7 @@ static int try_get_ctrl(struct msm_vidc_inst *inst, struct v4l2_ctrl *ctrl) union hal_get_property hprop; if (!inst || !inst->core || !inst->core->device) { dprintk(VIDC_ERR, "%s invalid parameters", __func__); dprintk(VIDC_ERR, "%s invalid parameters\n", __func__); return -EINVAL; } Loading Loading @@ -1836,7 +1837,7 @@ static int try_set_ctrl(struct msm_vidc_inst *inst, struct v4l2_ctrl *ctrl) struct hal_mvc_buffer_layout layout; if (!inst || !inst->core || !inst->core->device) { dprintk(VIDC_ERR, "%s invalid parameters", __func__); dprintk(VIDC_ERR, "%s invalid parameters\n", __func__); return -EINVAL; } hdev = inst->core->device; Loading Loading @@ -1919,7 +1920,7 @@ static int try_set_ctrl(struct msm_vidc_inst *inst, struct v4l2_ctrl *ctrl) inst->flags |= VIDC_TURBO; break; default: dprintk(VIDC_ERR, "Perf mode %x not supported", dprintk(VIDC_ERR, "Perf mode %x not supported\n", ctrl->val); rc = -ENOTSUPP; break; Loading Loading @@ -1968,7 +1969,7 @@ static int try_set_ctrl(struct msm_vidc_inst *inst, struct v4l2_ctrl *ctrl) case V4L2_CID_MPEG_VIDC_VIDEO_STREAM_OUTPUT_MODE: if (ctrl->val && !(inst->capability.pixelprocess_capabilities & HAL_VIDEO_DECODER_MULTI_STREAM_CAPABILITY)) { dprintk(VIDC_ERR, "Downscaling not supported: 0x%x", dprintk(VIDC_ERR, "Downscaling not supported: 0x%x\n", ctrl->id); rc = -ENOTSUPP; break; Loading Loading @@ -2069,7 +2070,7 @@ static int msm_vdec_op_s_ctrl(struct v4l2_ctrl *ctrl) struct msm_vidc_inst *inst = container_of(ctrl->handler, struct msm_vidc_inst, ctrl_handler); if (!inst) { dprintk(VIDC_ERR, "%s invalid parameters", __func__); dprintk(VIDC_ERR, "%s invalid parameters\n", __func__); return -EINVAL; } rc = msm_comm_try_state(inst, MSM_VIDC_OPEN_DONE); Loading @@ -2083,7 +2084,7 @@ static int msm_vdec_op_s_ctrl(struct v4l2_ctrl *ctrl) if (ctrl->cluster[c]->is_new) { rc = try_set_ctrl(inst, ctrl->cluster[c]); if (rc) { dprintk(VIDC_ERR, "Failed setting %x", dprintk(VIDC_ERR, "Failed setting %x\n", ctrl->cluster[c]->id); break; } Loading Loading @@ -2113,7 +2114,7 @@ static int msm_vdec_op_g_volatile_ctrl(struct v4l2_ctrl *ctrl) if (master->cluster[c]->id == ctrl->id) { rc = try_get_ctrl(inst, ctrl); if (rc) { dprintk(VIDC_ERR, "Failed getting %x", dprintk(VIDC_ERR, "Failed getting %x\n", ctrl->id); return rc; } Loading Loading @@ -2256,7 +2257,8 @@ int msm_vdec_ctrl_init(struct msm_vidc_inst *inst) cluster = get_cluster(idx, &cluster_size); if (!cluster || !cluster_size) { dprintk(VIDC_WARN, "Failed to setup cluster of type %d", dprintk(VIDC_WARN, "Failed to setup cluster of type %d\n", idx); continue; } Loading
drivers/media/platform/msm/vidc/msm_venc.c +27 −24 File changed.Preview size limit exceeded, changes collapsed. Show changes