Re: atomisp kernel driver(s)

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

 



On Sat, 2 May 2020 18:28:37 +0200
Mauro Carvalho Chehab <mchehab+huawei@xxxxxxxxxx> wrote:

> Em Sat, 2 May 2020 16:29:51 +0200
> Patrik Gfeller <patrik.gfeller@xxxxxxxxx> escreveu:
> 
> > On Sat, 2 May 2020 11:34:14 +0200
> > Mauro Carvalho Chehab <mchehab+huawei@xxxxxxxxxx> wrote:
> >    
>  [...]  
> > 
> > Below the result from the test with
> > irci_stable_bw10p_0518_20150801_0537 - looks like it loaded the
> > firmare; I got an a message when the file was not present, or the
> > version did not add up. I tried to cleanup the dmesg output a little
> > (removed what was unrelated to atom-isp):  
> 
> > [   10.089196] ------------[ cut here ]------------
> > [   10.093225] WARNING: CPU: 1 PID: 503 at drivers/media/v4l2-core/v4l2-dev.c:885 __video_register_device+0x93e/0x1120 [videodev]  
> 
> That's due to a change at the media core that added this test:
> 
> 	/* the device_caps field MUST be set for all but subdevs */
> 	if (WARN_ON(type != VFL_TYPE_SUBDEV && !vdev->device_caps))
> 		return -EINVAL;
> 
> Added on this patch:
> 
> 	commit 3c1350501c21db8e3b1a38d9e97db29694305c3b
> 	Author: Hans Verkuil <hverkuil-cisco@xxxxxxxxx>
> 	Date:   Tue Jul 23 04:21:25 2019 -0400
> 
> 	    media: v4l2-dev/ioctl: require non-zero device_caps, verify sane querycap results
>     
> 	    Now that all V4L2 drivers set device_caps in struct video_device, we can add
> 	    a check for this to ensure all future drivers fill this in.
> 
> Fixing it is simple. Just sent a patch.

I applied your patch; here the resulting messages (did not compile full kernel, but only the module):
[    9.261205] kernel: videodev: Linux video capture interface: v2.00
[    9.285172] kernel: atomisp_ov2680: loading out-of-tree module taints kernel.
[    9.287930] kernel: atomisp_ov2680: module is from the staging directory, the quality is unknown, you have been warned.
[    9.337584] kernel: ov2680 i2c-OVTI2680:00: gmin: initializing atomisp module subdev data.PMIC ID 1
[    9.342193] kernel: ov2680 i2c-OVTI2680:00: supply V1P2A not found, using dummy regulator
[    9.346278] kernel: ov2680 i2c-OVTI2680:00: supply VPROG4B not found, using dummy regulator
[    9.350419] kernel: ov2680 i2c-OVTI2680:00: supply Regulator1p8v not found, using dummy regulator
[    9.354530] kernel: ov2680 i2c-OVTI2680:00: supply Regulator2p8v not found, using dummy regulator
[    9.375913] kernel: proc_thermal 0000:00:0b.0: enabling device (0000 -> 0002)
[    9.405529] kernel: ov2680 i2c-OVTI2680:00: unable to set PMC rate 1
[    9.427136] kernel: atomisp: module is from the staging directory, the quality is unknown, you have been warned.
[    9.433835] kernel: ov2680 i2c-OVTI2680:00: camera pdata: port: 1 lanes: 1 order: 00000002
[    9.438446] kernel: ov2680 i2c-OVTI2680:00: sensor_revision id = 0x2680, rev= 0
[    9.441739] kernel: ov2680 i2c-OVTI2680:00: register atomisp i2c module type 1
[    9.544474] kernel: atomisp-isp2 0000:00:03.0: enabling device (0000 -> 0002)
[    9.573919] kernel: atomisp-isp2 0000:00:03.0: ISP HPLL frequency base = 1600 MHz
[    9.829161] kernel: atomisp-isp2 0000:00:03.0: Subdev OVTI2680:00 successfully register
[    9.833264] kernel: atomisp-isp2 0000:00:03.0: Entity type for entity ATOM ISP CSI2-port0 was not initialized!
[    9.852847] kernel: atomisp-isp2 0000:00:03.0: Entity type for entity ATOM ISP CSI2-port1 was not initialized!
[    9.894230] kernel: atomisp-isp2 0000:00:03.0: Entity type for entity ATOM ISP CSI2-port2 was not initialized!
[    9.899609] kernel: atomisp-isp2 0000:00:03.0: Entity type for entity file_input_subdev was not initialized!
[    9.909981] kernel: atomisp-isp2 0000:00:03.0: Entity type for entity tpg_subdev was not initialized!
[    9.914186] kernel: atomisp-isp2 0000:00:03.0: Entity type for entity ATOMISP_SUBDEV_0 was not initialized!
[    9.941592] kernel: ------------[ cut here ]------------
[    9.945885] kernel: WARNING: CPU: 2 PID: 515 at drivers/media/v4l2-core/v4l2-dev.c:885 __video_register_device+0x93e/0x1120 [videodev]
[    9.950250] kernel: Modules linked in: irqbypass snd_seq_midi punit_atom_debug snd_compress intel_cstate ac97_bus mac80211(+) snd_pcm_dmaengine snd_seq_midi_event asus_nb_wmi snd_rawmidi snd_hdmi_lpe_audio(+) efi_pstore hid_sensor_gyro_3d hid_sensor_accel_3d intel_chtdc_ti_pwrbtn hid_sensor_trigger industrialio_triggered_buffer kfifo_buf snd_pcm snd_seq hid_multitouch(+) cfg80211 hid_sensor_iio_common atomisp(CO+) industrialio mei_txe videobuf_vmalloc snd_seq_device processor_thermal_device intel_rapl_common libarc4 videobuf_core cros_ec_ishtp snd_timer intel_soc_dts_iosf intel_xhci_usb_role_switch cros_ec mei atomisp_ov2680(CO) roles videodev snd spi_pxa2xx_platform mc intel_hid 8250_dw dw_dmac soundcore dw_dmac_core int3400_thermal soc_button_array int3403_thermal acpi_thermal_rel intel_int0002_vgpio int3406_thermal int340x_thermal_zone acpi_pad mac_hid sch_fq_codel parport_pc ppdev lp parport ip_tables x_tables autofs4 hid_sensor_custom hid_sensor_hub intel_ishtp_loader intel_i
 shtp_hid hid_asus
