diff --git a/driver/vidc/inc/venus_hfi_response.h b/driver/vidc/inc/venus_hfi_response.h index bd87e513d3..f699022dfb 100644 --- a/driver/vidc/inc/venus_hfi_response.h +++ b/driver/vidc/inc/venus_hfi_response.h @@ -6,6 +6,8 @@ #ifndef __VENUS_HFI_RESPONSE_H__ #define __VENUS_HFI_RESPONSE_H__ +#include "hfi_packet.h" + int handle_response(struct msm_vidc_core *core, void *response); int validate_packet(u8 *response_pkt, u8 *core_resp_pkt, @@ -17,5 +19,7 @@ bool is_valid_hfi_buffer_type(struct msm_vidc_inst *inst, void handle_session_response_work_handler(struct work_struct *work); int handle_session_response_work(struct msm_vidc_inst *inst, struct response_work *work); +int handle_system_error(struct msm_vidc_core *core, + struct hfi_packet *pkt); #endif // __VENUS_HFI_RESPONSE_H__ diff --git a/driver/vidc/src/msm_vdec.c b/driver/vidc/src/msm_vdec.c index 07bb5ce85e..95cb2fd42a 100644 --- a/driver/vidc/src/msm_vdec.c +++ b/driver/vidc/src/msm_vdec.c @@ -954,18 +954,6 @@ static int msm_vdec_release_input_internal_buffers(struct msm_vidc_inst *inst) return 0; } -static int msm_vdec_release_output_internal_buffers(struct msm_vidc_inst *inst) -{ - int rc = 0; - - i_vpr_h(inst, "%s()\n",__func__); - rc = msm_vidc_release_internal_buffers(inst, MSM_VIDC_BUF_DPB); - if (rc) - return rc; - - return 0; -} - static int msm_vdec_subscribe_input_port_settings_change(struct msm_vidc_inst *inst, enum msm_vidc_port_type port) { @@ -1735,10 +1723,6 @@ int msm_vdec_streamon_output(struct msm_vidc_inst *inst) if (rc) goto error; - rc = msm_vdec_release_output_internal_buffers(inst); - if (rc) - goto error; - rc = msm_vdec_create_output_internal_buffers(inst); if (rc) goto error; diff --git a/driver/vidc/src/venus_hfi.c b/driver/vidc/src/venus_hfi.c index ec8378a7ee..d8cbf09238 100644 --- a/driver/vidc/src/venus_hfi.c +++ b/driver/vidc/src/venus_hfi.c @@ -2522,6 +2522,9 @@ static int __response_handler(struct msm_vidc_core *core) { int rc = 0; + if (call_venus_op(core, watchdog, core, core->intr_status)) + return handle_system_error(core, NULL); + memset(core->response_packet, 0, core->packet_size); while (!__iface_msgq_read(core, core->response_packet)) { rc = handle_response(core, core->response_packet); diff --git a/driver/vidc/src/venus_hfi_response.c b/driver/vidc/src/venus_hfi_response.c index f1b4a89008..8cbc836b5c 100644 --- a/driver/vidc/src/venus_hfi_response.c +++ b/driver/vidc/src/venus_hfi_response.c @@ -310,7 +310,7 @@ static int handle_session_error(struct msm_vidc_inst *inst, return rc; } -static int handle_system_error(struct msm_vidc_core *core, +int handle_system_error(struct msm_vidc_core *core, struct hfi_packet *pkt) { d_vpr_e("%s: system error received\n", __func__);