我是靠谱客的博主 激动水壶,最近开发中收集的这篇文章主要介绍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

 

最后

以上就是激动水壶为你收集整理的camera ISP问题梳理的全部内容,希望文章能够帮你解决camera ISP问题梳理所遇到的程序开发问题。

如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(64)

评论列表共有 0 条评论

立即
投稿
返回
顶部