All of lore.kernel.org
 help / color / mirror / Atom feed
From: Patrik Gfeller <patrik.gfeller@gmail.com>
To: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Cc: linux-media@vger.kernel.org
Subject: Re: atomisp kernel driver(s)
Date: Sat, 2 May 2020 16:29:51 +0200	[thread overview]
Message-ID: <20200502162951.0ad8a080@ASUS> (raw)
In-Reply-To: <20200502113414.618964a9@coco.lan>

On Sat, 2 May 2020 11:34:14 +0200
Mauro Carvalho Chehab <mchehab+huawei@kernel.org> wrote:

> Em Sat, 2 May 2020 10:15:42 +0200
> Patrik Gfeller <patrik.gfeller@gmail.com> escreveu:
> 
>  [...]  
>  [...]  
> 
> > > Ok. Btw, there is a driver for Atomisp on an yocto tree:
> > > 
> > > 	https://github.com/intel-aero/meta-intel-aero.git
> > > 
> > > It got removed back in 2018, but if you checkout this changeset:
> > > 
> > > 	Merge: db1df368eb58 08f476112708
> > > 	Author: Lucas De Marchi <lucas.demarchi@intel.com>
> > > 	Date:   Tue Apr 4 11:51:42 2017 -0700
> > > 
> > > 	    Merge pull request #70 from zehortigoza/jam
> > >         
> > 
> > Cool, the code might give additional information.  
> 
> Yes. And, as it was released from Intel for a specific device,
> it should very likely work for the model supported there (with
> the Yocto 4.4 Kernel). So, it could be valuable to help identifying
> if some of the cleanup patches would have broken something.
> 
> ON a quick look, it sounds that such build was is targeted for
> ISP2401:
> 
> 	+++ b/drivers/media/pci/atomisp/Makefile
> 	@@ -0,0 +1 @@
> 	+obj-$(CONFIG_VIDEO_ATOMISP) += css2401a0_v21_build/
> 
> > I've also send a
> > request regarding the firmware and HW documentation to the author and
> > the engineers that signed the patch. The firmware in the patch has a
> > different version string and the size is surprisingly a few MB bigger
> > than the one I used for the first experiment.   
> 
> There are some vendors that generate a firmware together with a source
> code. This could be the case here. That's my feeling when looking into
> a file like:
> 
> 	drivers/staging/media/atomisp/pci/css_2401_system/spmem_dump.c
> 
> Which contains lots of addresses that it is different betwen 2401 and
> 2400.
> 
> If so, using a different firmware version will likely cause at least
> some parts of the driver to fail.
> 
> 
>  [...]  
>  [...]  
> > 
> > It looks a this firmware is for the 2400 variant; I could also not
> > extract the irci version string. Thus I'll not try them for the moment
> > to perform experiments.  
> 
> Ok.
> 
>  [...]  
> > 
> > It identifies itself as irci_stable_bw10p_0518_20150801_0537;   
> 
> Same year as what we had. Just a little older. Yeah, some things there
> could work.

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):

