فهرست منبع

video: driver: force flush debug queue packets in error scenario

During power_collapse & core_deinit sequence, always flush debug
queue irrespective of firmware logmask, to get more info about
failure.

Change-Id: I4ef328d27a77eb0807df6dc33fe0b2b92bf1feda
Signed-off-by: Govindaraj Rajagopal <[email protected]>
Govindaraj Rajagopal 4 سال پیش
والد
کامیت
55795168af
3فایلهای تغییر یافته به همراه5 افزوده شده و 5 حذف شده
  1. 1 1
      driver/vidc/inc/venus_hfi.h
  2. 1 1
      driver/vidc/src/msm_vidc_driver.c
  3. 3 3
      driver/vidc/src/venus_hfi.c

+ 1 - 1
driver/vidc/inc/venus_hfi.h

@@ -50,7 +50,7 @@ int venus_hfi_session_open(struct msm_vidc_inst *inst);
 int venus_hfi_session_set_codec(struct msm_vidc_inst *inst);
 int venus_hfi_session_set_codec(struct msm_vidc_inst *inst);
 int venus_hfi_session_set_secure_mode(struct msm_vidc_inst *inst);
 int venus_hfi_session_set_secure_mode(struct msm_vidc_inst *inst);
 int venus_hfi_core_init(struct msm_vidc_core *core);
 int venus_hfi_core_init(struct msm_vidc_core *core);
-int venus_hfi_core_deinit(struct msm_vidc_core *core);
+int venus_hfi_core_deinit(struct msm_vidc_core *core, bool force);
 int venus_hfi_noc_error_info(struct msm_vidc_core *core);
 int venus_hfi_noc_error_info(struct msm_vidc_core *core);
 int venus_hfi_suspend(struct msm_vidc_core *core);
 int venus_hfi_suspend(struct msm_vidc_core *core);
 int venus_hfi_trigger_ssr(struct msm_vidc_core *core, u32 type,
 int venus_hfi_trigger_ssr(struct msm_vidc_core *core, u32 type,

+ 1 - 1
driver/vidc/src/msm_vidc_driver.c

@@ -3999,7 +3999,7 @@ int msm_vidc_core_deinit_locked(struct msm_vidc_core *core, bool force)
 		}
 		}
 	}
 	}
 
 
-	venus_hfi_core_deinit(core);
+	venus_hfi_core_deinit(core, force);
 
 
 	/* unlink all sessions from core, if any */
 	/* unlink all sessions from core, if any */
 	list_for_each_entry_safe(inst, dummy, &core->instances, list) {
 	list_for_each_entry_safe(inst, dummy, &core->instances, list) {

+ 3 - 3
driver/vidc/src/venus_hfi.c

@@ -1212,7 +1212,7 @@ static int __power_collapse(struct msm_vidc_core *core, bool force)
 		return -EINVAL;
 		return -EINVAL;
 	}
 	}
 
 
-	__flush_debug_queue(core, core->packet, core->packet_size);
+	__flush_debug_queue(core, (!force ? core->packet : NULL), core->packet_size);
 
 
 	rc = call_venus_op(core, prepare_pc, core);
 	rc = call_venus_op(core, prepare_pc, core);
 	if (rc)
 	if (rc)
@@ -2859,7 +2859,7 @@ error:
 	return rc;
 	return rc;
 }
 }
 
 
-int venus_hfi_core_deinit(struct msm_vidc_core *core)
+int venus_hfi_core_deinit(struct msm_vidc_core *core, bool force)
 {
 {
 	int rc = 0;
 	int rc = 0;
 
 
@@ -2875,7 +2875,7 @@ int venus_hfi_core_deinit(struct msm_vidc_core *core)
 	if (core->state == MSM_VIDC_CORE_DEINIT)
 	if (core->state == MSM_VIDC_CORE_DEINIT)
 		return 0;
 		return 0;
 	__resume(core);
 	__resume(core);
-	__flush_debug_queue(core, core->packet, core->packet_size);
+	__flush_debug_queue(core, (!force ? core->packet : NULL), core->packet_size);
 	__disable_subcaches(core);
 	__disable_subcaches(core);
 	__unload_fw(core);
 	__unload_fw(core);
 	/**
 	/**