Xenial/raspi2 and RaspberryPi3A+: video not working
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
linux-raspi2 (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
Video is not working on the RaspberryPi3A+, and in dmesg there's this:
ubuntu@raspi3:~$ dmesg | grep cma
[ 0.000000] cma: Region at 0x10000000 defined on low/high memory boundary (0x1c000000)
[ 0.000000] cma: Failed to reserve 256 MiB
[ 0.000000] Kernel command line: 8250.nr_uarts=1 cma=256M@256M bcm2708_
[ 0.000000] Memory: 438856K/458752K available (8816K kernel code, 550K rwdata, 2688K rodata, 1024K init, 809K bss, 19896K reserved, 0K cma-reserved)
[ 1.209261] vc-cma: Videocore CMA driver
[ 1.213283] vc-cma: vc_cma_base = 0x00000000
[ 1.218091] vc-cma: vc_cma_size = 0x00000000 (0 MiB)
[ 1.223604] vc-cma: vc_cma_initial = 0x00000000 (0 MiB)
it tries to allocate 256M for CMA and fail, and that has a cascade effect on the drm driver (that fails to init) and as such the video is not working.
One easy workaround i found is to reduce the CMA size from 256M to 128M on the bootargs:
[ 0.000000] cma: Reserved 128 MiB at 0x10000000
[ 0.000000] Kernel command line: 8250.nr_uarts=1 cma=128M@256M bcm2708_
[ 0.000000] Memory: 307528K/458752K available (8816K kernel code, 550K rwdata, 2688K rodata, 1024K init, 809K bss, 20152K reserved, 131072K cma-reserved)
[ 1.207110] vc-cma: Videocore CMA driver
[ 1.211131] vc-cma: vc_cma_base = 0x00000000
[ 1.215939] vc-cma: vc_cma_size = 0x00000000 (0 MiB)
[ 1.221454] vc-cma: vc_cma_initial = 0x00000000 (0 MiB)
this way the video works again.
Ok so, it's official that with 512MB you have to downgrade the CMA to 128MB:
https:/ /git.launchpad. net/~ubuntu- kernel/ ubuntu/ +source/ linux/+ git/xenial/ tree/arch/ arm/boot/ dts/overlays/ README? h=raspi2# n1317
so the dtoverlay line should go from:
dtoverlay= vc4-kms- v3d
to:
dtoverlay= vc4-kms- v3d,cma- 128
and with this setup, the board works fine.
Still, i agree that it should fail gracefully if the wrong cma size is specified - i fixed the OOPS on boot here: https:/ /bugs.launchpad .net/ubuntu/ +source/ linux-raspi2/ +bug/1805117 but once the board is running, we later hit another problem:
[ 360.269693] INFO: task kworker/1:2:101 blocked for more than 120 seconds. kernel/ hung_task_ timeout_ secs" disables this message. 0x50/0xa8) timeout+ 0x218/0x2a0) common+ 0xc8/0x1a0) completion+ 0x20/0x24) completion) from [<8073f0d4>] (rpi_firmware_ transaction+ 0x78/0xd0) transaction) from [<8073f20c>] (rpi_firmware_ property_ list+0xe0/ 0x24c) property_ list) from [<8073f3ec>] (rpi_firmware_ property+ 0x74/0xec) property) from [<80712c80>] (bcm2835_ cpufreq_ clock_property. constprop. 1+0x58/ 0x80) cpufreq_ clock_property. constprop. 1) from [<80712d00>] (bcm2835_ cpufreq_ driver_ target_ index+0x58/ 0xdc) cpufreq_ driver_ target_ index) from [<8070bb94>] (__cpufreq_ driver_ target+ 0x234/0x3b4) driver_ target) from [<807101e8>] (od_check_ cpu+0xdc/ 0xe0) cpu+0x1d0/ 0x22c) timer+0x60/ 0xf4) 0x15c/0x1a8) one_work+ 0x160/0x50c) thread+ 0x60/0x5d0) 0x118/0x130) fork+0x14/ 0x38) kernel/ hung_task_ timeout_ secs" disables this message. 0x50/0xa8)
[ 360.276605] Not tainted 4.4.0-1101-raspi2 #109~vc4dbg5
[ 360.282360] "echo 0 > /proc/sys/
[ 360.290316] kworker/1:2 D 80895384 0 101 2 0x00000000
[ 360.290338] Workqueue: events dbs_timer
[ 360.290356] [<80895384>] (__schedule) from [<8089589c>] (schedule+
[ 360.290366] [<8089589c>] (schedule) from [<80898c80>] (schedule_
[ 360.290376] [<80898c80>] (schedule_timeout) from [<80896668>] (wait_for_
[ 360.290384] [<80896668>] (wait_for_common) from [<80896760>] (wait_for_
[ 360.290395] [<80896760>] (wait_for_
[ 360.290406] [<8073f0d4>] (rpi_firmware_
[ 360.290415] [<8073f20c>] (rpi_firmware_
[ 360.290425] [<8073f3ec>] (rpi_firmware_
[ 360.290437] [<80712c80>] (bcm2835_
[ 360.290446] [<80712d00>] (bcm2835_
[ 360.290456] [<8070bb94>] (__cpufreq_
[ 360.290465] [<807101e8>] (od_check_cpu) from [<80712170>] (dbs_check_
[ 360.290474] [<80712170>] (dbs_check_cpu) from [<8071045c>] (od_dbs_
[ 360.290483] [<8071045c>] (od_dbs_timer) from [<807124f4>] (dbs_timer+
[ 360.290494] [<807124f4>] (dbs_timer) from [<80140ed0>] (process_
[ 360.290504] [<80140ed0>] (process_one_work) from [<801412dc>] (worker_
[ 360.290513] [<801412dc>] (worker_thread) from [<80147808>] (kthread+
[ 360.290525] [<80147808>] (kthread) from [<80108ebc>] (ret_from_
[ 360.290533] INFO: task kworker/3:2:135 blocked for more than 120 seconds.
[ 360.297430] Not tainted 4.4.0-1101-raspi2 #109~vc4dbg5
[ 360.303176] "echo 0 > /proc/sys/
[ 360.311129] kworker/3:2 D 80895384 0 135 2 0x00000000
[ 360.311141] Workqueue: events dbs_timer
[ 360.311151] [<80895384>] (__schedule) from [<8089589c>] (schedule+
[ 360.311160] [<8089589c>] (schedule) from [<80895c78>] (sch...