导航

    全志在线开发者论坛

    • 注册
    • 登录
    • 搜索
    • 版块
    • 话题
    • 在线文档
    • 社区主页

    求高人指点! ISP通路测试 sample_vin_isp_test 报错

    V Series
    5
    26
    9464
    正在加载更多帖子
    • 从旧到新
    • 从新到旧
    • 最多赞同
    回复
    • 在新帖中回复
    登录后回复
    此主题已被删除。只有拥有主题管理权限的用户可以查看。
    • X
      xjy_5 LV 6 最后由 xjy_5 编辑

      我在移植RK628D屏幕采集模块到v853上,是CSI 4land接口,开机后电脑已经识别到第二个显示器了
      447eb93b-713f-4b4f-9653-21a78e931796-image.png
      不过信号采集一直有问题,isp一直是config error,我并不清除它究竟是在哪config的
      驱动程序里的参数配置如下,IIC是移植RK628驱动原有的regmap操作的,没用到原本的iic操作函数

      /*
       * Store information about the video data format.
       */
      static struct sensor_format_struct sensor_formats[] = {
      	{
      		.desc      = "UYVY 4:2:2",
      		.mbus_code = MEDIA_BUS_FMT_UYVY8_2X8,
      		.regs      = NULL,
      		.regs_size = 0,
      		.bpp       = 2
      	},
      };
      static struct sensor_win_size sensor_win_sizes[] = {
      	{
      		.width      = 1920,
      		.height     = 1080,
      		.hoffset    = 0,
      		.voffset    = 0,
      		.hts        = 2200,
      		.vts        = 1125,
      		.pclk       = 148500*1000,
      		.mipi_bps   = 750 * 1000 * 1000,
      		.fps_fixed  = 60,
      		.bin_factor = 1,
      		.intg_min   = 1 << 4,
      		.intg_max   = 1125 << 4,
      		.gain_min   = 1 << 4,
      		.gain_max   = 110 << 4,
      		.regs       = NULL,
      		.regs_size  = 0,
      		.set_size   = NULL,
      	},
      };
      static int rk628_csi_g_mbus_config(struct v4l2_subdev *sd,
      			     struct v4l2_mbus_config *cfg)
      {
      	struct rk628_csi *csi = to_csi(sd);
      	cfg->type = V4L2_MBUS_CSI2;
      	cfg->flags = 0 | V4L2_MBUS_CSI2_CONTINUOUS_CLOCK | V4L2_MBUS_CSI2_CHANNEL_0 | V4L2_MBUS_CSI2_4_LANE;
      	return 0;
      }
      
      
      [ISP]open isp device[0[  800.284516] [gc2053_mipi]sensor_ioctl lin:4744 cmd:0xc03c56fc
      ] success!
      [ISP_WARN]open /mnt/extsd/isp0_1920_1080_60_ctx_saved.bin failed, err:No such file or directory.
      [ISP]prefer isp config: [gc2053_mipi], 1920x1080, 60, 0, 0
      [ISP_WARN]cannot find gc2053_mipi_1920_1080_60_0_0 isp config, use gc2053_mipi_1920_1088_20_0_0 -> [gc2053_mipi_isp600_20220511_164617_vlc4_day]
      [ISP]create isp0 server thread!
      isp0 server wait to exit!!!
      current vi channel[  800.326460] [gc2053_mipi]enable wsize
       is = 0
      [  800.331379] [gc2053_mipi]info->width:1920 height:1080
      [  800.337865] [gc2053_mipi]enable_stream: enable
      [  800.342893] [gc2053_mipi]rk628_hdmirx_vid_enable: enable
      [  800.353193] [gc2053_mipi]src 1920x1080 clock:148500000
      [  800.359079] [gc2053_mipi]dst 1920x1080 clock:148500000
      [  800.371658] [gc2053_mipi]dsp_frame_vst=5, dsp_frame_hst=0
      [  800.377707] [gc2053_mipi]horizontal no scale
      [  800.382572] [gc2053_mipi]vertical no scale
      [  800.390748] [gc2053_mipi]rk628_csi_set_csi: txphy already power on, power off
      [  800.399554] [gc2053_mipi]mipi_dphy_power_on mipi bitrate:750 mbps
      [  800.471475] [gc2053_mipi]rk628_csi_set_csi: txphy power on!
      [  800.483222] [gc2053_mipi]rk628_csi_set_csi csi cofig done
      [  800.490117] [gc2053_mipi]rk628_is_avi_ready PDEC_AVI_PB:0x1084a80c, avi_rcv_rdy:1
      [  800.539469] [gc2053_mipi]rk628_is_avi_ready PDEC_AVI_PB:0x1084a80c, avi_rcv_rdy:1
      [  800.589452] [gc2053_mipi]rk628_is_avi_ready PDEC_AVI_PB:0x1084a80c, avi_rcv_rdy:1
      [  800.668255] [VIN_ERR]isp0 configuration error
      [  800.673140] [VIN_ERR]isp0 width error
      [  800.677241] [VIN]__sunxi_isp_reset:isp0 reset!!!,ISP frame number is 0
      [  800.684555] [VIN_ERR]isp0 internal fifo full
      [  800.689335] [VIN_ERR]isp0 the write full flag of LCA_BYR_FIFO
      [  800.695770] [VIN_ERR]isp0 the read empty flag of LCA_BYR_FIFO
      [  800.702205] [VIN_ERR]isp0 the write full flag of LCA_RGB0_FIFO
      [  800.708738] [VIN_ERR]isp0 the read empty flag of LCA_RGB0_FIFO
      [  800.715271] [VIN_ERR]isp0 the write full flag of DMSC_AVG_FIFO
      [  800.721803] [VIN_ERR]isp0 the read empty flag of DMSC_AVG_FIFO
      [  800.728336] [VIN_ERR]isp0 the write full flag of DMSC_RATIO_FIFO
      [  800.735065] [VIN]__sunxi_isp_reset:isp0 reset!!!,ISP frame number is 0
      [  800.742417] [VIN_ERR]isp0 frame lost!
      [  800.746519] [VIN]__sunxi_isp_reset:isp0 reset!!!,ISP frame number is 0
      [  800.753830] [VIN_ERR]isp0 configuration error
      [  800.758708] [VIN_ERR]isp0 the bytpe signal of channel 0 is changed
      [  800.765630] [VIN_ERR]isp0 height error
      [  800.769826] [VIN]__sunxi_isp_reset:isp0 reset!!!,ISP frame number is 0
      [  800.777152] [VIN_ERR]isp0 frame lost!
      [  800.781252] [VIN]__sunxi_isp_reset:isp0 reset!!!,ISP frame number is 0
      
      

      这个/mnt/extsd/isp0_1920_1080_60_ctx_saved.bin文件是怎么来的,应该往哪个方向排故?

      1 条回复 最后回复 回复 引用 分享 0
      • A
        awwwwa LV 8 最后由 编辑

        可以在设备树把isp关闭

        X 2 条回复 最后回复 回复 引用 分享 0
        • X
          xjy_5 LV 6 @awwwwa 最后由 编辑

          @awwwwa V853的mipi csi总线到不了750MHZ,这是RK628的最低频率。禁用ISP的话我还有什么方法调用MIPI CSI?在应用层我只知道ISP的应用接口。

          1 条回复 最后回复 回复 引用 分享 0
          • X
            xjy_5 LV 6 @awwwwa 最后由 xiaowenge 编辑

            @awwwwa
            e9748b44-2f59-43c8-983a-b7a831f350ea-image.png
            手册上说每条land支持1.2Gbps的带宽,也就是说最高频率是600MHZ,但RK628最低是到750MHZ的,用不了,现在看看tc358743怎么样了

            A 1 条回复 最后回复 回复 引用 分享 0
            • xiaowenge
              DOT小文哥 LV 8 最后由 编辑

              可算看到回头草了,往常都是看到把我们的东西往友商芯片上移的😊

              1 条回复 最后回复 回复 引用 分享 0
              • A
                awwwwa LV 8 @xjy_5 最后由 awwwwa 编辑

                @xjy_5 tc358743有现成的驱动,可以试一下

                tc358743_sunxi_vin.zip

                sensor0:sensor@0 {
                	device_type = "sensor0";
                	compatible = "allwinner,sunxi-sensor";
                	sensor0_mname = "tc358743_mipi";
                	sensor0_twi_cci_id = <2>;
                	sensor0_twi_addr = <0x1f>;
                	sensor0_mclk_id = <0>;
                	sensor0_pos = "rear";
                	sensor0_isp_used = <0>;
                	sensor0_fmt = <0>;
                	sensor0_stby_mode = <0>;
                	sensor0_vflip = <0>;
                	sensor0_hflip = <0>;
                	sensor0_cameravdd-supply = <>;
                	sensor0_cameravdd_vol = <2800000>;
                	sensor0_iovdd-supply = <&reg_cldo4>;
                	sensor0_iovdd_vol = <1800000>;
                	sensor0_avdd-supply = <>;
                	sensor0_avdd_vol = <>;
                	sensor0_dvdd-supply = <>;
                	sensor0_dvdd_vol = <>;
                	sensor0_power_en = <>;
                	sensor0_reset = <&pio PI 8 1 0 1 0>;
                	sensor0_pwdn = <>;
                	sensor0_sm_vs = <>;
                	flash_handle = <&flash0>;
                	act_handle = <&actuator0>;
                	device_id = <0>;
                	status	= "okay";
                };
                

                sensor0_isp_used 配置了不使用 ISP

                sensor0_isp_used = <0>;
                
                X 4 条回复 最后回复 回复 引用 分享 0
                • X
                  xjy_5 LV 6 @awwwwa 最后由 编辑

                  @awwwwa 谢谢大哥!祝大哥福如东海,寿比南山,永远不死,吃嘛嘛香!给大哥递茶🍵

                  1 条回复 最后回复 回复 引用 分享 0
                  • X
                    xjy_5 LV 6 @awwwwa 最后由 编辑

                    @awwwwa 我改了设备树,在sensor文件夹下添加了tc358743,修改了makefile
                    63e2cbbf-1b6c-40d6-91d7-a1f196006f7e-image.png
                    编译是通过了,不过我怎么调用?

                    1 条回复 最后回复 回复 引用 分享 0
                    • X
                      xjy_5 LV 6 @awwwwa 最后由 编辑

                      @awwwwa 没事了,看到开机就调用了

                      1 条回复 最后回复 回复 引用 分享 0
                      • X
                        xjy_5 LV 6 最后由 编辑

                        好了,总算能生成的ko文件了,把tc358743文件夹放在/tina-v853-open/kernel/linux-4.9/drivers/media/platform/sunxi-vin/modules/sensor/,修改 Makefile
                        57641177-2066-47ee-8aaa-60c9286d44b7-image.png
                        再修改tc358743文件夹内的makefile
                        2a4a2714-2025-4e75-b812-81e5f732f332-image.png

                        还要配置一下make kernel_menuconfig,搜索dv_timi,选第一个
                        9d58d1bf-a04f-4876-8ecf-0d0bd6714b14-image.png
                        这就能生成.ko文件了

                        1 条回复 最后回复 回复 引用 分享 0
                        • X
                          xjy_5 LV 6 @awwwwa 最后由 编辑

                          @awwwwa 运行起来了,不过一直出这句话
                          twi_stop()535 - engine-mode: STOP can't sendout!

                          A 1 条回复 最后回复 回复 引用 分享 0
                          • A
                            awwwwa LV 8 @xjy_5 最后由 编辑

                            @xjy_5 检查下twi的配置

                            X 6 条回复 最后回复 回复 引用 分享 0
                            • X
                              xjy_5 LV 6 @awwwwa 最后由 编辑

                              此回复已被删除!
                              1 条回复 最后回复 回复 引用 分享 0
                              • X
                                xjy_5 LV 6 @awwwwa 最后由 xjy_5 编辑

                                @awwwwa 原来是把TWI的驱动能力改成3,上下拉去掉就可以了

                                	twi0_pins_a: twi0@0 {
                                		allwinner,pins = "PA16", "PA17";
                                		allwinner,pname = "twi0_scl", "twi0_sda";
                                		allwinner,function = "twi0";
                                		allwinner,muxsel = <4>;
                                		allwinner,drive = <3>;//IO驱动能力: Level 3
                                		allwinner,pull = <0>;//不需要内部上下拉电阻
                                	};
                                

                                e9c5c198-787a-4f0d-960e-d3529e930eca-image.png
                                adebdbb9-4b5b-4ab2-a966-6b827ceba902-image.png

                                1 条回复 最后回复 回复 引用 分享 0
                                • X
                                  xjy_5 LV 6 @awwwwa 最后由 编辑

                                  @awwwwa 驱动运行起来了,mipi也有信号,运行sample_virvi抓图失败,报错信息入下,讲真星期五没什么心情写代码了,今天能看多少看多少吧。顺带说一下,我实在不清楚reset函数是什么时候调用的,我把驱动里reset脚的操作放在了PWR_ON里,把sensor_probe里的iic操作放到了sensor_init里。这样就能确定寄存器是重置后配的了

                                  root@TinaLinux:/# /root/sample_virvi -path /root/sample_virvi.conf
                                  WARNING: Logging before InitGoogleLogging() is written to STDERR
                                  I0101 03:45:59.285326  1128 dup2SeldomUsedFd.c:20]          <dup2SeldomUsedFdInit> gFdLock init
                                  Sample virvi buile time = Oc[   31.698292] VE: before freq=400000000
                                  t 13 2023, 09:12:40.
                                  I0101 03:[   31.703777] VE: real freq=400000000
                                  45:59.292222  1128 sample_virvi.c:54]                       <ParseCmdLine> sample virvi path:[/root/sample_virvi], arg number is [3]
                                  I0101 03:45:59.293594  1128 confparser.c:60]                <createConfParser> load conf file /root/sample_virvi.conf ok!
                                  I0101 03:45:59.296145  1128 sample_virvi.c:279]             <loadConfigPara> user did not specify buf len. set a default value 3110400 bytes
                                  I0101 03:45:59.296290  1128 sample_virvi.c:289]             <loadConfigPara> capture[0] dev num[0], capture size[1920x1080] format[20] framerate[60] colorspace[31] drop frm[50]
                                  I0101 03:45:59.296371  1128 sample_virvi.c:289]             <loadConfigPara> capture[1] dev num[-1], capture size[1920x1080] format[32] framerate[20] colorspace[31] drop frm[50]
                                  I0101 03:45:59.296443  1128 sample_virvi.c:289]             <loadConfigPara> capture[2] dev num[-1], capture size[1920x1080] format[32] framerate[20] colorspace[31] drop frm[50]
                                  I0101 03:45:59.296506  1128 sample_virvi.c:289]             <loadConfigPara> capture[3] dev num[-1], capture size[1920x1080] format[32] framerate[20] colorspace[31] drop frm[50]
                                  I0101 03:45:59.296580  1128 sample_virvi.c:295]             <loadConfigPara> save pic dev[0], yuv count[100] file[/root/pic/test.yuv], raw count[0] interval[20] save dir[/root/pic], buf len[3110400] num[5]
                                  I0101 03:45:59.296645  1128 sample_virvi.c:297]             <loadConfigPara> test duration[10]
                                  I0101 03:45:59.296777  1128 mpi_sys.c:840]                  <AW_MPI_SYS_SetConf> kfctmpdir is [/tmp]
                                  >>>>>>>>>>>>>>>>>>>>>>>>>>>>> Media Process Platform<<<<<<<<<<<<<<<<<<<<<<<<<<<<
                                  modName : MPP-Platform
                                  tag   : V1.0 Release
                                  branch: v5-dev
                                  commit: 4eed413532ad87725895a8cb1ba75e22fc328233
                                  date  : 20170725
                                  author: jenkins
                                  I0101 03:45:59.302180  1128 mpi_sys.c:1280]                 <AW_MPI_SYS_Init> ISP init
                                  [ISP]>>>>>>>>>>>>>>>>>>>> ISP VERSION INFO <<<<<<<<<<<<<<<<<<<
                                  IPCORE: ISP600
                                  branch: libisp-dev
                                  commit: 14df8348718d093707641fea73eba7db962885f5
                                  date  : Thu Jul 14 15:40:38 2022 +0800
                                  author: <mayifei@allwinnertech.com>
                                  --------------------------------------------------------
                                  
                                  I0101 03:45:59.302545  1128 mpi_sys.c:1282]                 <AW_MPI_SYS_Init> ISP init done
                                  INFO   : cedarc <VeInitialize:1185>: *** ic_version = 0x1302000023010,
                                  I0101 03:45:59.319500  1128 hwdisplay.c:84]                 <hw_display_init>
                                  I0101 03:45:59.319673  1128 hwdisplay.c:993]                <hwd_init> (hwd_init 993)
                                  I0101 03:45:59.319821  1128 hwdisplay.c:1048]               <hwd_init> ret[0][2,0]ch[0]lyl[0] init: enable[0], screenwin[0,0, 0x0], zorder[0], alpha[mode:0, value:0]
                                  W0101 03:45:59.322032  1128 audio_hw.c:243]                 <audioHw_Construct>
                                  W0101 03:45:59.322181  1128 audio_hw.c:216]                 <MakeAllMixerElemsAvailable>
                                  I0101 03:45:59.368130  1128 audio_hw.c:223]                 <MakeAllMixerElemsAvailable> pcm open and close, all MixerElems maybe exist.
                                  I0101 03:45:59.368302  1128 alsa_interface.c:701]           <alsaOpenMixer> open mixer:hw:0
                                  I0101 03:45:59.372998  1128 alsa_interface.c:736]           <alsaOpenMixer> alsa_elem:ADC1 ADC2 swap
                                  I0101 03:45:59.373184  1128 alsa_interface.c:736]           <alsaOpenMixer> alsa_elem:ADC1 volume
                                  I0101 03:45:59.373263  1128 alsa_interface.c:736]           <alsaOpenMixer> alsa_elem:ADC2 volume
                                  I0101 03:45:59.373324  1128 alsa_interface.c:736]           <alsaOpenMixer> alsa_elem:ADCDRC
                                  I0101 03:45:59.373384  1128 alsa_interface.c:736]           <alsaOpenMixer> alsa_elem:ADCHPF
                                  I0101 03:45:59.373544  1128 alsa_interface.c:736]           <alsaOpenMixer> alsa_elem:DAC volume
                                  I0101 03:45:59.373632  1128 alsa_interface.c:736]           <alsaOpenMixer> alsa_elem:DACDRC
                                  I0101 03:45:59.373695  1128 alsa_interface.c:736]           <alsaOpenMixer> alsa_elem:DACHPF
                                  I0101 03:45:59.373754  1128 alsa_interface.c:736]           <alsaOpenMixer> alsa_elem:LINEIN
                                  I0101 03:45:59.373811  1128 alsa_interface.c:736]           <alsaOpenMixer> alsa_elem:LINEINL gain volume
                                  I0101 03:45:59.373865  1128 alsa_interface.c:736]           <alsaOpenMixer> alsa_elem:LINEINR gain volume
                                  I0101 03:45:59.373917  1128 alsa_interface.c:736]           <alsaOpenMixer> alsa_elem:LINEOUT
                                  I0101 03:45:59.373971  1128 alsa_interface.c:736]           <alsaOpenMixer> alsa_elem:LINEOUT Output Select
                                  I0101 03:45:59.374163  1128 alsa_interface.c:736]           <alsaOpenMixer> alsa_elem:LINEOUT volume
                                  I0101 03:45:59.374291  1128 alsa_interface.c:756]           <alsaOpenMixer> set playback vol_val to value: 27
                                  I0101 03:45:59.374381  1128 alsa_interface.c:736]           <alsaOpenMixer> alsa_elem:MIC1
                                  I0101 03:45:59.374557  1128 alsa_interface.c:736]           <alsaOpenMixer> alsa_elem:MIC1 Input Select
                                  I0101 03:45:59.374641  1128 alsa_interface.c:736]           <alsaOpenMixer> alsa_elem:MIC1 gain volume
                                  I0101 03:45:59.374705  1128 alsa_interface.c:736]           <alsaOpenMixer> alsa_elem:MIC2
                                  I0101 03:45:59.705919  1128 alsa_interface.c:736]           <alsaOpenMixer> alsa_elem:MIC2 In[   32.135476] [tc358743_mipi]sensor_power
                                  put Select
                                  I0101 03:45:59.70604[   32.142119] [tc358743_mipi]PWR_ON!
                                  1  1128 alsa_interface.c:736]                               <alsaOpenMixer> alsa_elem:MIC2 gain volume
                                  I0101 03:45:59.706113  1128 alsa_interface.c:736]           <alsaOpenMixer> alsa_elem:SPK
                                  I0101 03:45:59.706173  1128 alsa_interface.c:736]           <alsaOpenMixer> alsa_elem:digital volume
                                  I0101 03:45:59.706228  1128 alsa_interface.c:736]           <alsaOpenMixer> alsa_elem:rx sync mode
                                  I0101 03:45:59.706281  1128 alsa_interface.c:736]           <alsaOpenMixer> alsa_elem:tx hub mode
                                  I0101 03:45:59.712543  1128 sample_virvi.c:633]             <initSaveB[   32.193321] [tc358743_mipi]sensor_init
                                  ufMgr> node[0] alloc data len[3110400] phy addr[1221591040] vir addr[0xb6966000]
                                  I0101 03:45:59.719106  1128 sample_virvi.c:633]             <initSaveBufMgr> node[1] alloc data len[3110400] phy addr[1224736768] vir addr[0xb666e000]
                                  I0101 03:45:59.725542  1128 sample_virvi.c:633]             <initSaveBufMgr> node[2] alloc data len[3110400] phy addr[1227882496] vir addr[0xb6376000]
                                  I0101 03:45:59.731885  1128 sample_virvi.c:633]             <initSaveBufMgr> node[3] alloc data len[3110400] phy addr[1231028224] vir addr[0xb607e000]
                                  I0101 03:45:59.738354  1128 sample_virvi.c:633]             <initSaveBufMgr> node[4] alloc data len[3110400] phy addr[1234173952] vir addr[0xb5d86000]
                                  [ISP]video device name is vin_video0
                                  [ISP]open video device[0], detect isp0 success!
                                  I0101 03:45:59.739078  1128 media_debug.c:45]               <getDictByConfPath> MPP_DEDIA_DEBUG_FILE_PATH=(null)
                                  I0101 03:45:59.739625  1128 videoInputHw.c:1015]            <videoInputHw_SetChnAttr> ViCh[0], user set disable Encpp
                                  [   32.375465] v4l2_dev:ddc438b8
                                  [   32.379612] [TC358743]tc358743 chipid:0x0
                                  [ISP]video0 fd[14] ve_online_en=[   32.384193] [VIN]ve_online close
                                  0, dma_buf_num=0
                                  [   32.391026] [VIN_ERR]vin is not support this pixelformat
                                  [   32.398110] [VIN_ERR]vin_pipeline_try_format failed
                                  [ISP_ERR]video_set_fmt, line: 194,VIDIOC_S_FMT error!
                                  E0101 03:[   32.406800] [tc358743_mipi]sensor_ioctl cmd:-1069787396
                                  46:00.008377  1128 videoInputHw.c:1055]                     <videoInputHw_SetChnAttr> video set_fmt failed, chn[0]
                                  E0101 03:46:00.008512  1128 sample_virvi.c:758]             <prepare> fatal error! vi dev[0] set vipp attr fail!
                                  [ISP]open isp device[0] success!
                                  [ISP_ERR]isp_sensor_get_configs, line: 810,tc358743_mipi get config failed: Invalid argument (22).
                                  [ISP_WARN]open /mnt/extsd/isp0_0_0_0_ctx_saved.bin failed, err:No such file or directory.
                                  [ISP]prefer isp config: [tc358743_mipi], 0x0, 0, 0, 0
                                  [ISP_WARN]cannot find tc358743_mipi_0_0_0_0_0 isp config, use gc2053_mipi_1920_1088_20_0_0 -> [gc2053_mipi_isp600_20220511_164617_vlc4_day]
                                  [ISP_ERR]isp_ctx_config_init, line: 2305,sensor attribute is not init.
                                  [ISP]create isp0 server thread!
                                  planes number is error!
                                  E0101 03:46:00.031350  1128 sample_virvi.c:775]             <prepare> fatal error! vi dev[0] enable fail!
                                  I0101 03:46:00.031531  1128 mpi_vi.c:1018]                  <AW_MPI_VI_CreateVirChn> we allow to create virChn[0] in disable status of vipp[0]
                                  I0101 03:46:00.031800  1128 VideoVirVi_Component.c:1160]    <VideoViComponentInit> VideoVirvi component Init! thread_id[0xb5c4ed50]
                                  I0101 03:46:00.031994  1128 sample_virvi.c:787]             <prepare> create vi dev[0] vi chn[0] success!
                                  I0101 03:46:00.032589  1139 sample_virvi.c:533]             <GetCSIFrameThread> loop Sample_virvi, Cap threadid=0xb5c2bd50, ViDev = 0, ViCh = 0
                                  [ISP_ERR]events_loop, line: 162,isp0 event select timeout
                                  [   36.799404] random: crng init done
                                  [ISP_ERR]events_loop, line: 162,isp0 event select timeout
                                  [ISP_ERR]events_loop, line: 162,isp0 event select timeout
                                  I0101 03:46:10.032343  1139 sample_virvi.c:589]             <GetCSIFrameThread> vi dev[0] get csi frame trd exit!
                                  I0101 03:46:10.032675  1138 VideoVirVi_Component.c:1206]    <Vi_ComponentThread> vipp[0]virChn[0]:begin to wait using frame return
                                  I0101 03:46:10.032951  1128 VideoVirVi_Component.c:1056]    <VideoViComponentDeInit> VideoVirvi component exited!
                                  [   42.503109] [tc358743_mipi]sensor_power
                                  [   42.507547] [DISP] disp_mgr_set_layer_config,line:1504:
                                  [   42.513378] NULL hdl!
                                  [   42.538965] [ICN6202 TO LVDS] LINE:0152-->lcd_close_flow:
                                  [   42.545074] [ICN6202 TO LVDS] LINE:0206-->lcd_bl_close:
                                  [   42.758954] [ICN6202 TO LVDS] LINE:0185-->lcd_power_off:
                                  [   42.859128] [DISP] de_fcm_set_para,line:491:
                                  [   42.863721] fcm lut 0 not find, auto retry after init
                                  [   42.869776] [DISP] de_fcm_set_para,line:491:
                                  [   42.874363] fcm lut 0 not find, auto retry after init
                                  Segmentation fault (core dumped)
                                  

                                  配置文件内容

                                  ########### paramter (ref to tulip_cedarx.conf)############
                                  [parameter]
                                  dev_num_0 = 0
                                  isp_dev_num_0 = 0
                                  pic_width_0 = 1920
                                  pic_height_0 = 1080
                                  frame_rate_0 = 60
                                  pic_format_0 = "yu12"
                                  color_space_0 = "rec709_part_range"
                                  enable_wdr_mode_0 = 0
                                  drop_frm_num_0 = 50
                                  
                                  dev_num_1 = -1
                                  isp_dev_num_1 = 0
                                  pic_width_1 = 1920
                                  pic_height_1 = 1080
                                  frame_rate_1 = 20
                                  pic_format_1 = "nv21"
                                  color_space_1 = "rec709_part_range"
                                  enable_wdr_mode_1 = 0
                                  drop_frm_num_1 = 50
                                  
                                  dev_num_2 = -1
                                  isp_dev_num_2 = 0
                                  pic_width_2 = 1920
                                  pic_height_2 = 1080
                                  frame_rate_2 = 20
                                  pic_format_2 = "nv21"
                                  color_space_2 = "rec709_part_range"
                                  enable_wdr_mode_2 = 0
                                  drop_frm_num_2 = 50
                                  
                                  dev_num_3 = -1
                                  isp_dev_num_3 = 0
                                  pic_width_3 = 1920
                                  pic_height_3 = 1080
                                  frame_rate_3 = 20
                                  pic_format_3 = "nv21"
                                  color_space_3 = "rec709_part_range"
                                  enable_wdr_mode_3 = 0
                                  drop_frm_num_3 = 50
                                  
                                  save_pic_dev = 0
                                  yuv_frm_count = 100
                                  yuv_file = "/root/pic/test.yuv"
                                  
                                  raw_store_count = 0
                                  raw_store_interval = 20
                                  store_dir = "/root/pic"
                                  
                                  save_pic_buffer_len = 0    # 0: Specify the buffer length according to the pixel and resolution.
                                  save_pic_buffer_num = 5
                                  
                                  test_duration = 10
                                  
                                  1 条回复 最后回复 回复 引用 分享 0
                                  • X
                                    xjy_5 LV 6 @awwwwa 最后由 xjy_5 编辑

                                    @awwwwa 其实我挺疑惑 mbus_code到底选哪个,看了规格书和其他tc358743的驱动都和这个芯片不太配的样子。

                                    35e0ef87-8bb8-495f-be7b-c1f3b56537c4-image.png

                                    50c0490b-0343-4fbe-ae56-f2fd494ddc29-image.png

                                    8f794571-bebe-4778-8371-e6bd4e0e6729-image.png

                                    1 条回复 最后回复 回复 引用 分享 0
                                    • X
                                      xjy_5 LV 6 @awwwwa 最后由 xjy_5 编辑

                                      @awwwwa 现在又发现其他问题,有时候会出现报错

                                      tc_write8 failed, addr:8514 value:0x00
                                      

                                      或者

                                      tc_write8 failed, addr:8543 value:0x32
                                      

                                      然后mipi信号就不会发生。
                                      有时候mipi信号有了,但是只在数据线上有信号,CLKP,CLKN没信号

                                      F 1 条回复 最后回复 回复 引用 分享 0
                                      • X
                                        xjy_5 LV 6 @awwwwa 最后由 xjy_5 编辑

                                        @awwwwa 又有新发现,CLKP,CLKN在初始化TC358743前和其他数据脚一样维持在1.2V,初始化后就变成了0.2V,后来我再开测试程序,它还是保持0.2V,其他引脚则产生波形

                                        KunYi 1 条回复 最后回复 回复 引用 分享 0
                                        • KunYi
                                          KunYi LV 8 @xjy_5 最后由 编辑

                                          @xjy_5
                                          ref. https://blog.csdn.net/wanglining1987/article/details/50202615

                                          X 1 条回复 最后回复 回复 引用 分享 1
                                          • X
                                            xjy_5 LV 6 最后由 编辑

                                            最近有人离职,要先做其他东西了,这个功能要先停住了。

                                            1 条回复 最后回复 回复 引用 分享 0
                                            • X
                                              xjy_5 LV 6 @KunYi 最后由 编辑

                                              @kunyi 那也就是说可能已经在传图像了??不过我一直都没出过图,坏图也没见,就是不通,资料匮乏啊。

                                              KunYi 1 条回复 最后回复 回复 引用 分享 0
                                              • KunYi
                                                KunYi LV 8 @xjy_5 最后由 编辑

                                                @xjy_5
                                                沒實際做過
                                                不過看你的log 你可以看到是有呼叫到 驅動的但是 image pipeline 建立失敗
                                                你仔細研究看看 應該有機會的

                                                I0101 03:45:59.705919  1128 alsa_interface.c:736]           <alsaOpenMixer> alsa_elem:MIC2 In[   32.135476] [tc358743_mipi]sensor_power
                                                put Select
                                                I0101 03:45:59.70604[   32.142119] [tc358743_mipi]PWR_ON!
                                                1  1128 alsa_interface.c:736]                               <alsaOpenMixer> alsa_elem:MIC2 gain volume
                                                I0101 03:45:59.706113  1128 alsa_interface.c:736]           <alsaOpenMixer> alsa_elem:SPK
                                                I0101 03:45:59.706173  1128 alsa_interface.c:736]           <alsaOpenMixer> alsa_elem:digital volume
                                                I0101 03:45:59.706228  1128 alsa_interface.c:736]           <alsaOpenMixer> alsa_elem:rx sync mode
                                                I0101 03:45:59.706281  1128 alsa_interface.c:736]           <alsaOpenMixer> alsa_elem:tx hub mode
                                                I0101 03:45:59.712543  1128 sample_virvi.c:633]             <initSaveB[   32.193321] [tc358743_mipi]sensor_init
                                                ufMgr> node[0] alloc data len[3110400] phy addr[1221591040] vir addr[0xb6966000]
                                                I0101 03:45:59.719106  1128 sample_virvi.c:633]             <initSaveBufMgr> node[1] alloc data len[3110400] phy addr[1224736768] vir addr[0xb666e000]
                                                I0101 03:45:59.725542  1128 sample_virvi.c:633]             <initSaveBufMgr> node[2] alloc data len[3110400] phy addr[1227882496] vir addr[0xb6376000]
                                                I0101 03:45:59.731885  1128 sample_virvi.c:633]             <initSaveBufMgr> node[3] alloc data len[3110400] phy addr[1231028224] vir addr[0xb607e000]
                                                I0101 03:45:59.738354  1128 sample_virvi.c:633]             <initSaveBufMgr> node[4] alloc data len[3110400] phy addr[1234173952] vir addr[0xb5d86000]
                                                [ISP]video device name is vin_video0
                                                [ISP]open video device[0], detect isp0 success!
                                                I0101 03:45:59.739078  1128 media_debug.c:45]               <getDictByConfPath> MPP_DEDIA_DEBUG_FILE_PATH=(null)
                                                I0101 03:45:59.739625  1128 videoInputHw.c:1015]            <videoInputHw_SetChnAttr> ViCh[0], user set disable Encpp
                                                [   32.375465] v4l2_dev:ddc438b8
                                                [   32.379612] [TC358743]tc358743 chipid:0x0
                                                [ISP]video0 fd[14] ve_online_en=[   32.384193] [VIN]ve_online close
                                                0, dma_buf_num=0
                                                [   32.391026] [VIN_ERR]vin is not support this pixelformat
                                                [   32.398110] [VIN_ERR]vin_pipeline_try_format failed
                                                [ISP_ERR]video_set_fmt, line: 194,VIDIOC_S_FMT error!
                                                E0101 03:[   32.406800] [tc358743_mipi]sensor_ioctl cmd:-1069787396
                                                46:00.008377  1128 videoInputHw.c:1055]                     <videoInputHw_SetChnAttr> video set_fmt failed, chn[0]
                                                E0101 03:46:00.008512  1128 sample_virvi.c:758]             <prepare> fatal error! vi dev[0] set vipp attr fail!
                                                [ISP]open isp device[0] success!
                                                [ISP_ERR]isp_sensor_get_configs, line: 810,tc358743_mipi get config failed: Invalid argument (22).
                                                [ISP_WARN]open /mnt/extsd/isp0_0_0_0_ctx_saved.bin failed, err:No such file or directory.
                                                [ISP]prefer isp config: [tc358743_mipi], 0x0, 0, 0, 0
                                                [ISP_WARN]cannot find tc358743_mipi_0_0_0_0_0 isp config, use gc2053_mipi_1920_1088_20_0_0 -> [gc2053_mipi_isp600_20220511_164617_vlc4_day]
                                                [ISP_ERR]isp_ctx_config_init, line: 2305,sensor attribute is not init.
                                                [ISP]create isp0 server thread!
                                                planes number is error!
                                                

                                                記得你的 ISP 要trun off
                                                ref.https://zhuanlan.zhihu.com/p/628496408

                                                X 1 条回复 最后回复 回复 引用 分享 1
                                                • X
                                                  xjy_5 LV 6 @KunYi 最后由 编辑

                                                  @kunyi 现在用原厂摄像头,关闭ISP,出现了同样的错误,理论上应该不会有错才对,也有可能是我用的例程不对

                                                  KunYi 1 条回复 最后回复 回复 引用 分享 0
                                                  • KunYi
                                                    KunYi LV 8 @xjy_5 最后由 编辑

                                                    @xjy_5 如果你用原廠camera 那不關閉ISP的情況下會出錯嗎?
                                                    先找一個會動的案例出來
                                                    之後基於這個基礎去理解跟修改會不會好一點?

                                                    X 1 条回复 最后回复 回复 引用 分享 0
                                                    • X
                                                      xjy_5 LV 6 @KunYi 最后由 编辑

                                                      @kunyi 开ISP当然可以用,现在关ISP也能用了,就是抓图的时候像素格式没设置对

                                                      1 条回复 最后回复 回复 引用 分享 2
                                                      • F
                                                        forever18 LV 3 @xjy_5 最后由 编辑

                                                        @xjy_5 在 求高人指点! ISP通路测试 sample_vin_isp_test 报错 中说:

                                                        tc_write8 failed, addr:8514 value:0x00

                                                        code_text
                                                        
                                                        1 条回复 最后回复 回复 引用 分享 1
                                                        • 1 / 1
                                                        • First post
                                                          Last post

                                                        Copyright © 2024 深圳全志在线有限公司 粤ICP备2021084185号 粤公网安备44030502007680号

                                                        行为准则 | 用户协议 | 隐私权政策