[    9.072291] mc: Linux media interface: v0.10
[    9.156498] videodev: Linux video capture interface: v2.00
[    9.237603] atomisp_ov2680: loading out-of-tree module taints kernel.
[    9.240478] atomisp_ov2680: module is from the staging directory, the quality is unknown, you have been warned.
[    9.323975] ov2680 i2c-OVTI2680:00: gmin: initializing atomisp module subdev data.PMIC ID 1
[    9.334204] ov2680 i2c-OVTI2680:00: supply V1P2A not found, using dummy regulator
[    9.346739] ov2680 i2c-OVTI2680:00: supply VPROG4B not found, using dummy regulator
[    9.357528] ov2680 i2c-OVTI2680:00: supply Regulator1p8v not found, using dummy regulator
[    9.373085] ov2680 i2c-OVTI2680:00: supply Regulator2p8v not found, using dummy regulator
[    9.418879] atomisp_ov2680: module is from the staging directory, the quality is unknown, you have been warned.
[    9.446467] ov2680 i2c-OVTI2680:00: unable to set PMC rate 1
[    9.474456] ov2680 i2c-OVTI2680:00: camera pdata: port: 1 lanes: 1 order: 00000002
[    9.474533] input: Intel HDMI/DP LPE Audio HDMI/DP,pcm=0 as /devices/pci0000:00/0000:00:02.0/hdmi-lpe-audio/sound/card0/input17
[    9.483924] ov2680 i2c-OVTI2680:00: sensor_revision id = 0x2680, rev= 0
[    9.491798] ov2680 i2c-OVTI2680:00: register atomisp i2c module type 1
[    9.549017] atomisp: module is from the staging directory, the quality is unknown, you have been warned.
[    9.738785] atomisp-isp2 0000:00:03.0: enabling device (0000 -> 0002)
[    9.802937] atomisp-isp2 0000:00:03.0: ISP HPLL frequency base = 1600 MHz
[   10.052114] atomisp-isp2 0000:00:03.0: Subdev OVTI2680:00 successfully register
[   10.056691] atomisp-isp2 0000:00:03.0: Entity type for entity ATOM ISP CSI2-port0 was not initialized!
[   10.061721] atomisp-isp2 0000:00:03.0: Entity type for entity ATOM ISP CSI2-port1 was not initialized!
[   10.071887] atomisp-isp2 0000:00:03.0: Entity type for entity ATOM ISP CSI2-port2 was not initialized!
[   10.071901] atomisp-isp2 0000:00:03.0: Entity type for entity file_input_subdev was not initialized!
[   10.080785] atomisp-isp2 0000:00:03.0: Entity type for entity tpg_subdev was not initialized!
[   10.084988] atomisp-isp2 0000:00:03.0: Entity type for entity ATOMISP_SUBDEV_0 was not initialized!
[   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]
[   10.097258] Modules linked in: irqbypass snd_intel_sst_acpi(+) snd_seq_midi punit_atom_debug snd_intel_sst_core snd_seq_midi_event snd_soc_sst_atom_hifi2_platform intel_cstate snd_soc_acpi_intel_match snd_soc_acpi snd_soc_rt5645(+) ath10k_pci joydev snd_soc_rl6231 ath10k_core snd_soc_core snd_rawmidi asus_nb_wmi efi_pstore hid_sensor_gyro_3d atomisp(CO+) snd_compress hid_sensor_accel_3d hid_sensor_trigger intel_chtdc_ti_pwrbtn ath industrialio_triggered_buffer ac97_bus mac80211 snd_hdmi_lpe_audio kfifo_buf snd_pcm_dmaengine hid_sensor_iio_common hid_multitouch intel_xhci_usb_role_switch cfg80211 industrialio snd_pcm libarc4 roles cros_ec_ishtp mei_txe processor_thermal_device cros_ec atomisp_ov2680(CO) intel_rapl_common mei snd_seq videobuf_vmalloc intel_soc_dts_iosf videobuf_core snd_seq_device snd_timer snd videodev mc intel_hid 8250_dw spi_pxa2xx_platform soundcore int3400_thermal acpi_thermal_rel int3403_thermal soc_button_array acpi_pad int3406_thermal dw_dmac int340x_thermal
 _zone
