Re: properly set test pattern to a sub-device

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 22-07-15 00:21:29, Kieran Bingham wrote:
> 
> As I understand it - it shouldn't be happening, so I suspect it's something in 
> your CSI2 receiver driver initialising some defaults perhaps.

I've attached 'media-ctl -p' output for clarity.  This is imx8m-mini based board 
on 5.19.0-rc6.

When selecting a test pattern with:

	v4l2-ctl -d /dev/v4l-subdev2 --set-ctrl=test_pattern=2

I get this from v4l2-ctl:

	VIDIOC_S_EXT_CTRLS: failed: Invalid argument
	test_pattern: Invalid argument

but the fun part is that my .s_ctrl() routine receives V4L2_CID_TEST_PATTERN and 
ctrl->val is indeed 2, hence i'm setting sensor registers according to this 
data.

I (falsely) assumed this would be a 'sticky' attribute so when i ask the 
receiver driver (/dev/video0) to start streaming, it wouldn't change the test 
pattern value under my feet.  Instead the imx492 driver once again receive 
V4L2_CID_TEST_PATTERN, this time with ctrl->val == 0, which kind of ruins all 
the fun.

Following you advice, i tried to find which CSI2 driver might be the culprit. 
None of the relevant drivers in drivers/staging/media/imx have v4l2_ctrl_ops 
callback registered.  If that's what i am supposed to look for, which now seems 
unlikely.

Do you have other recommendations about what (and where) should i look next?


		Petko
Media controller API version 5.19.0

Media device information
------------------------
driver          imx7-csi
model           imx-media
serial          
bus info        platform:32e20000.csi
hw revision     0x0
driver version  5.19.0

Device topology
- entity 1: csi (2 pads, 2 links)
            type V4L2 subdev subtype Unknown flags 0
            device node name /dev/v4l-subdev0
	pad0: Sink
		[fmt:SGBRG12_1X12/8192x4320 field:none colorspace:raw xfer:none ycbcr:601 quantization:full-range]
		<- "csis-32e30000.mipi-csi":1 [ENABLED,IMMUTABLE]
	pad1: Source
		[fmt:SGBRG12_1X12/8192x4320 field:none colorspace:raw xfer:none ycbcr:601 quantization:full-range]
		-> "csi capture":0 [ENABLED,IMMUTABLE]

- entity 4: csi capture (1 pad, 1 link)
            type Node subtype V4L flags 0
            device node name /dev/video0
	pad0: Sink
		<- "csi":1 [ENABLED,IMMUTABLE]

- entity 10: csis-32e30000.mipi-csi (2 pads, 2 links)
             type V4L2 subdev subtype Unknown flags 0
             device node name /dev/v4l-subdev1
	pad0: Sink
		[fmt:SGBRG12_1X12/8192x4320 field:none colorspace:raw]
		<- "imx492 1-0010":0 [ENABLED]
	pad1: Source
		[fmt:SGBRG12_1X12/8192x4320 field:none colorspace:raw]
		-> "csi":0 [ENABLED,IMMUTABLE]

- entity 15: imx492 1-0010 (1 pad, 1 link)
             type V4L2 subdev subtype Sensor flags 0
             device node name /dev/v4l-subdev2
	pad0: Source
		[fmt:SGBRG12_1X12/8192x4320 field:none colorspace:raw xfer:none]
		-> "csis-32e30000.mipi-csi":0 [ENABLED]


[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux