Re: [REGRESSION] tegra124: nyan-big: kernel 5.0 with VIC not booting

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

 




Am 05.03.19 um 10:19 schrieb Thierry Reding:
On Mon, Mar 04, 2019 at 10:10:45PM +0100, Tristan Bastian wrote:
Hello Thierry,

You've enabled the video image compositor for tegra124 with commit:
3dde5a2342cd204df15b6b0b90ee0ed4542225ca
I'm not able to bootup a 5.0 kernel with your commit, something must have
gone wrong there..
If I revert your commit and rebuild the dtb, I can bootup without any
issues.

With this commit I'm just getting to a black screen with disabled backlight.

I'm not sure if this issue also exists on other tegra124 devices, but I
think that you would have at least tested the jetson tk1 device and had no
chance to test this on nyan(-big) devices..

Any Ideas what is causing this on nyan-big?
You're probably just missing the VIC firmware. Try installing a recent
version of the linux-firmware repository. The VIC firmware for Tegra124
was added by this commit:

	commit ba53b253ec087dde6d5f0776f2c927102c792ca1
	Author:     Mikko Perttunen<mperttunen@xxxxxxxxxx>
	AuthorDate: Tue Jun 6 14:50:38 2017 +0300
	Commit:     Kyle McMartin<kyle@xxxxxxxxxx>
	CommitDate: Thu Jun 15 11:45:26 2017 -0400

	    firmware: tegra: Add VIC firmware

	    Add firmware files for the VIC falcon controller for Tegra124,
	    Tegra210 and Tegra186.

	    Signed-off-by: Mikko Perttunen<mperttunen@xxxxxxxxxx>
	    Signed-off-by: Kyle McMartin<kyle@xxxxxxxxxx>

So I've checked my /lib/firmware/nvidia/tegra124/ folder and the vic03_ucode.bin file is present..

Should I be able to boot up then?

Alternatively you could try to backport this commit from linux-next:

	commit 77a0b09dd993c83ee7c770cc704e9bec18fd19c7
	Author: Thierry Reding<treding@xxxxxxxxxx>
	Date:   Fri Feb 1 14:28:32 2019 +0100

	    drm/tegra: vic: Load firmware on demand

	    Loading the firmware requires an allocation of IOVA space to make sure
	    that the VIC's Falcon microcontroller can read the firmware if address
	    translation via the SMMU is enabled.

	    However, the allocation currently happens at a time where the geometry
	    of an IOMMU domain may not have been initialized yet. This happens for
	    example on Tegra186 and later where an ARM SMMU is used. Domains which
	    are created by the ARM SMMU driver postpone the geometry setup until a
	    device is attached to the domain. This is because IOMMU domains aren't
	    attached to a specific IOMMU instance at allocation time and hence the
	    input address space, which defines the geometry, is not known yet.

	    Work around this by postponing the firmware load until it is needed at
	    the time where a channel is opened to the VIC. At this time the shared
	    IOMMU domain's geometry has been properly initialized.

	    As a byproduct this allows the Tegra DRM to be created in the absence
	    of VIC firmware, since the VIC initialization no longer fails if the
	    firmware can't be found.

	    Based on an earlier patch by Dmitry Osipenko<digetx@xxxxxxxxx>.

	    Signed-off-by: Thierry Reding<treding@xxxxxxxxxx>
	    Reviewed-by: Dmitry Osipenko<digetx@xxxxxxxxx>

I've applied the whole series from here:

https://patchwork.kernel.org/cover/10792753/

And I'm now able to boot the kernel.

But I'm also seeing this stacktrace in dmesg:

[    1.519754] tegra-xusb-padctl 7009f000.padctl: failed to setup XUSB ports: -517 [    1.531454] tegra-apbdma 60020000.dma: Tegra20 APB DMA driver register 32 channels [    1.532686] tegra-pmc 7000e400.pmc: i2c-thermtrip node not found, emergency thermal reset disabled.
[    1.558238] ------------[ cut here ]------------
[    1.558283] WARNING: CPU: 2 PID: 71 at lib/kobject.c:707 kobject_put+0xb8/0xe0 [    1.558316] kobject: '(null)' ((ptrval)): is not initialized, yet kobject_put() is being called.
[    1.558350] Modules linked in:
[    1.558381] CPU: 2 PID: 71 Comm: kworker/2:1 Not tainted 5.0.0 #1
[    1.558407] Hardware name: NVIDIA Tegra SoC (Flattened Device Tree)
[    1.558445] Workqueue: rcu_gp srcu_invoke_callbacks
[    1.558470] Backtrace:
[    1.558503] [<c0233d24>] (dump_backtrace) from [<c023408c>] (show_stack+0x20/0x24)
[    1.558539]  r7:000002c3 r6:60060013 r5:00000000 r4:c1296870
[    1.558575] [<c023406c>] (show_stack) from [<c0b8cc38>] (dump_stack+0x90/0xa4) [    1.558616] [<c0b8cba8>] (dump_stack) from [<c0252738>] (__warn.part.3+0xcc/0xe8)
[    1.558651]  r7:000002c3 r6:00000009 r5:00000000 r4:ed117e3c
[    1.558683] [<c025266c>] (__warn.part.3) from [<c02527cc>] (warn_slowpath_fmt+0x78/0x94)
[    1.558718]  r7:c0b91e88 r6:000002c3 r5:c0e0a730 r4:c1208c94
[    1.558749] [<c0252758>] (warn_slowpath_fmt) from [<c0b91e88>] (kobject_put+0xb8/0xe0)
[    1.558781]  r3:00000000 r2:c0e0a740
[    1.558805]  r7:edfaf9c0 r6:edfaf9c4 r5:eda42180 r4:ed1bbc60
[    1.558839] [<c0b91dd0>] (kobject_put) from [<c07994d8>] (__device_link_free_srcu+0x30/0x50)
[    1.558873]  r6:edfaf9c4 r5:eda42180 r4:eda421a8
[    1.558904] [<c07994a8>] (__device_link_free_srcu) from [<c02c02b0>] (srcu_invoke_callbacks+0xe4/0x178)
[    1.558939]  r5:c1208c94 r4:edfaf9fc
[    1.558971] [<c02c01cc>] (srcu_invoke_callbacks) from [<c026ef48>] (process_one_work+0x210/0x588) [    1.559008]  r10:00000000 r9:c129d104 r8:00000000 r7:edfb5000 r6:edfb1540 r5:eda2df00
[    1.559039]  r4:edfaf9fc
[    1.559066] [<c026ed38>] (process_one_work) from [<c026fefc>] (worker_thread+0x60/0x570) [    1.559102]  r10:edfb1540 r9:c1203d00 r8:edfb1558 r7:00000008 r6:edfb1540 r5:eda2df14
[    1.559132]  r4:eda2df00
[    1.559159] [<c026fe9c>] (worker_thread) from [<c0275724>] (kthread+0x16c/0x174) [    1.559194]  r10:ed94be74 r9:c026fe9c r8:eda2df00 r7:ed116000 r6:00000000 r5:eda29840
[    1.559223]  r4:edb98500
[    1.559249] [<c02755b8>] (kthread) from [<c02011f8>] (ret_from_fork+0x14/0x3c)
[    1.559279] Exception stack(0xed117fb0 to 0xed117ff8)
[    1.559305] 7fa0:                                     00000000 00000000 00000000 00000000 [    1.559340] 7fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[    1.559374] 7fe0: 00000000 00000000 00000000 00000000 00000013 00000000
[    1.559404]  r10:00000000 r9:00000000 r8:00000000 r7:00000000 r6:00000000 r5:c02755b8
[    1.559434]  r4:eda29840
[    1.559458] ---[ end trace 70996e1b2d94d4ba ]---
[    1.559481] ------------[ cut here ]------------
[    1.559516] WARNING: CPU: 2 PID: 71 at lib/refcount.c:187 refcount_sub_and_test_checked+0xa4/0xac
[    1.559547] refcount_t: underflow; use-after-free.
[    1.559568] Modules linked in:
[    1.559594] CPU: 2 PID: 71 Comm: kworker/2:1 Tainted: G W         5.0.0 #1
[    1.559623] Hardware name: NVIDIA Tegra SoC (Flattened Device Tree)
[    1.559655] Workqueue: rcu_gp srcu_invoke_callbacks
[    1.559679] Backtrace:
[    1.559707] [<c0233d24>] (dump_backtrace) from [<c023408c>] (show_stack+0x20/0x24)
[    1.559741]  r7:000000bb r6:60060013 r5:00000000 r4:c1296870
[    1.559774] [<c023406c>] (show_stack) from [<c0b8cc38>] (dump_stack+0x90/0xa4) [    1.559812] [<c0b8cba8>] (dump_stack) from [<c0252738>] (__warn.part.3+0xcc/0xe8)
[    1.559846]  r7:000000bb r6:00000009 r5:00000000 r4:ed117e14
[    1.559877] [<c025266c>] (__warn.part.3) from [<c02527cc>] (warn_slowpath_fmt+0x78/0x94)
[    1.559912]  r7:c061d0b0 r6:000000bb r5:c0d95fdc r4:c1208c94
[    1.559944] [<c0252758>] (warn_slowpath_fmt) from [<c061d0b0>] (refcount_sub_and_test_checked+0xa4/0xac)
[    1.559979]  r3:c129cbaa r2:c0d96048
[    1.560002]  r7:edfaf9c0 r6:edfaf9c4 r5:eda42180 r4:00000000
[    1.560035] [<c061d00c>] (refcount_sub_and_test_checked) from [<c061d0d0>] (refcount_dec_and_test_checked+0x18/0x1c)
[    1.560071]  r5:eda42180 r4:ed1bbc60
[    1.560099] [<c061d0b8>] (refcount_dec_and_test_checked) from [<c0b91e90>] (kobject_put+0xc0/0xe0) [    1.560139] [<c0b91dd0>] (kobject_put) from [<c07994d8>] (__device_link_free_srcu+0x30/0x50)
[    1.560173]  r6:edfaf9c4 r5:eda42180 r4:eda421a8
[    1.560204] [<c07994a8>] (__device_link_free_srcu) from [<c02c02b0>] (srcu_invoke_callbacks+0xe4/0x178)
[    1.560238]  r5:c1208c94 r4:edfaf9fc
[    1.560268] [<c02c01cc>] (srcu_invoke_callbacks) from [<c026ef48>] (process_one_work+0x210/0x588) [    1.560306]  r10:00000000 r9:c129d104 r8:00000000 r7:edfb5000 r6:edfb1540 r5:eda2df00
[    1.560336]  r4:edfaf9fc
[    1.560363] [<c026ed38>] (process_one_work) from [<c026fefc>] (worker_thread+0x60/0x570) [    1.560399]  r10:edfb1540 r9:c1203d00 r8:edfb1558 r7:00000008 r6:edfb1540 r5:eda2df14
[    1.560429]  r4:eda2df00
[    1.560454] [<c026fe9c>] (worker_thread) from [<c0275724>] (kthread+0x16c/0x174) [    1.560489]  r10:ed94be74 r9:c026fe9c r8:eda2df00 r7:ed116000 r6:00000000 r5:eda29840
[    1.560519]  r4:edb98500
[    1.560542] [<c02755b8>] (kthread) from [<c02011f8>] (ret_from_fork+0x14/0x3c)
[    1.560572] Exception stack(0xed117fb0 to 0xed117ff8)
[    1.560598] 7fa0:                                     00000000 00000000 00000000 00000000 [    1.560632] 7fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[    1.560666] 7fe0: 00000000 00000000 00000000 00000000 00000013 00000000
[    1.560696]  r10:00000000 r9:00000000 r8:00000000 r7:00000000 r6:00000000 r5:c02755b8
[    1.560726]  r4:eda29840
[    1.560744] ---[ end trace 70996e1b2d94d4bb ]---

This stacktrace has nothing to do with the patch from linux-next, since it is also occurring with just this commit 3dde5a2342cd204df15b6b0b90ee0ed4542225ca reverted..

I'm not sure what failed there..

But I didn't had this stacktrace on 4.20.13..

Tristan

Thierry



[Index of Archives]     [ARM Kernel]     [Linux ARM]     [Linux ARM MSM]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux