camera ISP问题梳理

error  log:

 E/mm-camera(  809): <ISP   ><ERROR> 331: isp_stats_buf_mgr_get_buf: failed: could not find stats instance
 E/mm-camera(  809): <ISP   ><ERROR> 416: isp_parser_thread_process: failed: get buf failed
 I/mm-camera(  809): <MCT   >< INFO> 1021: mct_controller_handle_SOF_proc: (sofdelay, curr_sofdelay) = (0, 0) kptr 427
 E/mm-camera(  809): <ISP   ><ERROR> 710: isp_parser_thread_func: failed: isp_parser_process
 E/mm-camera(  809): <ISP   ><ERROR> 331: isp_stats_buf_mgr_get_buf: failed: could not find stats instance
 E/mm-camera(  809): <ISP   ><ERROR> 416: isp_parser_thread_process: failed: get buf failed

 E/mm-camera(  809): <ISP   ><ERROR> 710: isp_parser_thread_func: failed: isp_parser_process

 修改方案:

vendor/qcom/proprietary/mm-camera/mm-camera2/media-controller/modules/isp2/common/isp_defs.h

#define MAX_STATS_BUFFERS 定义值改大。尝试继续复现

 

_______________________________________________________________________________

kernel error log:

[ 539.998481] msm_ispif_reset_hw: VFE0 reset wait timeout
[ 540.498414] msm_ispif_reset_hw: VFE0 reset wait timeout
[ 540.498860] msm_ispif_read_irq_status: VFE1 pix0 overflow.
[ 540.498874] msm_ispif_read_irq_status: VFE1 rdi0 overflow.
[ 540.498885] msm_ispif_read_irq_status: VFE1 rdi1 overflow.

修改方案:

kernel/msm-3.18/drivers/media/platform/msm/camera_v2/ispif/msm_ispif.c

修改:ispif->reset_complete[VFE0], msecs_to_jiffies(500)

ispif->reset_complete[VFE1], msecs_to_jiffies(500) 等待时间修改

______________________________________________________________________________

error log:

07-28 18:02:11.463 I/mm-camera( 2618): <MCT   >< INFO> 177: stop_sof_check_thread: Stopping SOF timeout thread session =3
07-28 18:02:11.464 I/mm-camera( 2618): <MCT   >< INFO> 3854: mct_pipeline_process_set:  STREAM-OFF success for stream 0x30002, stream type=8
07-28 18:02:11.465 E/mm-camera( 2618): <MCT   ><ERROR> 3104: mct_offline_metadata_ctrl_event: Ret=1 Unsupported cmd 15
I/mm-camera( 2618): <MCT   >< INFO> 3701: mct_pipeline_process_set: command=8000009
I/mm-camera( 2618): <MCT   >< INFO> 3839: mct_pipeline_process_set:  STREAM-OFF on stream 0x30001 stream type=7
I/mm-camera( 2618): <MCT   >< INFO> 3854: mct_pipeline_process_set:  STREAM-OFF success for stream 0x30001, stream type=7
I/QCamera (  530): <HAL><INFO> doReprocessOffline: 1413: Offline reprocessing id = 3 buf Id = 1 meta index = 0 type = 7
I/mm-camera( 2618): <MCT   >< INFO> 3701: mct_pipeline_process_set: command=8000019
E/mm-camera( 2618): <MCT   ><ERROR> 2837: mct_stream_process_offline_message: Failed to get offline metadata buf - errno: Bad file descriptor!!!
I/QCamera (  530): <HAL><INFO> doReprocessOffline: 1413: Offline reprocessing id = 3 buf Id = 3 meta index = 2 type = 8
I/mm-camera( 2618): <MCT   >< INFO> 3701: mct_pipeline_process_set: command=8000019
I/mm-camera( 2618): <PPROC >< INFO> 2440: pproc_module_handle_reprocess_offline: input buf fd 75 type 5 size 31850496 identity 30006, frame_id 3
E/mm-camera( 2618): <ISP   ><ERROR> 1403: isp_resource_iface_request_offline_isp: failed: Offline dual isp not implemented!
E/mm-camera( 2618): <ISP   ><ERROR> 2298: isp_handler_module_iface_request_offline_output_resource: failed: isp_resource_iface_request_offline_output_resource
E/mm-camera( 2618): <ISP   ><ERROR> 275: isp_port_process_downstream_module_event: failed: isp_handler_control_streamoff
E/mm-camera( 2618): <ISP   ><ERROR> 395: isp_port_process_downstream_event: failed: isp_port_process_downstream_module_event
E/mm-camera( 2618): <ISP   ><ERROR> 523: isp_port_event: failed: isp_port_process_downstream_event
E/mm-camera( 2618): <IFACE ><ERROR> 1495: iface_util_request_isp_output_resource: iface_util_request_isp_output_resource: error in isp sink port event
E/mm-camera( 2618): <IFACE ><ERROR> 3908: iface_util_set_hw_stream_config_pix_offline: iface_util_set_hw_stream_config_pix_offline: iface_util_request_isp_output_resource failed, rc = -1
E/mm-camera( 2618): <IFACE ><ERROR> 7045: iface_offline_stream_config: iface_offline_stream_config: failed: set_hw_stream_config_pix_offline 6 rc=-1
I/mm-camera( 2618): <MCT   >< INFO> 3701: mct_pipeline_process_set: command=800000b
I/mm-camera( 2618): <MCT   >< INFO> 3919: mct_pipeline_process_set: Issuing DEL_STREAM on stream 0x30001 and stream type=7
I/mm-camera( 2618): <MCT   >< INFO> 3930: mct_pipeline_process_set: Stream 0x30001 and stream type=7, successfully deleted
I/mm-camera( 2618): <MCT   >< INFO> 3701: mct_pipeline_process_set: command=800000b
I/mm-camera( 2618): <MCT   >< INFO> 3919: mct_pipeline_process_set: Issuing DEL_STREAM on stream 0x30002 and stream type=8
I/mm-camera( 2618): <IFACE >< INFO> 677: iface_unreserve_sink_port: stream_id 2 mode 1 
I/mm-camera( 2618): <ISP   >< INFO> 890: isp_port_check_caps_unreserve: ide 30002 port 0xe8067000
I/mm-camera( 2618): <MCT   >< INFO> 3930: mct_pipeline_process_set: Stream 0x30002 and stream type=8, successfully deleted
E/mm-camera( 2618): <MCT   ><ERROR> 1100: mct_pipeline_decide_hw_wakeup: Couldn't find meta stream

