UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Explorer
Explorer
1,256 Views
Registered: ‎11-09-2015

IMX274 boot failed

Hi,Dear all,

       I'm currently working on a real-time video compression project using ZCU104 Evaluation Kit and the LI-IMX274MIPI-FMC image sensor daughter card. My IPI project is based on VCU TRD, I remove HDMI-Rx capture pipeline and HDMI-Tx display pipeline part,keep VCU(Video Codec Unit),MIPI CSI-2 Rx capture pipeline and Test pattern generator (TPG). The Tool version is 2018.2(include vivado,xsdk,opensouce linux,u-boot).
     When i unplug the LI-IMX274MIPI-FMC image sensor daughter card, and boot the system,I got a imx274 probe fail with error code -5.

 

[    3.737150] IMX274 1-001a: imx274_set_test_pattern error = -5
[    3.742864] IMX274 1-001a: Error -5 setup default controls
[    3.748392] IMX274: probe of 1-001a failed with error -5
[    3.753991] xilinx-video amba:vcap_tpg: device registered
[    3.759664] xilinx-video amba:vcap_csi: Entity type for entity a00f0000.csiss was not initialized!
[    3.768622] xilinx-video amba:vcap_csi: device registered
[    3.774151] xilinx-video amba:vcap_csi: Entity type for entity a0250000.v_demosaic was not initialized!
[    3.783546] xilinx-demosaic a0250000.v_demosaic: Xilinx Video Demosaic Probe Successful
[    3.791892] xilinx-video amba:vcap_csi: Entity type for entity a0270000.v_gamma was not initialized!
[    3.801025] xilinx-gamma-lut a0270000.v_gamma: Xilinx 8-bit Video Gamma Correction LUT registered
[    3.810090] xilinx-tpg a00e0000.tpg: device found, version 0.000
[    3.816077] xilinx-video amba:vcap_tpg: Entity type for entity a00e0000.tpg was not initialized!
[    3.825195] xilinx-video amba:vcap_csi: Entity type for entity a0240000.csc was not initialized!
[    3.833982] xilinx-vpss-csc a0240000.csc: VPSS CSC 8-bit Color Depth Probe Successful

when I plug the  LI-IMX274MIPI-FMC image sensor daughter card,and boot the system,i got a segment error at boot time. Here are part log:

 

 