[   10.097306]  dw_dmac_core intel_int0002_vgpio 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_ishtp_hid hid_asus asus_wmi sparse_keymap crct10dif_pclmul crc32_pclmul ghash_clmulni_intel mmc_block hid_generic i915 aesni_intel i2c_algo_bit crypto_simd drm_kms_helper cryptd glue_helper syscopyarea sysfillrect sysimgblt fb_sys_fops usbhid cec lpc_ich drm intel_ish_ipc intel_ishtp wmi i2c_hid intel_soc_pmic_chtdc_ti video hid sdhci_acpi sdhci
[   10.144416] CPU: 1 PID: 503 Comm: systemd-udevd Tainted: G         C O      5.7.0-rc1+ #2
[   10.144429] intel_sst_acpi 808622A8:00: SHIM base: 0x91540000
[   10.148909] Hardware name: ASUSTeK COMPUTER INC. T101HA/T101HA, BIOS T101HA.305 01/24/2018
[   10.148930] RIP: 0010:__video_register_device+0x93e/0x1120 [videodev]
[   10.148936] 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.148938] RSP: 0018:ffffbb0b0065b940 EFLAGS: 00010246
[   10.148941] RAX: ffff982c6a80c028 RBX: ffff982c771a0fd0 RCX: 0000000000000000
[   10.148948] RDX: 00000000ffffffff RSI: 0000000000000000 RDI: ffff982c771a0fd0
[   10.186454] RBP: ffffbb0b0065b990 R08: ffffffffc0ccaf40 R09: 0000000000000000
[   10.191217] R10: 0000000000000000 R11: 0000000000000001 R12: 00000000ffffffff
[   10.195989] R13: ffffffffc0ccaf40 R14: 0000000000000000 R15: 0000000000000001
[   10.200763] FS:  00007fc84cccd880(0000) GS:ffff982c7be80000(0000) knlGS:0000000000000000
[   10.205557] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[   10.210325] CR2: 000055d999a9a998 CR3: 00000001704be000 CR4: 00000000001006e0
[   10.215153] Call Trace:
[   10.219992]  atomisp_video_register+0x33/0x50 [atomisp]
[   10.224839]  atomisp_subdev_register_entities+0x39/0xd0 [atomisp]
[   10.224887]  atomisp_pci_probe.cold.19+0x71a/0x116f [atomisp]
[   10.234924]  local_pci_probe+0x47/0x80
[   10.234928]  pci_device_probe+0xff/0x1b0
[   10.234935]  really_probe+0x1c8/0x3e0
[   10.234942]  driver_probe_device+0xd9/0x120
[   10.245045]  device_driver_attach+0x58/0x60
[   10.245049]  __driver_attach+0x8f/0x150
[   10.245053]  ? device_driver_attach+0x60/0x60
[   10.245056]  ? device_driver_attach+0x60/0x60
[   10.245061]  bus_for_each_dev+0x79/0xc0
[   10.293310]  ? kmem_cache_alloc_trace+0x167/0x230
[   10.298004]  driver_attach+0x1e/0x20
[   10.302623]  bus_add_driver+0x154/0x1f0
[   10.307229]  ? 0xffffffffc0bf6000
[   10.311819]  driver_register+0x70/0xc0
[   10.316432]  ? 0xffffffffc0bf6000
[   10.316435]  __pci_register_driver+0x54/0x60
[   10.316476]  atomisp_pci_driver_init+0x23/0x1000 [atomisp]
[   10.316480]  do_one_initcall+0x4a/0x200
[   10.316484]  ? kfree+0x22e/0x250
[   10.316488]  ? _cond_resched+0x19/0x30
[   10.316491]  ? kmem_cache_alloc_trace+0x167/0x230
[   10.316496]  do_init_module+0x60/0x230
[   10.316499]  load_module+0x224a/0x24e0
[   10.316506]  __do_sys_finit_module+0xbd/0x120
[   10.316509]  ? __do_sys_finit_module+0xbd/0x120
[   10.316513]  __x64_sys_finit_module+0x1a/0x20
[   10.316517]  do_syscall_64+0x57/0x1b0
[   10.316521]  entry_SYSCALL_64_after_hwframe+0x44/0xa9
[   10.316524] RIP: 0033:0x7fc84d24194d
[   10.316528] 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.316529] RSP: 002b:00007fffd0506a88 EFLAGS: 00000246 ORIG_RAX: 0000000000000139
[   10.316532] RAX: ffffffffffffffda RBX: 000055d999a78560 RCX: 00007fc84d24194d
[   10.316534] RDX: 0000000000000000 RSI: 00007fc84d11ecad RDI: 000000000000000f
[   10.316535] RBP: 0000000000020000 R08: 0000000000000000 R09: 0000000000000000
[   10.316537] R10: 000000000000000f R11: 0000000000000246 R12: 00007fc84d11ecad
[   10.316538] R13: 0000000000000000 R14: 000055d999a8b4c0 R15: 000055d999a78560
[   10.316543] ---[ end trace 7f4c17cfaa1f3f65 ]---
[   10.316618] atomisp-isp2 0000:00:03.0: atomisp_video_register: could not register video device (-22)
[   10.333529] atomisp-isp2 0000:00:03.0: atomisp_subdev_register_entities fail
[   10.366495] atomisp-isp2 0000:00:03.0: atomisp_register_entities failed (-22)

> 
> > I'll give
> > that one a try first. As usual it will unfortunately take some time
> > until I get back to you with the results, as every experiment takes
> > many hours (building the kernel on what is essentially a tablet takes
> > time).  
> 
> I would suggest you to build on some other machine. Btw, you don't need
> to build everything every time. If you build atomisp as a module, you
> could do, instead:
> 
> 	$ make modules_prepare && make M=drivers/staging/media/atomisp
> 
> This will build just the new module(s).

Thanks; that is a huge time saver.

> 
> > > > [    9.691775] cpu_latency_qos_update_request called for unknown object  
> 
> Btw, the patch I send earlier today should fix this issue.
> 

Yep - looks like this one is gone :-).

> 
> I need to understand a little bit more about how ACPI is supposed to
> detect and register regulators. While using regulators with DT is very
> common, not many places use it for ACPI. 
> 
> I'm suspecting that, before being able of calling regulator_get(),
> the code should use some match logic to get the regulators on this
> board and call regulator_register().
> 
> Please run this command on your tablet:
> 
> 	$ sudo cat /sys/kernel/debug/regulator/supply_map
> 
> If this returns nothing - as I suspect - then calling regulator_get()
> won't be doing anything. 

The statement to read the supply_map did return nothing, as you'd
expected.

> 
> Thanks,
> Mauro

with kind regards,
Patrik

  reply	other threads:[~2020-05-02 14:30 UTC|newest]