原因是拍照的过程中ISP一直没有数据返回,后续close camera时出现crash

解决patch:

diff --git a/mm-camera2/media-controller/mct/stream/mct_stream.c b/mm-camera2/media-controller/mct/stream/mct_stream.c
index 6335b57..0fa8e65 100755
--- a/mm-camera2/media-controller/mct/stream/mct_stream.c
+++ b/mm-camera2/media-controller/mct/stream/mct_stream.c
@@ -2771,8 +2771,6 @@ boolean mct_stream_metadata_ctrl_event(mct_stream_t *stream,
case MCT_EVENT_CONTROL_STREAMON: {
ret = mct_stream_find_bfr_mngr_subdev(
&stream->metadata_stream.buf_mgr_dev_fd);
- pipeline->offline_meta.buf_mgr_fd =
- stream->metadata_stream.buf_mgr_dev_fd;
if (ret == FALSE) {
CLOGE(CAM_MCT_MODULE, "failed to find buffer manager subdev");
break;
@@ -2805,6 +2803,7 @@ boolean mct_stream_metadata_ctrl_event(mct_stream_t *stream,
}
stream->state = MCT_ST_STATE_IDLE;
close(stream->metadata_stream.buf_mgr_dev_fd);
+ stream->metadata_stream.buf_mgr_dev_fd = -1;

mct_bus_t *bus = pipeline->bus;
if (!bus)
@@ -3136,6 +3135,12 @@ static boolean mct_offline_metadata_ctrl_event(mct_stream_t *stream,
case MCT_EVENT_CONTROL_STREAMON: {
/* Spawn new thread for offline metadata collection */
if (pipeline->offline_meta.stream_on_cnt == 0) {
+ ret = mct_stream_find_bfr_mngr_subdev(
+ &pipeline->offline_meta.buf_mgr_fd);
+ if (ret == FALSE) {
+ CLOGE(CAM_MCT_MODULE, "failed to find buffer manager subdev");
+ break;
+ }
ret = mct_spawn_thread(mct_offline_metadata_thread, pipeline,
"CAM_MctOffMeta", PTHREAD_CREATE_DETACHED);
}
@@ -3166,12 +3171,16 @@ static boolean mct_offline_metadata_ctrl_event(mct_stream_t *stream,
CLOGE(CAM_MCT_MODULE, "offline_meta_queue is null");
}
pthread_mutex_unlock(&pipeline->offline_meta.offline_meta_queue_lock);
+ if (pipeline->offline_meta.buf_mgr_fd >= 0) {
+ close(pipeline->offline_meta.buf_mgr_fd);
+ pipeline->offline_meta.buf_mgr_fd = -1;
+ }

/* Signal Offline meta thread */
pthread_mutex_lock(&pipeline->offline_meta.offline_meta_mutex);
pthread_cond_signal(&pipeline->offline_meta.offline_meta_cond);
pthread_mutex_unlock(&pipeline->offline_meta.offline_meta_mutex);
- }
+ }
pipeline->offline_meta.stream_on_cnt--;
}
break

 

  • 2
    点赞
  • 9
    收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
©️2022 CSDN 皮肤主题:大白 设计师:CSDN官方博客 返回首页
评论

打赏作者

wing12345678910

你的鼓励将是我创作的最大动力

¥2 ¥4 ¥6 ¥10 ¥20
输入1-500的整数
余额支付 (余额:-- )
扫码支付
扫码支付:¥2
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、C币套餐、付费专栏及课程。

余额充值