Bug ID 1020021
Summary RPi3: vc4 drm fails to initialize with 4.9
Classification openSUSE
Product openSUSE Tumbleweed
Version Current
Hardware aarch64
OS Other
Status NEW
Severity Normal
Priority P5 - None
Component Kernel
Assignee agraf@suse.com
Reporter agraf@suse.com
QA Contact qa-bugs@suse.de
CC dmueller@suse.com, fvogt@suse.com, mbrugger@suse.com
Found By ---
Blocker ---

The vc4 driver in 4.9 wants to allocate larger chunks DMA memory for the frame
buffer. This allocation can not be satisfied using simple get_pages. As
fallback options, Linux can provide CMA and SWIOTLB.

In our Tumbleweed configuration, CMA is effectively disabled for that use case,
because CONFIG_DMA_CMA is disabled. That means that path is out.

SWIOTLB broke upstream with commit b67a8b29df7. Starting there, arm64 no longer
initializes the swiotlb framework on systems like the rpi3, but still calls its
allocation methods to allocate DMA memory. SWIOTLB code is not prepared for
that and oopses with a NULL pointer access BUG:

[   12.061952] Unable to handle kernel NULL pointer dereference at virtual
address 00000000
[   12.070192] pgd = ffff800032da6000
[   12.073644] [00000000] *pgd=0000000000000000

[   12.077809] Internal error: Oops: 96000004 [#1] SMP
[   12.082761] Modules linked in: vc4(+) dwc2 drm_kms_helper udc_core drm
usbcore fb_sys_fops syscopyarea sysfillrect sysimgblt bcm2835_rng pwm_bcm2835
i2c_bcm2835 bcm2835_wdt uio_pdrv_genirq uio leds_gpio mmc_block sdhci_iproc
sdhci_pltfm sdhci mmc_core bcm2835_dma sg efivarfs
[   12.107606] CPU: 0 PID: 355 Comm: systemd-udevd Not tainted 4.9.0-1-default
#1
[   12.114942] Hardware name: raspberrypi rpi/rpi, BIOS 2016.11 12/19/2016
[   12.121658] task: ffff800032ddc180 task.stack: ffff800032e24000
[   12.127682] PC is at swiotlb_tbl_map_single+0xd0/0x2b0
[   12.132901] LR is at swiotlb_tbl_map_single+0xc4/0x2b0
[   12.138118] pc : [<ffff00000845b908>] lr : [<ffff00000845b8fc>] pstate:
200001c5
[   12.145626] sp : ffff800032e27580
[   12.148988] x29: ffff800032e27580 x28: 0000000000000000 
[   12.154388] x27: ffff00000923c988 x26: 0000000000000000 
[   12.159788] x25: ffff00000923c000 x24: 0000000000000fd2 
[   12.165187] x23: 0000000000200000 x22: 0000000000000002 
[   12.170587] x21: 0000000000180000 x20: 0000000000000000 
[   12.175985] x19: 0000000000000fd2 x18: ffffffffffffffff 
[   12.181393] x17: 0000000000440020 x16: ffff0000080cb8b0 
[   12.186803] x15: ffff000009008310 x14: 0000043c00000465 
[   12.192212] x13: 0000043800000438 x12: 0000000000000028 
[   12.197622] x11: 0101010101010101 x10: 7f7f7f7f7f7f7f7f 
[   12.203030] x9 : 0000000000000000 x8 : 0000000000000000 
[   12.208438] x7 : 0000000000000000 x6 : 0000000000000000 
[   12.213847] x5 : 000000000002f548 x4 : 00000000001fffff 
[   12.219256] x3 : 0000000000200000 x2 : 0000000000000000 
[   12.224666] x1 : 0000000000000fd2 x0 : 0000000000000000 

[   12.231596] Process systemd-udevd (pid: 355, stack limit =
0xffff800032e24020)
[   12.238950] Stack: (0xffff800032e27580 to 0xffff800032e28000)
[   12.244800] 7580: ffff800032e27600 ffff00000845be94 ffff800034cac410
00000000ffffffff
[   12.252775] 75a0: 00000000007e8fff ffff800034400ec0 0000000000000000
000000000000000b
[   12.260750] 75c0: 00000000007e9000 ffff000000ac6088 ffff800033216800
ffff800033bf4a18
[   12.268725] 75e0: 0000000232e27600 0000000000000140 ffff800034cac410
00000000007e9000
[   12.276700] 7600: ffff800032e27650 ffff000008099dc0 00000000007e9000
ffff800034cac410
[   12.284675] 7620: 00000000024002c0 0000000000000000 ffff800034400ec0
ffff800034400ec0
[   12.292651] 7640: 00000000007e9000 ffff000000a1b2f0 ffff800032e276a0
ffff000000a1b410
[   12.300627] 7660: 00000000007e9000 ffff800034400e00 ffff800034cac410
ffff800033216800
[   12.308602] 7680: ffff0000090178e0 ffff800034400ec0 00000000007e9000
ffff800026ccbc00
[   12.316576] 76a0: ffff800032e276f0 ffff000000abcaac ffff800026e2d700
ffff800032e27838
[   12.324551] 76c0: ffff800026e2d700 0000000000000004 0000000000000800
0000000000001e00
[   12.332527] 76e0: ffff800026e2d700 ffff800032e27838 ffff800032e277c0
ffff000000abcd84
[   12.340502] 7700: ffff800026e2d700 ffff800032e27838 0000000000000001
000000000000000b
[   12.348476] 7720: 0000000000000800 0000000000000800 0000000000000020
ffff800033216a30
[   12.356451] 7740: ffff000000b46770 0000000000000800 0000000000000020
0000078000000000
[   12.364427] 7760: 3432525800000438 0000000000000000 0000000000000000
00001e0000000000
[   12.372401] 7780: 0000000000000000 0000000000000000 0000000000000000
0000000000000000
[   12.380375] 77a0: 0000000000000000 0000000000000000 0000000000000000
0000000000000000
[   12.388350] 77c0: ffff800032e277e0 ffff000000abc040 ffff800026e2d700
ffff000000ac6030
[   12.396325] 77e0: ffff800032e27850 ffff000000abce88 ffff800026e2d700
0000000000000000
[   12.404299] 7800: ffff800033216800 0000000000000001 ffff000000ac0840
0000000000000020
[   12.412275] 7820: ffff000008ad6000 0000000000000000 ffff800033216800
0000043800000780
[   12.420252] 7840: 0000043800000780 0000001800000020 ffff800032e27890
ffff000000abcf90
[   12.428227] 7860: ffff800033216800 0000000000000020 0000000000000003
0000000000000001
[   12.436203] 7880: 0000000000000006 ffff0000090dbb68 ffff800032e278c0
ffff000000b47980
[   12.444177] 78a0: ffff800033216800 ffff800026f08018 0000000000000000
0000000000000001
[   12.452153] 78c0: ffff800032e278f0 ffff000000b46a94 ffff800033216800
ffff800034cac410
[   12.460129] 78e0: 0000000000000000 ffff800034588780 ffff800032e27920
ffff0000085c5d30
[   12.462262] usb 1-1: new high-speed USB device number 2 using dwc2
[   12.474383] 7900: ffff800033bf4680 00000000000000f0 ffff800034cac810
ffff800033bf4a80
[   12.482359] 7920: ffff800032e27980 ffff0000085c5fc0 ffff800033bf4a18
ffff800033bf4a80
[   12.490333] 7940: ffff0000090dbb30 ffff000000b52558 ffff0000090db000
ffff800032e27a28
[   12.498308] 7960: ffff000000b46770 0000000000000028 ffff000000b52568
ffff000000b5b000
[   12.506284] 7980: ffff800032e279c0 ffff000000b46bd0 ffff800034cac810
0000000000000000
[   12.514258] 79a0: ffff0000090dc148 ffff000000b5a768 ffff800034cac410
0000000000000000
[   12.522233] 79c0: ffff800032e27a30 ffff0000085cec88 00000000fffffffe
ffff800034cac410
[   12.530209] 79e0: ffff000000b5a290 ffff000000b5a2b8 0000000000000017
ffff000000b5ab80
[   12.538185] 7a00: ffff000000b5abd0 ffff000009037750 ffff800032e27dd0
ffff0000085cec68
[   12.546161] 7a20: 0000000000000000 ffff800033bf4a18 ffff800032e27a60
ffff0000085cc62c
[   12.554137] 7a40: ffff800034cac410 ffff000009243000 0000000000000000
ffff000009243000
[   12.562112] 7a60: ffff800032e27aa0 ffff0000085cc904 ffff800034cac410
ffff800034cac470
[   12.570087] 7a80: ffff000000b5a2b8 0000000000000000 ffff0000090db000
ffff800026e76600
[   12.578062] 7aa0: ffff800032e27ad0 ffff0000085c9f68 0000000000000000
ffff000000b5a2b8
[   12.586038] 7ac0: ffff0000085cc7e0 0000000000000000 ffff800032e27b10
ffff0000085cbc60
[   12.594013] 7ae0: ffff000000b5a2b8 ffff800026e76600 ffff0000090dc148
0000000000000000
[   12.601987] 7b00: ffff80003533a8a8 ffff800034cabc68 ffff800032e27b30
ffff0000085cb688
[   12.609962] 7b20: ffff000000b5a2b8 ffff800026e76600 ffff800032e27b70
ffff0000085cd420
[   12.617939] 7b40: ffff000000b5a2b8 ffff000000b5a980 0000000000000000
ffff000000b5a980
[   12.625915] 7b60: ffff000000b52568 ffff000000b5a980 ffff800032e27b90
ffff0000085cebac
[   12.633892] 7b80: ffff000000b5a290 ffff000000b5a980 ffff800032e27bb0
ffff000000b63068
[   12.641866] 7ba0: 0000000000000005 0000000000000005 ffff800032e27bf0
ffff00000808395c
[   12.649841] 7bc0: ffff000009008000 ffff000000b63000 ffff800032e24000
0000000000000000
[   12.657817] 7be0: ffff000009037000 0000000000040900 ffff800032e27c80
ffff0000081e9bac
[   12.665793] 7c00: ffff000000b5a980 ffff000009037000 ffff800032e27e58
ffff800034060400
[   12.673768] 7c20: ffff000009037000 ffff800034060400 ffff800032e27c80
ffff0000081e9b7c
[   12.681743] 7c40: ffff000000b5a980 ffff000009037000 ffff800032e27e58
ffff000009008000
[   12.689718] 7c60: ffff000009037000 ffff000000b5ab80 ffff000000b5abd0
0000000000040900
[   12.697693] 7c80: ffff800032e27cb0 ffff00000815e81c ffff000000b5a998
ffff000000b5a980
[   12.705669] 7ca0: ffff800032e27e58 ffff000009008000 ffff800032e27e10
ffff00000815ed10
[   12.713644] 7cc0: 0000000000000000 0000000000000014 0000ffffb33e52f0
0000ffffb32fe544
[   12.721619] 7ce0: 0000000040000000 0000000000000015 0000000000000123
0000000000000111
[   12.729595] 7d00: ffff000008832000 ffff800032e24000 ffff800026ea0200
ffff000009123ee0
[   12.737569] 7d20: ffff000009123ae0 ffff000008a6dc10 ffff800032e27d80
ffff800000000072
[   12.745544] 7d40: ffff800000000064 ffff00000000006e ffff00000000003f
ffff000000b64000
[   12.753520] 7d60: 0000000000000018 ffff000008843808 0000000000000003
ffff800032e27e48
[   12.761496] 7d80: 0000000000000000 ffff000000000000 0000000000000000
ffff800000000000
[   12.769470] 7da0: 0000000000000000 ffff800000000000 0000000000000000
0000000000000000
[   12.777445] 7dc0: 0000000000000000 ffff000000000000 00006c656e72656b
0000000000000000
[   12.785419] 7de0: 0000000000000000 0000000000000000 0000000000000000
0000000000000000
[   12.793393] 7e00: 0000000000000000 0000000000040900 0000000000000000
ffff0000080836f0
[   12.801368] 7e20: 0000000000000000 0000aaaaec53ef30 ffffffffffffffff
0000000000000000
[   12.809342] 7e40: 000000000002e32a 000000000002e32a ffff00000977f000
ffff00000977f000
[   12.817318] 7e60: 000000000002e32a ffff0000097ac6d0 ffff0000097ac510
ffff00000979ded8
[   12.825294] 7e80: 0000000000017000 000000000001be78 0000000000000000
0000000000000000
[   12.833269] 7ea0: 000000000000a0b8 0000002a00000029 0000001700000023
0000000000000013
[   12.841244] 7ec0: 0000000000000014 0000ffffb33e52f0 0000000000000000
0000000000000014
[   12.849219] 7ee0: 0000000000000000 60ceffffffffffff ffffffffffffffff
ffffffffffffffff
[   12.857194] 7f00: 0000000000000111 0000000000000038 4f5e424aff524446
0000000000000001
[   12.865168] 7f20: 0000000000000000 ffffffffffff0000 0000000000000001
0000000000000020
[   12.873143] 7f40: 0000ffffb3403f88 0000ffffb32fe520 0000000000000000
0000000000000000
[   12.881118] 7f60: 0000aaaaec53ef30 0000aaaaec53ef30 0000ffffb3403000
0000ffffb33e52f0
[   12.889094] 7f80: 0000000000000007 0000000000000000 0000000000000000
0000aaaaec592d20
[   12.897069] 7fa0: 0000000000000000 0000ffffd2e83af0 0000ffffb33dd91c
0000ffffd2e83af0
[   12.905045] 7fc0: 0000ffffb32fe544 0000000040000000 0000000000000014
0000000000000111
[   12.913021] 7fe0: 0000000000000000 0000000000000000 ffffffffffffffff
ffffffffffffffff
[   12.920990] Call trace:
[   12.923483] Exception stack(0xffff800032e273b0 to 0xffff800032e274e0)
[   12.930035] 73a0:                                   0000000000000fd2
0001000000000000
[   12.938011] 73c0: ffff800032e27580 ffff00000845b908 00000000024002c1
0000000000000001
[   12.945987] 73e0: 000000000000000b ffff800032e27430 ffff0000081f5b54
ffff800032e27430
[   12.953962] 7400: ffff0000081f5cc0 0000000060000145 ffff8000024002c1
ffff800026dd32d8
[   12.961938] 7420: 0001000000000000 0000000000000001 ffff800032e27590
ffff00000824ccf4
[   12.969913] 7440: ffff000008cd4e00 ffff00000920f098 0000000000000000
0000000000000fd2
[   12.977888] 7460: 0000000000000000 0000000000200000 00000000001fffff
000000000002f548
[   12.985862] 7480: 0000000000000000 0000000000000000 0000000000000000
0000000000000000
[   12.993837] 74a0: 7f7f7f7f7f7f7f7f 0101010101010101 0000000000000028
0000043800000438
[   13.001812] 74c0: 0000043c00000465 ffff000009008310 ffff0000080cb8b0
0000000000440020
[   13.009790] [<ffff00000845b908>] swiotlb_tbl_map_single+0xd0/0x2b0
[   13.016081] [<ffff00000845be94>] swiotlb_alloc_coherent+0x10c/0x198
[   13.022460] [<ffff000008099dc0>] __dma_alloc+0x68/0x1a8
[   13.028089] [<ffff000000a1b410>] drm_gem_cma_create+0x98/0x108 [drm]
[   13.034706] [<ffff000000abcaac>] drm_fbdev_cma_create_with_funcs+0xbc/0x368
[drm_kms_helper]
[   13.043417] [<ffff000000abcd84>] drm_fbdev_cma_create+0x2c/0x40
[drm_kms_helper]
[   13.051071] [<ffff000000abc040>] drm_fb_helper_initial_config+0x238/0x410
[drm_kms_helper]
[   13.059607] [<ffff000000abce88>] drm_fbdev_cma_init_with_funcs+0x98/0x160
[drm_kms_helper]
[   13.068143] [<ffff000000abcf90>] drm_fbdev_cma_init+0x40/0x58
[drm_kms_helper]
[   13.075575] [<ffff000000b47980>] vc4_kms_load+0x90/0xf0 [vc4]
[   13.081481] [<ffff000000b46a94>] vc4_drm_bind+0xec/0x168 [vc4]
[   13.087426] [<ffff0000085c5d30>] try_to_bring_up_master+0x288/0x2d8
[   13.093806] [<ffff0000085c5fc0>] component_master_add_with_match+0xa8/0xf0
[   13.100859] [<ffff000000b46bd0>] vc4_platform_drm_probe+0xc0/0x108 [vc4]
[   13.107679] [<ffff0000085cec88>] platform_drv_probe+0x60/0xc8
[   13.113527] [<ffff0000085cc62c>] driver_probe_device+0x284/0x438
[   13.119639] [<ffff0000085cc904>] __driver_attach+0x124/0x128
[   13.125399] [<ffff0000085c9f68>] bus_for_each_dev+0x70/0xb0
[   13.131070] [<ffff0000085cbc60>] driver_attach+0x30/0x40
[   13.136476] [<ffff0000085cb688>] bus_add_driver+0x200/0x2b8
[   13.142146] [<ffff0000085cd420>] driver_register+0x68/0x100
[   13.147819] [<ffff0000085cebac>] __platform_driver_register+0x54/0x60
[   13.154432] [<ffff000000b63068>] vc4_drm_register+0x68/0xa0 [vc4]
[   13.160636] [<ffff00000808395c>] do_one_initcall+0x5c/0x170
[   13.166311] [<ffff0000081e9bac>] do_init_module+0x68/0x1cc
[   13.171899] [<ffff00000815e81c>] load_module+0x12a4/0x1480
[   13.177483] [<ffff00000815ed10>] SyS_finit_module+0x120/0x130
[   13.183331] [<ffff0000080836f0>] el0_svc_naked+0x24/0x28
[   13.188740] Code: 94000434 2a0003e2 350000a0 f9401760 (b87c5801) 
[   13.195677] ---[ end trace 79287131c5e88ce7 ]---


You are receiving this mail because: