Xenial/raspi2 and RaspberryPi3A+: video not working

Bug #1805174 reported by Paolo Pisati
12
This bug affects 2 people
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_fb.fbwidth=1680 bcm2708_fb.fbheight=1050 bcm2708_fb.fbswap=1 dma.dmachans=0x7f35 bcm2709.boardrev=0x9020e0 bcm2709.serial=0x976d0cc5 bcm2709.uart_clock=48000000 bcm2709.disk_led_gpio=29 bcm2709.disk_led_active_low=0 vc_mem.mem_base=0x1ec00000 vc_mem.mem_size=0x20000000 dwc_otg.lpm_enable=0 console=ttyS0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait
[ 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_fb.fbwidth=1680 bcm2708_fb.fbheight=1050 bcm2708_fb.fbswap=1 dma.dmachans=0x7f35 bcm2709.boardrev=0x9020e0 bcm2709.serial=0x976d0cc5 bcm2709.uart_clock=48000000 bcm2709.disk_led_gpio=29 bcm2709.disk_led_active_low=0 vc_mem.mem_base=0x1ec00000 vc_mem.mem_size=0x20000000 dwc_otg.lpm_enable=0 console=ttyS0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait
[ 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.

Revision history for this message
Paolo Pisati (p-pisati) wrote :
Download full text (4.7 KiB)

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.
[ 360.276605] Not tainted 4.4.0-1101-raspi2 #109~vc4dbg5
[ 360.282360] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[ 360.290316] kworker/1:2 D 80895384 0 101 2 0x00000000
[ 360.290338] Workqueue: events dbs_timer
[ 360.290356] [<80895384>] (__schedule) from [<8089589c>] (schedule+0x50/0xa8)
[ 360.290366] [<8089589c>] (schedule) from [<80898c80>] (schedule_timeout+0x218/0x2a0)
[ 360.290376] [<80898c80>] (schedule_timeout) from [<80896668>] (wait_for_common+0xc8/0x1a0)
[ 360.290384] [<80896668>] (wait_for_common) from [<80896760>] (wait_for_completion+0x20/0x24)
[ 360.290395] [<80896760>] (wait_for_completion) from [<8073f0d4>] (rpi_firmware_transaction+0x78/0xd0)
[ 360.290406] [<8073f0d4>] (rpi_firmware_transaction) from [<8073f20c>] (rpi_firmware_property_list+0xe0/0x24c)
[ 360.290415] [<8073f20c>] (rpi_firmware_property_list) from [<8073f3ec>] (rpi_firmware_property+0x74/0xec)
[ 360.290425] [<8073f3ec>] (rpi_firmware_property) from [<80712c80>] (bcm2835_cpufreq_clock_property.constprop.1+0x58/0x80)
[ 360.290437] [<80712c80>] (bcm2835_cpufreq_clock_property.constprop.1) from [<80712d00>] (bcm2835_cpufreq_driver_target_index+0x58/0xdc)
[ 360.290446] [<80712d00>] (bcm2835_cpufreq_driver_target_index) from [<8070bb94>] (__cpufreq_driver_target+0x234/0x3b4)
[ 360.290456] [<8070bb94>] (__cpufreq_driver_target) from [<807101e8>] (od_check_cpu+0xdc/0xe0)
[ 360.290465] [<807101e8>] (od_check_cpu) from [<80712170>] (dbs_check_cpu+0x1d0/0x22c)
[ 360.290474] [<80712170>] (dbs_check_cpu) from [<8071045c>] (od_dbs_timer+0x60/0xf4)
[ 360.290483] [<8071045c>] (od_dbs_timer) from [<807124f4>] (dbs_timer+0x15c/0x1a8)
[ 360.290494] [<807124f4>] (dbs_timer) from [<80140ed0>] (process_one_work+0x160/0x50c)
[ 360.290504] [<80140ed0>] (process_one_work) from [<801412dc>] (worker_thread+0x60/0x5d0)
[ 360.290513] [<801412dc>] (worker_thread) from [<80147808>] (kthread+0x118/0x130)
[ 360.290525] [<80147808>] (kthread) from [<80108ebc>] (ret_from_fork+0x14/0x38)
[ 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/kernel/hung_task_timeout_secs" disables this message.
[ 360.311129] kworker/3:2 D 80895384 0 135 2 0x00000000
[ 360.311141] Workqueue: events dbs_timer
[ 360.311151] [<80895384>] (__schedule) from [<8089589c>] (schedule+0x50/0xa8)
[ 360.311160] [<8089589c>] (schedule) from [<80895c78>] (sch...

Read more...

Revision history for this message
Paolo Pisati (p-pisati) wrote :

Here is a pastebin of the above dmesg without the line wrap: http://paste.ubuntu.com/p/mGfz3St6c9/

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in linux-raspi2 (Ubuntu):
status: New → Confirmed
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.