Xenial/raspi2 and RaspberryPi3a+: OOPS during boot

Bug #1805117 reported by Paolo Pisati
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux-raspi2 (Ubuntu)
New
Undecided
Unassigned

Bug Description

...
[ 4.334281] [drm] Initialized drm 1.1.0 20060810
[ 4.463211] usbcore: registered new interface driver brcmfmac
[ 4.492438] vc4-drm soc:gpu: bound 3f902000.hdmi (ops vc4_hdmi_ops [vc4])
[ 4.492469] vc4_dsi 3f700000.dsi: DSI not set up by firmware.
[ 4.492502] vc4-drm soc:gpu: bound 3f700000.dsi (ops vc4_dsi_ops [vc4])
[ 4.492548] vc4-drm soc:gpu: bound 3f400000.hvs (ops vc4_hvs_ops [vc4])
[ 4.492677] vc4-drm soc:gpu: bound 3f206000.pixelvalve (ops vc4_crtc_ops [vc4])
[ 4.492757] vc4-drm soc:gpu: bound 3f207000.pixelvalve (ops vc4_crtc_ops [vc4])
[ 4.492834] vc4-drm soc:gpu: bound 3f807000.pixelvalve (ops vc4_crtc_ops [vc4])
[ 4.492870] vc4-drm soc:gpu: failed to bind 3fc00000.v3d (ops vc4_v3d_ops [vc4]): -22
[ 4.501101] Unable to handle kernel NULL pointer dereference at virtual address 00000010
[ 4.509408] pgd = 99df0000
[ 4.512171] [00000010] *pgd=00000000
[ 4.515830] Internal error: Oops: 5 [#1] SMP ARM
[ 4.520516] Modules linked in: vc4(+) drm_mipi_dsi brcmfmac drm_kms_helper brcmutil cfg80211 drm sr9700 fb_sys_fops syscopyarea dm9601 sysfillrect sy
simgblt i2c_bcm2708 bcm2835_gpiomem uio_pdrv_genirq uio
[ 4.539021] CPU: 0 PID: 190 Comm: systemd-udevd Not tainted 4.4.0-1101-raspi2 #109~vc4dbg
[ 4.547326] Hardware name: BCM2709
[ 4.550776] task: 9b5c2f40 ti: 99f8c000 task.ti: 99f8c000
[ 4.556292] PC is at vc4_dsi_unbind+0x78/0x164 [vc4]
[ 4.561336] LR is at irq_work_queue+0x14/0x90
[ 4.565756] pc : [<7f4ab878>] lr : [<80228a18>] psr: 60070013
               sp : 99f8db38 ip : 00000007 fp : 99f8db54
[ 4.577413] r10: 80b05a34 r9 : 80e81ff8 r8 : 98d45c00
[ 4.582715] r7 : 024000c0 r6 : 98c7bc10 r5 : 98d45c00 r4 : 00000000
[ 4.589339] r3 : dc8ba6a2 r2 : dc8ba6a2 r1 : 00000000 r0 : 00000014
[ 4.595965] Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment none
[ 4.603207] Control: 10c5383d Table: 19df006a DAC: 00000051
[ 4.609038] Process systemd-udevd (pid: 190, stack limit = 0x99f8c218)
[ 4.615662] Stack: (0x99f8db38 to 0x99f8e000)
[ 4.620083] db20: 99db1280 99db16c0
[ 4.628391] db40: ffffffea 024000c0 99f8db74 99f8db58 805827c0 7f4ab80c 99db18c0 99f8dbb4 [29/415]
[ 4.636699] db60: 99db1280 99db16c0 99f8dbb4 99f8db78 80582b40 8058278c ffffffea ffffffe0
[ 4.645007] db80: 98d45c00 80b05a1c 99f8dbb4 98c7bc10 98d45c00 99db16c0 9b6b6410 00000000
[ 4.653314] dba0: 9b6b6410 00000000 99f8dbdc 99f8dbb8 7f4aabb4 80582984 9aaf44c8 00000007
[ 4.661622] dbc0: 99db16c0 9aaf4490 00000000 9b6b6410 99f8dc04 99f8dbe0 80582c98 7f4aab24
[ 4.669930] dbe0: 99db16c0 00000000 80e4f358 7f4ba450 9b6b6410 9b6b6410 99f8dc2c 99f8dc08
[ 4.678238] dc00: 80582d9c 80582bc8 9b6b5810 7f4c24ec 80e4f698 80e4f698 7f4aa888 9b6b6410
[ 4.686546] dc20: 99f8dc6c 99f8dc30 7f4aad78 80582ce4 80e0354c 7f4ba488 99ca5d90 dc8ba6a2
[ 4.694854] dc40: 00000000 80f265c4 9b6b6410 7f4c2184 fffffdfb 7f4c2184 00000012 7f4c2600
[ 4.703162] dc60: 99f8dc8c 99f8dc70 8058af58 7f4aacb0 80f265c4 9b6b6410 80e82208 00000000
[ 4.711470] dc80: 99f8dcbc 99f8dc90 80588b78 8058af08 99f8dcbc 808988b8 9b6b6410 7f4c2184
[ 4.719778] dca0: 9b6b6444 80588dc0 00000000 98295000 99f8dcdc 99f8dcc0 80588e5c 80588954
[ 4.728086] dcc0: 00000000 7f4c2184 80e0354c 80588dc0 99f8dd0c 99f8dce0 80586770 80588dcc
[ 4.736394] dce0: 99f8dd18 9b49df5c 9b69bc34 dc8ba6a2 7f4c2184 9aaf4500 80e4f698 80e82130
[ 4.744702] dd00: 99f8dd1c 99f8dd10 805882d0 805866f0 99f8dd4c 99f8dd20 80587dd0 805882b0
[ 4.753010] dd20: 7f4bce20 7f4ba470 99f8dd4c 7f4c2184 00000000 7f4c2600 7f4ba470 7f4ba470
[ 4.761317] dd40: 99f8dd64 99f8dd50 80589944 80587bfc 00000007 00000000 99f8dd74 99f8dd68
[ 4.769625] dd60: 8058ae68 805898c8 99f8dd9c 99f8dd78 7f4ca06c 8058ae24 80e0354c 80e07520
[ 4.777933] dd80: 7f4ca000 00000000 80e07520 98295000 99f8de1c 99f8dda0 80101904 7f4ca00c
[ 4.786241] dda0: 80e76dc0 80e76dc0 99f8ddf4 dc8ba6a2 8024fdbc 00006d6f 80288624 99dcce80
[ 4.794549] ddc0: 1ae39000 7f4c260c 80e0354c 8029c948 99f8de1c 99f8dde0 8029c948 80896dc0
[ 4.802857] dde0: 00000001 80288624 00006d6f 98295000 9d1c4000 dc8ba6a2 7f4c2600 99f8df40
[ 4.811165] de00: 98295040 7f4c272c 7f4c260c 80e0354c 99f8de44 99f8de20 80246ee0 80101838
[ 4.819472] de20: 99f8de44 99f8de30 80288720 00000000 99f8df40 7f4c2700 99f8df34 99f8de48
[ 4.827780] de40: 801bbda8 80246e78 ffff8000 00007fff 7f4c2600 801b9248 7f000000 80e0354c
[ 4.836088] de60: 80aba450 80aba408 80905fd4 00000000 7f4c260c 80e035cc 7f4c2710 7f4c3000
[ 4.844395] de80: 99f8dea0 99f8df40 80e0354c 00000000 99c35180 99c35180 99f8df34 99f8dea8
[ 4.852702] dea0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 4.861010] dec0: 00000000 00000000 6e72656b 00006c65 00000000 00000000 00000000 00000000
[ 4.869317] dee0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 4.877624] df00: 00000000 dc8ba6a2 99f8df24 80e0354c 00000000 76eca65c 00000015 80108fe4
[ 4.885932] df20: 99f8c000 00000000 99f8dfa4 99f8df38 801bc1c8 801ba9bc 00000000 99f8df40
[ 4.894240] df40: 9d1c4000 0002e1b4 9d1f1994 9d1f1784 9d1e65b8 0001b000 0001e7d0 00000000
[ 4.902548] df60: 00000000 00000001 00008d84 00000032 00000033 0000002b 0000001f 00000015
[ 4.910856] df80: 00000000 dc8ba6a2 023fd410 00000000 50626300 0000017b 00000000 99f8dfa8
[ 4.919163] dfa0: 80108e20 801bc10c 023fd410 00000000 00000015 76eca65c 00000000 76ecb82c
[ 4.927471] dfc0: 023fd410 00000000 50626300 0000017b 00020000 004a07cc 023fd298 00000000
[ 4.935779] dfe0: 7ee2b938 7ee2b928 76ec48ff 76e16712 60070030 00000015 00000000 00000000
[ 4.944131] [<7f4ab878>] (vc4_dsi_unbind [vc4]) from [<805827c0>] (component_unbind+0x40/0x78)
[ 4.952885] [<805827c0>] (component_unbind) from [<80582b40>] (component_bind_all+0x1c8/0x244)
[ 4.961657] [<80582b40>] (component_bind_all) from [<7f4aabb4>] (vc4_drm_bind+0x9c/0x18c [vc4])
[ 4.970519] [<7f4aabb4>] (vc4_drm_bind [vc4]) from [<80582c98>] (try_to_bring_up_master.part.0+0xdc/0x11c)
[ 4.980329] [<80582c98>] (try_to_bring_up_master.part.0) from [<80582d9c>] (component_master_add_with_match+0xc4/0x138)
[ 4.991306] [<80582d9c>] (component_master_add_with_match) from [<7f4aad78>] (vc4_platform_drm_probe+0xd4/0xfc [vc4])
[ 5.002109] [<7f4aad78>] (vc4_platform_drm_probe [vc4]) from [<8058af58>] (platform_drv_probe+0x5c/0xc0)
[ 5.011745] [<8058af58>] (platform_drv_probe) from [<80588b78>] (driver_probe_device+0x230/0x478)
[ 5.020762] [<80588b78>] (driver_probe_device) from [<80588e5c>] (__driver_attach+0x9c/0xa0)
[ 5.029336] [<80588e5c>] (__driver_attach) from [<80586770>] (bus_for_each_dev+0x8c/0xd0)
[ 5.037647] [<80586770>] (bus_for_each_dev) from [<805882d0>] (driver_attach+0x2c/0x30)
[ 5.045780] [<805882d0>] (driver_attach) from [<80587dd0>] (bus_add_driver+0x1e0/0x278)
[ 5.053915] [<80587dd0>] (bus_add_driver) from [<80589944>] (driver_register+0x88/0x108)
[ 5.062136] [<80589944>] (driver_register) from [<8058ae68>] (__platform_driver_register+0x50/0x58)
[ 5.071350] [<8058ae68>] (__platform_driver_register) from [<7f4ca06c>] (vc4_drm_register+0x6c/0x78 [vc4])
[ 5.081187] [<7f4ca06c>] (vc4_drm_register [vc4]) from [<80101904>] (do_one_initcall+0xd8/0x230)
[ 5.090115] [<80101904>] (do_one_initcall) from [<80246ee0>] (do_init_module+0x74/0x39c)
[ 5.098339] [<80246ee0>] (do_init_module) from [<801bbda8>] (load_module+0x13f8/0x1574)
[ 5.106473] [<801bbda8>] (load_module) from [<801bc1c8>] (SyS_finit_module+0xc8/0xf8)
[ 5.114430] [<801bc1c8>] (SyS_finit_module) from [<80108e20>] (ret_fast_syscall+0x0/0x1c)
[ 5.122739] Code: e59f10f0 e30d0074 e3470f4b eb366bbc (e5945010)
[ 5.128976] ---[ end trace a3b1e5ef83fc7548 ]---
...

