Loading drivers/media/platform/msm/vidc/msm_vidc.c +12 −1 Original line number Diff line number Diff line Loading @@ -1684,6 +1684,7 @@ EXPORT_SYMBOL(msm_vidc_open); static void msm_vidc_cleanup_instance(struct msm_vidc_inst *inst) { struct msm_vidc_buffer *temp, *dummy; struct getprop_buf *temp_prop, *dummy_prop; if (!inst) { dprintk(VIDC_ERR, "%s: invalid params\n", __func__); Loading Loading @@ -1732,7 +1733,17 @@ static void msm_vidc_cleanup_instance(struct msm_vidc_inst *inst) msm_comm_smem_free(inst, inst->extradata_handle); mutex_lock(&inst->pending_getpropq.lock); WARN_ON(!list_empty(&inst->pending_getpropq.list)); if (!list_empty(&inst->pending_getpropq.list)) { dprintk(VIDC_ERR, "pending_getpropq not empty for instance %pK\n", inst); list_for_each_entry_safe(temp_prop, dummy_prop, &inst->pending_getpropq.list, list) { kfree(temp_prop->data); list_del(&temp_prop->list); kfree(temp_prop); } } mutex_unlock(&inst->pending_getpropq.lock); } Loading drivers/media/platform/msm/vidc/msm_vidc_common.c +0 −5 Original line number Diff line number Diff line Loading @@ -70,11 +70,6 @@ const char *const mpeg_video_vidc_extradata[] = { "Extradata UBWC CR stats info", }; struct getprop_buf { struct list_head list; void *data; }; static void msm_comm_generate_session_error(struct msm_vidc_inst *inst); static void msm_comm_generate_sys_error(struct msm_vidc_inst *inst); static void handle_session_error(enum hal_command_response cmd, void *data); Loading drivers/media/platform/msm/vidc/msm_vidc_common.h +5 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,11 @@ struct vb2_buf_entry { struct vb2_buffer *vb; }; struct getprop_buf { struct list_head list; void *data; }; extern const char *const mpeg_video_vidc_extradata[]; enum load_calc_quirks { Loading drivers/media/platform/msm/vidc/msm_vidc_debug.h +10 −5 Original line number Diff line number Diff line Loading @@ -179,11 +179,17 @@ static inline void show_stats(struct msm_vidc_inst *i) } } static inline void msm_vidc_handle_hw_error(struct msm_vidc_core *core) static inline void msm_vidc_res_handle_fatal_hw_error( struct msm_vidc_platform_resources *resources, bool enable_fatal) { bool enable_fatal; enable_fatal &= resources->debug_timeout; MSM_VIDC_ERROR(enable_fatal); } enable_fatal = core->resources.debug_timeout; static inline void msm_vidc_handle_hw_error(struct msm_vidc_core *core) { bool enable_fatal = true; /* * In current implementation user-initiated SSR triggers Loading @@ -200,8 +206,7 @@ static inline void msm_vidc_handle_hw_error(struct msm_vidc_core *core) * based on multiple factors. This condition check will * be enhanced later. */ MSM_VIDC_ERROR(enable_fatal); msm_vidc_res_handle_fatal_hw_error(&core->resources, enable_fatal); } #endif drivers/media/platform/msm/vidc/venus_hfi.c +19 −12 Original line number Diff line number Diff line Loading @@ -110,7 +110,8 @@ static int venus_hfi_noc_error_info(void *dev); */ static inline void __strict_check(struct venus_hfi_device *device) { WARN_ON(!mutex_is_locked(&device->lock)); msm_vidc_res_handle_fatal_hw_error(device->res, !mutex_is_locked(&device->lock)); } static inline void __set_state(struct venus_hfi_device *device, Loading Loading @@ -238,7 +239,8 @@ static void __sim_modify_cmd_packet(u8 *packet, struct venus_hfi_device *device) } } static int __acquire_regulator(struct regulator_info *rinfo) static int __acquire_regulator(struct regulator_info *rinfo, struct venus_hfi_device *device) { int rc = 0; Loading Loading @@ -266,7 +268,7 @@ static int __acquire_regulator(struct regulator_info *rinfo) if (!regulator_is_enabled(rinfo->regulator)) { dprintk(VIDC_WARN, "Regulator is not enabled %s\n", rinfo->name); WARN_ON(1); msm_vidc_res_handle_fatal_hw_error(device->res, true); } return rc; Loading Loading @@ -312,7 +314,7 @@ static int __hand_off_regulators(struct venus_hfi_device *device) return rc; err_reg_handoff_failed: venus_hfi_for_each_regulator_reverse_continue(device, rinfo, c) __acquire_regulator(rinfo); __acquire_regulator(rinfo, device); return rc; } Loading Loading @@ -624,7 +626,7 @@ static void __write_register(struct venus_hfi_device *device, if (!device->power_enabled) { dprintk(VIDC_WARN, "HFI Write register failed : Power is OFF\n"); WARN_ON(1); msm_vidc_res_handle_fatal_hw_error(device->res, true); return; } Loading Loading @@ -655,7 +657,7 @@ static int __read_register(struct venus_hfi_device *device, u32 reg) if (!device->power_enabled) { dprintk(VIDC_WARN, "HFI Read register failed : Power is OFF\n"); WARN_ON(1); msm_vidc_res_handle_fatal_hw_error(device->res, true); return -EINVAL; } Loading Loading @@ -3065,7 +3067,11 @@ static int __response_handler(struct venus_hfi_device *device) if (session_id) { struct hal_session *session = NULL; WARN_ON(upper_32_bits((uintptr_t)*session_id) != 0); if (upper_32_bits((uintptr_t)*session_id) != 0) { dprintk(VIDC_ERR, "Upper 32-bits != 0 for sess_id=%pK\n", *session_id); } session = __get_session(device, (u32)(uintptr_t)*session_id); if (!session) { Loading Loading @@ -3668,7 +3674,8 @@ static int __protect_cp_mem(struct venus_hfi_device *device) return rc; } static int __disable_regulator(struct regulator_info *rinfo) static int __disable_regulator(struct regulator_info *rinfo, struct venus_hfi_device *device) { int rc = 0; Loading @@ -3680,7 +3687,7 @@ static int __disable_regulator(struct regulator_info *rinfo) * is unknown. */ rc = __acquire_regulator(rinfo); rc = __acquire_regulator(rinfo, device); if (rc) { /* * This is somewhat fatal, but nothing we can do Loading @@ -3706,7 +3713,7 @@ static int __disable_regulator(struct regulator_info *rinfo) disable_regulator_failed: /* Bring attention to this issue */ WARN_ON(1); msm_vidc_res_handle_fatal_hw_error(device->res, true); return rc; } Loading Loading @@ -3752,7 +3759,7 @@ static int __enable_regulators(struct venus_hfi_device *device) err_reg_enable_failed: venus_hfi_for_each_regulator_reverse_continue(device, rinfo, c) __disable_regulator(rinfo); __disable_regulator(rinfo, device); return rc; } Loading @@ -3765,7 +3772,7 @@ static int __disable_regulators(struct venus_hfi_device *device) dprintk(VIDC_DBG, "Disabling regulators\n"); venus_hfi_for_each_regulator_reverse(device, rinfo) __disable_regulator(rinfo); __disable_regulator(rinfo, device); return rc; } Loading Loading
drivers/media/platform/msm/vidc/msm_vidc.c +12 −1 Original line number Diff line number Diff line Loading @@ -1684,6 +1684,7 @@ EXPORT_SYMBOL(msm_vidc_open); static void msm_vidc_cleanup_instance(struct msm_vidc_inst *inst) { struct msm_vidc_buffer *temp, *dummy; struct getprop_buf *temp_prop, *dummy_prop; if (!inst) { dprintk(VIDC_ERR, "%s: invalid params\n", __func__); Loading Loading @@ -1732,7 +1733,17 @@ static void msm_vidc_cleanup_instance(struct msm_vidc_inst *inst) msm_comm_smem_free(inst, inst->extradata_handle); mutex_lock(&inst->pending_getpropq.lock); WARN_ON(!list_empty(&inst->pending_getpropq.list)); if (!list_empty(&inst->pending_getpropq.list)) { dprintk(VIDC_ERR, "pending_getpropq not empty for instance %pK\n", inst); list_for_each_entry_safe(temp_prop, dummy_prop, &inst->pending_getpropq.list, list) { kfree(temp_prop->data); list_del(&temp_prop->list); kfree(temp_prop); } } mutex_unlock(&inst->pending_getpropq.lock); } Loading
drivers/media/platform/msm/vidc/msm_vidc_common.c +0 −5 Original line number Diff line number Diff line Loading @@ -70,11 +70,6 @@ const char *const mpeg_video_vidc_extradata[] = { "Extradata UBWC CR stats info", }; struct getprop_buf { struct list_head list; void *data; }; static void msm_comm_generate_session_error(struct msm_vidc_inst *inst); static void msm_comm_generate_sys_error(struct msm_vidc_inst *inst); static void handle_session_error(enum hal_command_response cmd, void *data); Loading
drivers/media/platform/msm/vidc/msm_vidc_common.h +5 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,11 @@ struct vb2_buf_entry { struct vb2_buffer *vb; }; struct getprop_buf { struct list_head list; void *data; }; extern const char *const mpeg_video_vidc_extradata[]; enum load_calc_quirks { Loading
drivers/media/platform/msm/vidc/msm_vidc_debug.h +10 −5 Original line number Diff line number Diff line Loading @@ -179,11 +179,17 @@ static inline void show_stats(struct msm_vidc_inst *i) } } static inline void msm_vidc_handle_hw_error(struct msm_vidc_core *core) static inline void msm_vidc_res_handle_fatal_hw_error( struct msm_vidc_platform_resources *resources, bool enable_fatal) { bool enable_fatal; enable_fatal &= resources->debug_timeout; MSM_VIDC_ERROR(enable_fatal); } enable_fatal = core->resources.debug_timeout; static inline void msm_vidc_handle_hw_error(struct msm_vidc_core *core) { bool enable_fatal = true; /* * In current implementation user-initiated SSR triggers Loading @@ -200,8 +206,7 @@ static inline void msm_vidc_handle_hw_error(struct msm_vidc_core *core) * based on multiple factors. This condition check will * be enhanced later. */ MSM_VIDC_ERROR(enable_fatal); msm_vidc_res_handle_fatal_hw_error(&core->resources, enable_fatal); } #endif
drivers/media/platform/msm/vidc/venus_hfi.c +19 −12 Original line number Diff line number Diff line Loading @@ -110,7 +110,8 @@ static int venus_hfi_noc_error_info(void *dev); */ static inline void __strict_check(struct venus_hfi_device *device) { WARN_ON(!mutex_is_locked(&device->lock)); msm_vidc_res_handle_fatal_hw_error(device->res, !mutex_is_locked(&device->lock)); } static inline void __set_state(struct venus_hfi_device *device, Loading Loading @@ -238,7 +239,8 @@ static void __sim_modify_cmd_packet(u8 *packet, struct venus_hfi_device *device) } } static int __acquire_regulator(struct regulator_info *rinfo) static int __acquire_regulator(struct regulator_info *rinfo, struct venus_hfi_device *device) { int rc = 0; Loading Loading @@ -266,7 +268,7 @@ static int __acquire_regulator(struct regulator_info *rinfo) if (!regulator_is_enabled(rinfo->regulator)) { dprintk(VIDC_WARN, "Regulator is not enabled %s\n", rinfo->name); WARN_ON(1); msm_vidc_res_handle_fatal_hw_error(device->res, true); } return rc; Loading Loading @@ -312,7 +314,7 @@ static int __hand_off_regulators(struct venus_hfi_device *device) return rc; err_reg_handoff_failed: venus_hfi_for_each_regulator_reverse_continue(device, rinfo, c) __acquire_regulator(rinfo); __acquire_regulator(rinfo, device); return rc; } Loading Loading @@ -624,7 +626,7 @@ static void __write_register(struct venus_hfi_device *device, if (!device->power_enabled) { dprintk(VIDC_WARN, "HFI Write register failed : Power is OFF\n"); WARN_ON(1); msm_vidc_res_handle_fatal_hw_error(device->res, true); return; } Loading Loading @@ -655,7 +657,7 @@ static int __read_register(struct venus_hfi_device *device, u32 reg) if (!device->power_enabled) { dprintk(VIDC_WARN, "HFI Read register failed : Power is OFF\n"); WARN_ON(1); msm_vidc_res_handle_fatal_hw_error(device->res, true); return -EINVAL; } Loading Loading @@ -3065,7 +3067,11 @@ static int __response_handler(struct venus_hfi_device *device) if (session_id) { struct hal_session *session = NULL; WARN_ON(upper_32_bits((uintptr_t)*session_id) != 0); if (upper_32_bits((uintptr_t)*session_id) != 0) { dprintk(VIDC_ERR, "Upper 32-bits != 0 for sess_id=%pK\n", *session_id); } session = __get_session(device, (u32)(uintptr_t)*session_id); if (!session) { Loading Loading @@ -3668,7 +3674,8 @@ static int __protect_cp_mem(struct venus_hfi_device *device) return rc; } static int __disable_regulator(struct regulator_info *rinfo) static int __disable_regulator(struct regulator_info *rinfo, struct venus_hfi_device *device) { int rc = 0; Loading @@ -3680,7 +3687,7 @@ static int __disable_regulator(struct regulator_info *rinfo) * is unknown. */ rc = __acquire_regulator(rinfo); rc = __acquire_regulator(rinfo, device); if (rc) { /* * This is somewhat fatal, but nothing we can do Loading @@ -3706,7 +3713,7 @@ static int __disable_regulator(struct regulator_info *rinfo) disable_regulator_failed: /* Bring attention to this issue */ WARN_ON(1); msm_vidc_res_handle_fatal_hw_error(device->res, true); return rc; } Loading Loading @@ -3752,7 +3759,7 @@ static int __enable_regulators(struct venus_hfi_device *device) err_reg_enable_failed: venus_hfi_for_each_regulator_reverse_continue(device, rinfo, c) __disable_regulator(rinfo); __disable_regulator(rinfo, device); return rc; } Loading @@ -3765,7 +3772,7 @@ static int __disable_regulators(struct venus_hfi_device *device) dprintk(VIDC_DBG, "Disabling regulators\n"); venus_hfi_for_each_regulator_reverse(device, rinfo) __disable_regulator(rinfo); __disable_regulator(rinfo, device); return rc; } Loading