求高人指点! ISP通路测试 sample_vin_isp_test 报错
-
我在移植RK628D屏幕采集模块到v853上,是CSI 4land接口,开机后电脑已经识别到第二个显示器了
不过信号采集一直有问题,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文件是怎么来的,应该往哪个方向排故?
-
可以在设备树把isp关闭
-
@awwwwa V853的mipi csi总线到不了750MHZ,这是RK628的最低频率。禁用ISP的话我还有什么方法调用MIPI CSI?在应用层我只知道ISP的应用接口。
-
@awwwwa
手册上说每条land支持1.2Gbps的带宽,也就是说最高频率是600MHZ,但RK628最低是到750MHZ的,用不了,现在看看tc358743怎么样了 -
可算看到回头草了,往常都是看到把我们的东西往友商芯片上移的
-
@xjy_5 tc358743有现成的驱动,可以试一下
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 = <®_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>;
-
@awwwwa 谢谢大哥!祝大哥福如东海,寿比南山,永远不死,吃嘛嘛香!给大哥递茶
-
@awwwwa 我改了设备树,在sensor文件夹下添加了tc358743,修改了makefile
编译是通过了,不过我怎么调用? -
@awwwwa 没事了,看到开机就调用了
-
好了,总算能生成的ko文件了,把tc358743文件夹放在/tina-v853-open/kernel/linux-4.9/drivers/media/platform/sunxi-vin/modules/sensor/,修改 Makefile
再修改tc358743文件夹内的makefile
还要配置一下make kernel_menuconfig,搜索dv_timi,选第一个
这就能生成.ko文件了
Copyright © 2023 深圳全志在线有限公司 粤ICP备2021084185号 粤公网安备44030502007680号