The reason for the OOPS are obvious: the DSI side of the vc4 driver fail to attach on the RaspberryPi 3A+ borad (still under investigation):

...
[ 4.492469] vc4_dsi 3f700000.dsi: DSI not set up by firmware.
...
[ 4.492870] vc4-drm soc:gpu: failed to bind 3fc00000.v3d (ops vc4_v3d_ops [vc4]): -22
...

drivers/gpu/drm/vc4/vc4_dsi.c::vc4_dsi_unbind():

...
        if (DSI_PORT_READ(CTRL) == 0) {
                dev_info(dev, "DSI not set up by firmware.\n");
                return 0;
        }
...

the DSI_PORT_READ() call fails and immediately return, so it doesn't have a chance to reach the end of vc4_dsi_bind() and register the dsi struct in the driver data:

...
dev_set_drvdata(dev, dsi);
...

and since the vc4 has failed to bind, vc4_dsi_unbind() is called to cleanup:

...
struct vc4_dsi *dsi = dev_get_drvdata(dev);

vc4_dsi_connector_destroy(dsi->connector);
...

but it extracts the dsi struct from the driver data and then dereference a field, tripping over a NULL ptr and producing the above OOPS.

Tags: patch
Paolo Pisati (p-pisati)
description: updated
description: updated
Paolo Pisati (p-pisati)
summary: - Xenial/raspi and rpi3a+: OOPS during boot
+ Xenial/raspi2 and RaspberryPi3a+: OOPS during boot
Revision history for this message
Paolo Pisati (p-pisati) wrote :
tags: added: patch
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.