Thread overview: 70+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-18 14:39 atomisp kernel driver(s) Patrik Gfeller
2020-04-18 15:25 ` Mauro Carvalho Chehab
2020-04-18 15:26   ` Mauro Carvalho Chehab
2020-04-18 15:37     ` Patrik Gfeller
2020-04-19 23:31       ` Mauro Carvalho Chehab
2020-04-20 17:48         ` Patrik Gfeller
2020-04-20 18:27           ` Patrik Gfeller
2020-04-20 20:47             ` Mauro Carvalho Chehab
2020-04-22 17:56               ` Patrik Gfeller
2020-04-22 19:13                 ` Mauro Carvalho Chehab
2020-04-24  8:52                   ` Patrik Gfeller
2020-04-24  9:10                     ` Patrik Gfeller
2020-04-24 10:07                       ` Patrik Gfeller
2020-04-24 13:58                         ` Patrik Gfeller
2020-04-25 11:22                         ` Mauro Carvalho Chehab
2020-04-26 11:38                           ` Patrik Gfeller
2020-04-26 16:50                             ` Mauro Carvalho Chehab
2020-04-27 18:31                               ` Patrik Gfeller
2020-04-27 21:50                                 ` Mauro Carvalho Chehab
2020-04-28 17:59                                   ` Patrik Gfeller
2020-04-28 23:13                                     ` Mauro Carvalho Chehab
2020-04-29 17:56                                       ` Patrik Gfeller
2020-04-29 18:17                                         ` Mauro Carvalho Chehab
2020-04-30  7:56                                           ` Patrik Gfeller
2020-04-30 10:55                                             ` Mauro Carvalho Chehab
2020-04-30 15:09                                               ` Patrik Gfeller
2020-04-30 22:25                                                 ` Mauro Carvalho Chehab
2020-05-01  8:54                                                   ` Patrik Gfeller
2020-05-01  9:38                                                     ` Mauro Carvalho Chehab
2020-05-01 17:31                                                       ` Patrik Gfeller
2020-05-01 19:30                                                         ` Mauro Carvalho Chehab
2020-05-02  8:15                                                           ` Patrik Gfeller
2020-05-02  9:20                                                             ` Patrik Gfeller
2020-05-02 10:00                                                               ` Mauro Carvalho Chehab
2020-05-02  9:34                                                             ` Mauro Carvalho Chehab
2020-05-02 14:29                                                               ` Patrik Gfeller [this message]
2020-05-02 16:28                                                                 ` Mauro Carvalho Chehab
2020-05-02 18:23                                                                   ` Patrik Gfeller
2020-05-02 14:50                                                               ` Patrik Gfeller
2020-05-01 20:56                                                         ` [PATCH] media: atomisp: use add_qos_request instead of update Mauro Carvalho Chehab
2020-04-18 15:29   ` atomisp kernel driver(s) Patrik Gfeller
2020-04-25  2:39 ` Laurent Pinchart
2020-04-25 10:36   ` Patrik Gfeller
2020-04-25 12:19     ` Mauro Carvalho Chehab
2020-04-26 19:07       ` Laurent Pinchart
2020-04-26 20:51         ` Mauro Carvalho Chehab
2020-04-26 19:33     ` Laurent Pinchart
2020-04-28 18:13       ` Patrik Gfeller
2020-04-26  7:44   ` Patrik Gfeller
2020-04-26 19:17     ` Laurent Pinchart
2020-04-29 17:59       ` Patrik Gfeller
2020-04-29 18:19         ` Laurent Pinchart
2020-04-30 15:28           ` Patrik Gfeller
2020-05-02 16:08 ` Andy Shevchenko
2020-05-02 17:04   ` Mauro Carvalho Chehab
2020-05-02 17:33     ` Andy Shevchenko
2020-05-03 10:18       ` Mauro Carvalho Chehab
2020-05-12 10:20       ` Mauro Carvalho Chehab
2020-05-12 11:12         ` Andy Shevchenko
2020-05-12 11:21           ` Andy Shevchenko
2020-05-12 14:56             ` Mauro Carvalho Chehab
2020-05-12 16:01               ` Andy Shevchenko
2020-05-13 18:36                 ` Patrik Gfeller
2020-05-20  8:04                 ` Mauro Carvalho Chehab
2020-05-13  9:56               ` Mauro Carvalho Chehab
2020-05-03  8:46   ` Patrik Gfeller
2020-05-03 10:23     ` Mauro Carvalho Chehab
2020-05-03 12:31       ` Patrik Gfeller
2020-05-03 13:36         ` Patrik Gfeller
2020-05-03 14:43         ` Mauro Carvalho Chehab

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200502162951.0ad8a080@ASUS \
    --to=patrik.gfeller@gmail.com \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab+huawei@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.