[    9.950303] kernel:  asus_wmi sparse_keymap crct10dif_pclmul crc32_pclmul ghash_clmulni_intel i915 hid_generic mmc_block i2c_algo_bit aesni_intel drm_kms_helper crypto_simd syscopyarea sysfillrect sysimgblt cryptd fb_sys_fops glue_helper cec usbhid intel_ish_ipc drm wmi lpc_ich intel_ishtp video i2c_hid intel_soc_pmic_chtdc_ti hid sdhci_acpi sdhci
[    9.999137] kernel: CPU: 2 PID: 515 Comm: systemd-udevd Tainted: G         C O      5.7.0-rc1+ #2
[   10.004479] kernel: Hardware name: ASUSTeK COMPUTER INC. T101HA/T101HA, BIOS T101HA.305 01/24/2018
[   10.009868] kernel: RIP: 0010:__video_register_device+0x93e/0x1120 [videodev]
[   10.015264] kernel: Code: 00 76 54 83 f8 04 0f 84 b9 06 00 00 0f 82 9b 00 00 00 83 f8 05 0f 85 ee 00 00 00 c7 43 2c 01 00 01 00 41 bc 05 02 00 00 eb 4b <0f> 0b 41 bd ea ff ff ff 48 8b 7d d0 65 48 33 3c 25 28 00 00 00 44
[   10.026427] kernel: RSP: 0018:ffffb3fe00713940 EFLAGS: 00010246
[   10.032023] kernel: RAX: ffff94f8e9eb4028 RBX: ffff94f8ed863310 RCX: 0000000000000000
[   10.037660] kernel: RDX: 00000000ffffffff RSI: 0000000000000000 RDI: ffff94f8ed863310
[   10.043308] kernel: RBP: ffffb3fe00713990 R08: ffffffffc07c4f40 R09: ffff94f8fb403500
[   10.048952] kernel: R10: ffffffffffffe002 R11: 0000000000000000 R12: 00000000ffffffff
[   10.054589] kernel: R13: ffffffffc07c4f40 R14: 0000000000000000 R15: 0000000000000001
[   10.060175] kernel: FS:  00007f0f204f6880(0000) GS:ffff94f8fbf00000(0000) knlGS:0000000000000000
[   10.065821] kernel: CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[   10.071389] kernel: CR2: 00007f0f20aee421 CR3: 000000016b600000 CR4: 00000000001006e0
[   10.076891] kernel: Call Trace:
[   10.082382] kernel:  atomisp_acc_register+0x33/0x50 [atomisp]
[   10.087791] kernel:  atomisp_subdev_register_entities+0x91/0xd0 [atomisp]
[   10.093106] kernel:  atomisp_pci_probe.cold.19+0x71a/0x116f [atomisp]
[   10.098279] kernel:  local_pci_probe+0x47/0x80
[   10.103406] kernel:  pci_device_probe+0xff/0x1b0
[   10.108443] kernel:  really_probe+0x1c8/0x3e0
[   10.113376] kernel:  driver_probe_device+0xd9/0x120
[   10.118297] kernel:  device_driver_attach+0x58/0x60
[   10.123219] kernel:  __driver_attach+0x8f/0x150
[   10.128146] kernel:  ? device_driver_attach+0x60/0x60
[   10.132994] kernel:  ? device_driver_attach+0x60/0x60
[   10.137715] kernel:  bus_for_each_dev+0x79/0xc0
[   10.142440] kernel:  ? kmem_cache_alloc_trace+0x167/0x230
[   10.147147] kernel:  driver_attach+0x1e/0x20
[   10.151807] kernel:  bus_add_driver+0x154/0x1f0
[   10.156372] kernel:  ? 0xffffffffc07ff000
[   10.160844] kernel:  driver_register+0x70/0xc0
[   10.165248] kernel:  ? 0xffffffffc07ff000
[   10.169579] kernel:  __pci_register_driver+0x54/0x60
[   10.173966] kernel:  atomisp_pci_driver_init+0x23/0x1000 [atomisp]
[   10.178334] kernel:  do_one_initcall+0x4a/0x200
[   10.182676] kernel:  ? kfree+0x22e/0x250
[   10.186913] kernel:  ? _cond_resched+0x19/0x30
[   10.191055] kernel:  ? kmem_cache_alloc_trace+0x167/0x230
[   10.195131] kernel:  do_init_module+0x60/0x230
[   10.199083] kernel:  load_module+0x224a/0x24e0
[   10.201809] kernel: hid-multitouch 0018:0457:11ED.0003: input,hidraw2: I2C HID v1.00 Device [SIS0457:00 0457:11ED] on i2c-SIS0457:00
[   10.202893] kernel:  __do_sys_finit_module+0xbd/0x120
[   10.210562] kernel:  ? __do_sys_finit_module+0xbd/0x120
[   10.214169] kernel:  __x64_sys_finit_module+0x1a/0x20
[   10.217634] kernel:  do_syscall_64+0x57/0x1b0
[   10.220961] kernel:  entry_SYSCALL_64_after_hwframe+0x44/0xa9
[   10.224188] kernel: RIP: 0033:0x7f0f20a6a94d
[   10.227270] kernel: Code: 00 c3 66 2e 0f 1f 84 00 00 00 00 00 90 f3 0f 1e fa 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 13 e5 0c 00 f7 d8 64 89 01 48
[   10.233595] kernel: RSP: 002b:00007fff22cf5488 EFLAGS: 00000246 ORIG_RAX: 0000000000000139
[   10.236770] kernel: RAX: ffffffffffffffda RBX: 00005599a433b560 RCX: 00007f0f20a6a94d
[   10.239918] kernel: RDX: 0000000000000000 RSI: 00007f0f20947cad RDI: 0000000000000010
[   10.242986] kernel: RBP: 0000000000020000 R08: 0000000000000000 R09: 0000000000000000
[   10.242988] kernel: R10: 0000000000000010 R11: 0000000000000246 R12: 00007f0f20947cad
[   10.242990] kernel: R13: 0000000000000000 R14: 00005599a43820d0 R15: 00005599a433b560
[   10.243000] kernel: ---[ end trace c4f253dd02f49f40 ]---
[   10.254587] kernel: atomisp-isp2 0000:00:03.0: atomisp_acc_register: could not register video device (-22)

I always fear I load the wrong version. Is there a way I could add a
version (which I would increase for each patch) that then can be
checked, e.g. by modinfo?

> 
>  [...]  
> > 
> > The statement to read the supply_map did return nothing, as you'd
> > expected.  
> 
> Ok. That explains why register_get() failed ;-)
> 
> If this time the probing part works, I guess the next step would
> be to use some tools from https://git.linuxtv.org/v4l-utils.git/,
> in order to test the stuff that doesn't depend on the sensors,
> as, without the regulator settings, it won't be turned on.
> 
> The simplest test would be to run:
> 
> 	$ v4l2-ctl --all -d /dev/video0
> 
> (and the same for the other /dev/video? nodes created by the driver)
> 

Unfortunately I'm not sure if the driver already creates the devices, 
"$ ls /dev | grep video" did not return anything. Anyway - I'll download
the tools to be prepared. I will try your command - maybe I
misunderstand and the ctl call creates the device nodes.

> -
> 
> A more complete test would be to run v4l2-compliance (without
> enabling streaming), but let's first check if v4l2-ctl won't
> hit any Kernel bugs.
> 
> Thanks,
> Mauro

with kind regards,
Patrik




[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