[    4.434629] cdns-i2c ff030000.i2c: 400 kHz mmio ff030000 irq 17
[    4.445067] IMX274 1-001a: [imx274_probe][1735]ctrl.handler:ffffffc06d393590
[    4.452039] IMX274 1-001a: imx274_s_ctrl : s_ctrl: Test Pattern, value: 0
[    4.459291] IMX274 1-001a: imx274_s_ctrl : s_ctrl: Gain, value: 5120
[    4.465908] IMX274 1-001a: imx274_s_ctrl : s_ctrl: Exposure, value: 14
[    4.473559] IMX274 1-001a: imx274_s_ctrl : s_ctrl: Vertical Flip, value: 0
[    4.480479] Unable to handle kernel NULL pointer dereference at virtual address 00000020
[    4.488492] Mem abort info:
[    4.491259]   Exception class = DABT (current EL), IL = 32 bits
[    4.497167]   SET = 0, FnV = 0
[    4.500204]   EA = 0, S1PTW = 0
[    4.503322] Data abort info:
[    4.506191]   ISV = 0, ISS = 0x00000005
[    4.510012]   CM = 0, WnR = 0
[    4.512962] [0000000000000020] user address but active_mm is swapper
[    4.519303] Internal error: Oops: 96000005 [#1] SMP
[    4.524156] Modules linked in:
[    4.527196] CPU: 0 PID: 60 Comm: kworker/0:1 Not tainted 4.14.0 #7
[    4.533357] Hardware name: ZynqMP ZCU104 RevC (DT)
[    4.538140] Workqueue: events deferred_probe_work_func
[    4.543252] task: ffffffc06db4ee80 task.stack: ffffff8009200000
[    4.546142] ata2: SATA link down (SStatus 0 SControl 330)
[    4.546176] ata1: SATA link down (SStatus 0 SControl 330)
[    4.559922] PC is at v4l2_ctrl_handler_setup+0x30/0x50
[    4.565040] LR is at v4l2_ctrl_handler_setup+0x2c/0x50
[    4.570161] pc : [<ffffff80086cf5c0>] lr : [<ffffff80086cf5bc>] pstate: 60000045
[    4.577539] sp : ffffff8009203bb0
[    4.580835] x29: ffffff8009203bb0 x28: 0000000000000000 
[    4.586131] x27: 0000000000000000 x26: 0000000000000002 
[    4.591426] x25: ffffff8008acf000 x24: ffffffc06d393668 
[    4.596720] x23: ffffffc06d2f5820 x22: 0000000000000000 
[    4.602015] x21: 0000000000000000 x20: 0000000000000000 
[    4.607310] x19: 0000000000000000 x18: ffffffc06ff72ee0 
[    4.612605] x17: 0000000000000000 x16: 000000000000000b 
[    4.617900] x15: ffffff8008d88000 x14: 0000000000000000 
[    4.623195] x13: ffffffc06ff72e80 x12: 0000000000000000 
[    4.628489] x11: 0000000000000000 x10: 0000000000000880 
[    4.633784] x9 : ffffff80092037b0 x8 : ffffffc06db4f760 
[    4.639079] x7 : ffffffc06ff6ca80 x6 : 0000000000000260 
[    4.644374] x5 : 0000000000000001 x4 : 0000000000000000 
[    4.649668] x3 : ffffffc06db4ee80 x2 : 0000000000000000 
[    4.654963] x1 : ffffffc06db4ee80 x0 : 0000000000000000 
[    4.660259] Process kworker/0:1 (pid: 60, stack limit = 0xffffff8009200000)
[    4.667203] Call trace:
[    4.669633] Exception stack(0xffffff8009203a70 to 0xffffff8009203bb0)
[    4.676058] 3a60:                                   0000000000000000 ffffffc06db4ee80
[    4.683872] 3a80: 0000000000000000 ffffffc06db4ee80 0000000000000000 0000000000000001
[    4.691684] 3aa0: 0000000000000260 ffffffc06ff6ca80 ffffffc06db4f760 ffffff80092037b0
[    4.699496] 3ac0: 0000000000000880 0000000000000000 0000000000000000 ffffffc06ff72e80
[    4.707308] 3ae0: 0000000000000000 ffffff8008d88000 000000000000000b 0000000000000000
[    4.715120] 3b00: ffffffc06ff72ee0 0000000000000000 0000000000000000 0000000000000000
[    4.722932] 3b20: 0000000000000000 ffffffc06d2f5820 ffffffc06d393668 ffffff8008acf000
[    4.730744] 3b40: 0000000000000002 0000000000000000 0000000000000000 ffffff8009203bb0
[    4.738556] 3b60: ffffff80086cf5bc ffffff8009203bb0 ffffff80086cf5c0 0000000060000045
[    4.746368] 3b80: ffffffc06d393590 0000000000000000 ffffffffffffffff ffffffc06d393590
[    4.754179] 3ba0: ffffff8009203bb0 ffffff80086cf5c0
[    4.759039] [<ffffff80086cf5c0>] v4l2_ctrl_handler_setup+0x30/0x50
[    4.765204] [<ffffff80086bbcec>] imx274_probe+0x29c/0x4e8
[    4.770584] [<ffffff80086b1b2c>] i2c_device_probe+0x294/0x2b8
[    4.776313] [<ffffff800855c67c>] driver_probe_device+0x22c/0x2d8
[    4.782302] [<ffffff800855c880>] __device_attach_driver+0x98/0xf0
[    4.788378] [<ffffff800855a8e0>] bus_for_each_drv+0x48/0x98
[    4.793933] [<ffffff800855c328>] __device_attach+0xc0/0x130
[    4.799488] [<ffffff800855c930>] device_initial_probe+0x10/0x18
[    4.805390] [<ffffff800855b810>] bus_probe_device+0x90/0x98
[    4.810946] [<ffffff800855bcac>] deferred_probe_work_func+0xa4/0x148
[    4.817284] [<ffffff80080b1a14>] process_one_work+0x1d4/0x338
[    4.823011] [<ffffff80080b1dc0>] worker_thread+0x248/0x488
[    4.828480] [<ffffff80080b7754>] kthread+0x12c/0x130
[    4.833427] [<ffffff8008084a60>] ret_from_fork+0x10/0x18
[    4.838723] Code: 940c6614 aa1303e0 97fff95e 2a0003f4 (f9401260) 
[    4.844797] ---[ end trace 10d8ce135a06a8c9 ]---
[    5.603914] [drm] Cannot find any crtc or sizes

 Accord to the PC point to v4l2_ctrl_handler_setup+0x30/0x50.(PC is at v4l2_ctrl_handler_setup+0x30/0x50) , so I want to know the v4l2_ctrl_handler_setup() function's memory address.

zynq@mi-pc:~/project/opensource/linux/linux-xlnx-xilinx-v2018.2$ grep "v4l2_ctrl_handler_setup" System.map 
ffffff80086cdb30 T __v4l2_ctrl_handler_setup
ffffff80086cf590 T v4l2_ctrl_handler_setup
ffffff8008ca90f8 r __ksymtab_v4l2_ctrl_handler_setup
ffffff8008caaf18 r __ksymtab___v4l2_ctrl_handler_setup
ffffff8008cdf970 r __kstrtab_v4l2_ctrl_handler_setup
ffffff8008cdf988 r __kstrtab___v4l2_ctrl_handler_setup

The PC is 0xffffff80086cf590 plus 0x30 (0xFFFFFF80086CF5C0).When i got PC's address,I use gdb to find where PC stop at source code .

zynq@mi-pc:~/project/opensource/linux/linux-xlnx-xilinx-v2018.2$ aarch64-linux-gnu-gdb vmlinux
GNU gdb (GDB) 8.0.1.20171214-git
Copyright (C) 2017 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "--host=x86_64-pc-linux-gnu --target=aarch64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from vmlinux...done.
(gdb) b *0xFFFFFF80086CF5C0
Breakpoint 1 at 0xffffff80086cf5c0: file drivers/media/v4l2-core/v4l2-ctrls.c, line 2499.
(gdb) 

accord to the Breakpoint 1 at gdb,I got the memory segment error code。

41356f68-2743-4adb-a9d5-559b8ecd2b3d.png

mutex_unlock(hdl->lock); 

I don't know how to slove this problem,any suggestions would be appreciated.

 

BRs,

HSQ

 

0 Kudos
1 Reply
Explorer
Explorer
1,220 Views
Registered: ‎11-09-2015

Re: IMX274 boot failed

update:

        I add printk at __v4l2_ctrl_hander_setup(),the painc missing.

int __v4l2_ctrl_handler_setup(struct v4l2_ctrl_handler *hdl)
{
	struct v4l2_ctrl *ctrl;
	int ret = 0;

	if (hdl == NULL)
		return 0;
	printk("[%s][%s][%d]lock:%p\n",__FILE__,__func__,__LINE__,hdl->lock);
	lockdep_assert_held(hdl->lock);
	//printk("[%s][%s][%d]lock:%p\n",__FILE__,__func__,__LINE__,hdl->lock);

	list_for_each_entry(ctrl, &hdl->ctrls, node)
		ctrl->done = false;

	list_for_each_entry(ctrl, &hdl->ctrls, node) {
		struct v4l2_ctrl *master = ctrl->cluster[0];
		int i;

		/* Skip if this control was already handled by a cluster. */
		/* Skip button controls and read-only controls. */
		if (ctrl->done || ctrl->type == V4L2_CTRL_TYPE_BUTTON ||
		    (ctrl->flags & V4L2_CTRL_FLAG_READ_ONLY))
			continue;

		for (i = 0; i < master->ncontrols; i++) {
			if (master->cluster[i]) {
				cur_to_new(master->cluster[i]);
				master->cluster[i]->is_new = 1;
				master->cluster[i]->done = true;
			}
		}
		ret = call_op(master, s_ctrl);
		if (ret)
			break;
	}

	return ret;
}

 

 

0 Kudos