GC2053怎么关闭ISP使用?
-
我移植HDMI转MIPI驱动,不论是RK628还是TC358743,开启最后都会出现vin_pipeline_try_format failed无法解决,
而开启ISP,又会去用GC2053的isp 配置文件,出现 [VIN_ERR]isp0 configuration error
现在还是买来GC2053参考参考,照着教程走最后确实出视频了,但如果我在设备树里写sensor0_isp_used = <0>;,就一样会出现SET_FMT errorroot@TinaLinux:/# /root/sample_vin_isp_test 0 1920 1080 /root/pic 1 3 30 0 [ISP]>>>>>>>>>>>>>>>>>>>> ISP VE[ 15.849895] [gc2053_mipi]PWR_ON! RSION INFO <<<<<<<<<<<<<<<<<<< IPCORE: ISP600 branch: libisp-dev commit: 14df8348718d093707641fea73eba7db962885f5 date : Thu Jul 14 15:40:38 2022 +0800 author: <mayifei@allwinnertech.com> -------------------------------------------------------- [ISP]video device name is vin_video0 [ISP]open video device[0], detect isp0 success! [ 15.887433] [gc2053_mipi]sensor_init [ 15.891753] [gc2053_mipi]eRet:0, ID_VAL_HIGH:0x20, times_out:3 [ 16.117668] [gc2053_mipi]ID_VAL_HIGH = 20, Done! [ 16.123153] [gc2053_mipi]ID_VAL_LOW = 53, Done! [ 16.128278] [gc2053_mipi]Done! [ISP]video0 fd[4] ve_online_en=0[ 16.131795] [VIN]ve_online close , dma_buf_num=0 [ 16.138474] [VIN_ERR]vin is not support this pixelformat [ 16.145613] [VIN_ERR]vin_pipeline_try_format failed [ISP_ERR]video_set_fmt, line: 19[ 16.151431] [gc2053_mipi]sensor_init 4,VIDIOC_S_FMT error! video_set[ 16.158350] [gc2053_mipi]eRet:0, ID_VAL_HIGH:0x20, times_out:3 _fmt failed vin isp test 1, return -1 [ISP]mpi_vi already 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> --------------------------------------------------------
搞得我看了半天mbus_code,那gc2053关ISP还有什么地方要改?
-
@xjy_5 成了,用/root/sample_driverVipp 0 1920 1080 5 60 1 1 30 /root/pic可以抓图,注意像素格式要和驱动里的一样是SBGGR10就行,这里对应的是V4L2_PIX_FMT_SBGGR10,
但是我用RK628还是抓不到,RK628驱动设置的是 MEDIA_BUS_FMT_UYVY8_2X8 ,对应的像素格式是V4L2_PIX_FMT_UYVY??
root@TinaLinux:/# /root/sample_driverVipp 0 1920 1080 4 60 1 1 30 /root/pic sample_driverVipp running! <convertParamToV4L2PixFmt:90> SET FMT V4L2_PIX_FMT_UYVY! <main:283> before open MEDIA_DEVICE[/dev/media0] <main:285> after open MEDIA_DEVICE[/dev/media0] <main:305> mediaDeviceInfo: driver:[sunxi-vin-media] model:[Allwinner Vin] serial:[] bus_info:[] media_version:256, hw_revision:0, driver_version:0 <main:335> media_entity_desc: id[0x1], type[0x20001], name[m00_b_rk628-csi 1-0028], pads[1], links[1], major/minor[81/1] <main:352> sysname[/sys/dev/char/81:1], target[../../devices/platform/soc/5800800.vind/video4linux/v4l-subdev0] <main:369> make devName[/dev/v4l-subdev0] <main:335> media_entity_desc: id[0x3], type[0x10001], name[vin_cap.0], pads[2], links[1], major/minor[81/2] <main:352> sysname[/sys/dev/char/81:2], target[../../devices/platform/soc/5800800.vind/video4linux/v4l-subdev1] <main:369> make devName[/dev/v4l-subdev1] <main:335> media_entity_desc: id[0x6], type[0x10001], name[vin_video0], pads[1], links[0], major/minor[81/0] <main:352> sysname[/sys/dev/char/81:0], target[../../devices/platform/soc/5800800.vind/video4linux/video0] <main:369> make devName[/dev/video0] <main:335> media_entity_desc: id[0xa], type[0x10001], name[sunxi_csi.0], pads[2], links[1], major/minor[81/3] <main:352> sysname[/sys/dev/char/81:3], target[../../devices/platform/soc/5800800.vind/video4linux/v4l-subdev2] <main:369> make devName[/dev/v4l-subdev2] <main:335> media_entity_desc: id[0xd], type[0x10001], name[sunxi_csi.1], pads[2], links[0], major/minor[81/4] <main:352> sysname[/sys/dev/char/81:4], target[../../devices/platform/soc/5800800.vind/video4linux/v4l-subdev3] <main:369> make devName[/dev/v4l-subdev3] <main:335> media_entity_desc: id[0x10], type[0x10001], name[sunxi_tdm_rx.0], pads[2], links[1], major/minor[81/5] <main:352> sysname[/sys/dev/char/81:5], target[../../devices/platform/soc/5800800.vind/video4linux/v4l-subdev4] <main:369> make devName[/dev/v4l-subdev4] <main:335> media_entity_desc: id[0x13], type[0x10001], name[sunxi_tdm_rx.1], pads[2], links[0], major/minor[81/6] <main:352> sysname[/sys/dev/char/81:6], target[../../devices/platform/soc/5800800.vind/video4linux/v4l-subdev5] <main:369> make devName[/dev/v4l-subdev5] <main:335> media_entity_desc: id[0x16], type[0x10001], name[sunxi_tdm_rx.2], pads[2], links[0], major/minor[81/7] <main:352> sysname[/sys/dev/char/81:7], target[../../devices/platform/soc/5800800.vind/video4linux/v4l-subdev6] <main:369> make devName[/dev/v4l-subdev6] <main:335> media_entity_desc: id[0x19], type[0x10001], name[sunxi_tdm_rx.3], pads[2], links[0], major/minor[81/8] <main:352> sysname[/sys/dev/char/81:8], target[../../devices/platform/soc/5800800.vind/video4linux/v4l-subdev7] <main:369> make devName[/dev/v4l-subdev7] <main:335> media_entity_desc: id[0x1c], type[0x10001], name[sunxi_mipi.0], pads[2], links[1], major/minor[81/9] <main:352> sysname[/sys/dev/char/81:9], target[../../devices/platform/soc/5800800.vind/video4linux/v4l-subdev8] <main:369> make devName[/dev/v4l-subdev8] <main:335> media_entity_desc: id[0x1f], type[0x10001], name[sunxi_mipi.1], pads[2], links[0], major/minor[81/10] <main:352> sysname[/sys/dev/char/81:10], target[../../devices/platform/soc/5800800.vind/video4linux/v4l-subdev9] <main:369> make devName[/dev/v4l-subdev9] <main:335> media_entity_desc: id[0x22], type[0x20000], name[sunxi_isp.0], pads[3], links[17], major/minor[81/11] <main:352> sysname[/sys/dev/char/81:11], target[../../devices/platform/soc/5800800.vind/video4linux/v4l-subdev10] <main:369> make devName[/dev/v4l-subdev10] <main:335> media_entity_desc: id[0x26], type[0x20000], name[sunxi_h3a.0], pads[1], links[0], major/minor[81/12] <main:352> sysname[/sys/dev/char/81:12], target[../../devices/platform/soc/5800800.vind/video4linux/v4l-subdev11] <main:369> make devName[/dev/v4l-subdev11] <main:335> media_entity_desc: id[0x28], type[0x20000], name[sunxi_isp.1], pads[3], links[17], major/minor[81/13] <main:352> sysname[/sys/dev/char/81:13], target[../../devices/platform/soc/5800800.vind/video4linux/v4l-subdev12] <main:369> make devName[/dev/v4l-subdev12] <main:335> media_entity_desc: id[0x2c], type[0x20000], name[sunxi_h3a.1], pads[1], links[0], major/minor[81/14] <main:352> sysname[/sys/dev/char/81:14], target[../../devices/platform/soc/5800800.vind/video4linux/v4l-subdev13] <main:369> make devName[/dev/v4l-subdev13] <main:335> media_entity_desc: id[0x2e], type[0x20000], name[sunxi_isp.2], pads[3], links[17], major/minor[81/15] <main:352> sysname[/sys/dev/char/81:15], target[../../devices/platform/soc/5800800.vind/video4linux/v4l-subdev14] <main:369> make devName[/dev/v4l-subdev14] <main:335> media_entity_desc: id[0x32], type[0x20000], name[sunxi_h3a.2], pads[1], links[0], major/minor[81/16] <main:352> sysname[/sys/dev/char/81:16], target[../../devices/platform/soc/5800800.vind/video4linux/v4l-subdev15] <main:369> make devName[/dev/v4l-subdev15] <main:335> media_entity_desc: id[0x34], type[0x20000], name[sunxi_isp.3], pads[3], links[17], major/minor[81/17] <main:352> sysname[/sys/dev/char/81:17], target[../../devices/platform/soc/5800800.vind/video4linux/v4l-subdev16] <main:369> make devName[/dev/v4l-subdev16] <main:335> media_entity_desc: id[0x38], type[0x20000], name[sunxi_h3a.3], pads[1], links[0], major/minor[81/18] <main:352> sysname[/sys/dev/char/81:18], target[../../devices/platform/soc/5800800.vind/video4linux/v4l-subdev17] <main:369> make devName[/dev/v4l-subdev17] <main:335> media_entity_desc: id[0x3a], type[0x20000], name[sunxi_isp.4], pads[3], links[17], major/minor[81/19] <main:352> sysname[/sys/dev/char/81:19], target[../../devices/platform/soc/5800800.vind/video4linux/v4l-subdev18] <main:369> make devName[/dev/v4l-subdev18] <main:335> media_entity_desc: id[0x3e], type[0x20000], name[sunxi_h3a.4], pads[1], links[0], major/minor[81/20] <main:352> sysname[/sys/dev/char/81:20], target[../../devices/platform/soc/5800800.vind/video4linux/v4l-subdev19] <main:369> make devName[/dev/v4l-subdev19] <main:335> media_entity_desc: id[0x40], type[0x20000], name[sunxi_scaler.0], pads[2], links[1], major/minor[81/21] <main:352> sysname[/sys/dev/char/81:21], target[../../devices/platform/soc/5800800.vind/video4linux/v4l-subdev20] <main:369> make devName[/dev/v4l-subdev20] <main:335> media_entity_desc: id[0x43], type[0x20000], name[sunxi_scaler.1], pads[2], links[0], major/minor[81/22] <main:352> sysname[/sys/dev/char/81:22], target[../../devices/platform/soc/5800800.vind/video4linux/v4l-subdev21] <main:369> make devName[/dev/v4l-subdev21] <main:335> media_entity_desc: id[0x46], type[0x20000], name[sunxi_scaler.2], pads[2], links[0], major/minor[81/23] <main:352> sysname[/sys/dev/char/81:23], target[../../devices/platform/soc/5800800.vind/video4linux/v4l-subdev22] <main:369> make devName[/dev/v4l-subdev22] <main:335> media_entity_desc: id[0x49], type[0x20000], name[sunxi_scaler.3], pads[2], links[0], major/minor[81/24] <main:352> sysname[/sys/dev/char/81:24], target[../../devices/platform/soc/5800800.vind/video4linux/v4l-subdev23] <main:369> make devName[/dev/v4l-subdev23] <main:335> media_entity_desc: id[0x4c], type[0x20000], name[sunxi_scaler.4], pads[2], links[0], major/minor[81/25] <main:352> sysname[/sys/dev/char/81:25], target[../../devices/platform/soc/5800800.vind/video4linux/v4l-subdev24] <main:369> make devName[/dev/v4l-subdev24] <main:335> media_entity_desc: id[0x4f], type[0x20000], name[sunxi_scaler.5], pads[2], links[0], major/minor[81/26] <main:352> sysname[/sys/dev/char/81:26], target[../../devices/platform/soc/5800800.vind/video4linux/v4l-subdev25] <main:369> make devName[/dev/v4l-subdev25] <main:335> media_entity_desc: id[0x[ 111.850667] [rk628_mipi]PWR_ON! 52], type[0x20000], name[sunxi_s[ 111.857055] [rk628_mipi]sensor_init caler.6], pads[2], links[0], maj[ 111.862730] [VIN_ERR]vin is not support this pixelformat or/minor[81/27] <main:352> sysn[ 111.871265] [VIN_ERR]vin_pipeline_try_format failed ame[/sys/dev/char/81:27], target[../../devices/platform/soc/5800800.vind/video4linux/v4l-subdev26] <main:369> make devName[/dev/v4l-subdev26] <main:335> media_entity_desc: id[0x55], type[0x20000], name[sunxi_scaler.7], pads[2], links[0], major/minor[81/28] <main:352> sysname[/sys/dev/char/81:28], target[../../devices/platform/soc/5800800.vind/video4linux/v4l-subdev27] <main:369> make devName[/dev/v4l-subdev27] <main:335> media_entity_desc: id[0x58], type[0x20000], name[sunxi_scaler.8], pads[2], links[0], major/minor[81/29] <main:352> sysname[/sys/dev/char/81:29], target[../../devices/platform/soc/5800800.vind/video4linux/v4l-subdev28] <main:369> make devName[/dev/v4l-subdev28] <main:335> media_entity_desc: id[0x5b], type[0x20000], name[sunxi_scaler.9], pads[2], links[0], major/minor[81/30] <main:352> sysname[/sys/dev/char/81:30], target[../../devices/platform/soc/5800800.vind/video4linux/v4l-subdev29] <main:369> make devName[/dev/v4l-subdev29] <main:335> media_entity_desc: id[0x5e], type[0x20000], name[sunxi_scaler.10], pads[2], links[0], major/minor[81/31] <main:352> sysname[/sys/dev/char/81:31], target[../../devices/platform/soc/5800800.vind/video4linux/v4l-subdev30] <main:369> make devName[/dev/v4l-subdev30] <main:335> media_entity_desc: id[0x61], type[0x20000], name[sunxi_scaler.11], pads[2], links[0], major/minor[81/32] <main:352> sysname[/sys/dev/char/81:32], target[../../devices/platform/soc/5800800.vind/video4linux/v4l-subdev31] <main:369> make devName[/dev/v4l-subdev31] <main:335> media_entity_desc: id[0x64], type[0x20000], name[sunxi_scaler.12], pads[2], links[0], major/minor[81/33] <main:352> sysname[/sys/dev/char/81:33], target[../../devices/platform/soc/5800800.vind/video4linux/v4l-subdev32] <main:369> make devName[/dev/v4l-subdev32] <main:335> media_entity_desc: id[0x67], type[0x20000], name[sunxi_scaler.13], pads[2], links[0], major/minor[81/34] <main:352> sysname[/sys/dev/char/81:34], target[../../devices/platform/soc/5800800.vind/video4linux/v4l-subdev33] <main:369> make devName[/dev/v4l-subdev33] <main:335> media_entity_desc: id[0x6a], type[0x20000], name[sunxi_scaler.14], pads[2], links[0], major/minor[81/35] <main:352> sysname[/sys/dev/char/81:35], target[../../devices/platform/soc/5800800.vind/video4linux/v4l-subdev34] <main:369> make devName[/dev/v4l-subdev34] <main:335> media_entity_desc: id[0x6d], type[0x20000], name[sunxi_scaler.15], pads[2], links[0], major/minor[81/36] <main:352> sysname[/sys/dev/char/81:36], target[../../devices/platform/soc/5800800.vind/video4linux/v4l-subdev35] <main:369> make devName[/dev/v4l-subdev35] <main:323> enum media entity done! num:37 <main:375> name of media_entity_desc we wanted is vin_video0 <main:431> VIDIOC_S_FMT error! <main:439> VIDIOC_G_FMT: resolution: 0x0, num_planes: 1 <main:445> VIDIOC_G_PARM: capturemode:0x2 <main:452> devname[/dev/video0] reqbufs: nr[5], type[9] <main:456> devname[/dev/video0] reqbufs: nr[5], type[9] done, ret[-1] <main:458> fatal error! devname[/dev/video0]: unable to request buffers (22) <main:493> fatal error! devname[/dev/video0]: unable to query buffer 0 (22). <main:508> fatal error! devname[/dev/video0]: unable to map buffer 0 plane 0, errno(22) <main:512> devname[/dev/video0]: buffer 0 planes 0 mapped at address 0xffffffff <main:493> fatal error! devname[/dev/video0]: unable to query buffer 1 (22). <main:508> fatal error! devname[/dev/video0]: unable to map buffer 1 plane 0, errno(22) <main:512> devname[/dev/video0]: buffer 1 planes 0 mapped at address 0xffffffff <main:493> fatal error! devname[/dev/video0]: unable to query buffer 2 (22). <main:508> fatal error! devname[/dev/video0]: unable to map buffer 2 plane 0, errno(22) <main:512> devname[/dev/video0]: buffer 2 planes 0 mapped at address 0xffffffff <main:493> fatal error! devname[/dev/video0]: unable to query buffer 3 (22). <main:508> fatal error! devname[/dev/video0]: unable to map buffer 3 plane 0, errno(22) <main:512> devname[/dev/video0]: buffer 3 planes 0 mapped at address 0xffffffff <main:493> fatal error! devname[/dev/video0]: unable to query buffer 4 (22). <main:508> fatal error! devname[/dev/video0]: unable to map buffer 4 plane 0, errno(22) <main:512> devname[/dev/video0]: buffer 4 planes 0 mapped at address 0xffffffff <main:580> fatal error! devname[/dev/video0]: unable to queue buffer index 0/5 errno(22) <main:580> fatal error! devname[/dev/video0]: unable to queue buffer index 1/5 errno(22) <main:580> fatal error! devname[/dev/video0]: unable to queue buffer index 2/5 errno(22) <main:580> fatal error! devname[/dev/video0]: unable to queue buffer index 3/5 errno(22) <main:580> fatal error! devname[/dev/video0]: unable to queue buffer index 4/5 errno(22) <main:586> fatal error! stream on fail, ret(-1), errno(22) <main:620> Be careful! devname[/dev/video0] select timeout! <main:620> Be careful! devname[/dev/video0] select timeout! <main:620> Be careful! devname[/dev/video0] select timeout! <main:620> Be careful! devname[/dev/video0] select timeout! ^C<handle_exit:215> user want to e[ 120.531508] [VIN_ERR]video0 has already stream off xit! <handle_exit:219> signal E[ 120.539889] [rk628_mipi]PWR_OFF!do nothing xitFlag:1 <main:611> check ExitFlag:1, exit loop of getting frames <main:710> fatal error! devname[/dev/video0]: unable to unmap buffer 0 (22) <main:710> fatal error! devname[/dev/video0]: unable to unmap buffer 1 (22) <main:710> fatal error! devname[/dev/video0]: unable to unmap buffer 2 (22) <main:710> fatal error! devname[/dev/video0]: unable to unmap buffer 3 (22) <main:710> fatal error! devname[/dev/video0]: unable to unmap buffer 4 (22) <main:787> /root/sample_driverVipp test result: success
root@TinaLinux:/# cat /sys/kernel/debug/mpp/vi ***************************************************** VIN hardware feature list: mcsi 2, ncsi 1, parser 3, isp 1, vipp 4, dma 4 CSI_VERSION: CSI300_200, ISP_VERSION: ISP0_0 CSI_CLK: 396000000, ISP_CLK: 24000000 ***************************************************** vi0: m00_b_rk628-csi 1-0028 => mipi0 => csi0 => tdm_rx0 => isp0 => vipp0 input => hoff: 0, voff: 0, w: 0, h: 0, fmt: UYVY8 output => width: 0, height: 0, fmt: NULL interface: PARALLEL, isp_mode: NORMAL, hflip: 0, vflip: 0 prs_in => x: 0, y: 0, hb: 0, hs: 0 bkbuf => cnt: 0 size: 0 rest: 0, work_mode: online frame => cnt: 0, lost_cnt: 0, error_cnt: 0 internal => avg: 0(ms), max: 0(ms), min: 0(ms) ***************************************************** root@TinaLinux:/#
奇怪的是这里ouput fmt居然是NULL,以前都是INPUT fmt NULL
-
RK628驱动里的 format设置
static struct sensor_format_struct sensor_formats[] = { { .desc = "YUV 4:2:2", .mbus_code = MEDIA_BUS_FMT_UYVY8_2X8, .regs = NULL, .regs_size = 0, .bpp = 2, }, };
Copyright © 2024 深圳全志在线有限公司 粤ICP备2021084185号 粤公网安备44030502007680号