Skip to content

RPi4: Dual HDMI display fails with vc4-kms-v3d-pi4 overlay #3701

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
mszyprow opened this issue Jul 2, 2020 · 6 comments
Open

RPi4: Dual HDMI display fails with vc4-kms-v3d-pi4 overlay #3701

mszyprow opened this issue Jul 2, 2020 · 6 comments

Comments

@mszyprow
Copy link
Contributor

mszyprow commented Jul 2, 2020

Describe the bug
Dual-TV display over HDMI doesn't work with vc4-kms-v3d-pi4 overlay on RPi4 (1GB version).

To reproduce
Connect 2 FHD HDMI TVs to RPi4, add "dtoverlay=vc4-kms-v3d-pi4" to config.txt, run rpi-update to switch to v5.4 kernel, "apt-get install libdrm-tests" to get modetest tool.

Then run:
modetest -Mvc4 -s 32:1920x1080 -v
[wait a while and press ENTER]
modetest -Mvc4 -s 38:1920x1080 -v
[wait a while and press ENTER]

DRM crashes and system runs slowly. Kernel dumps "Disabling IRQ #32" message. Futher runs of modetest tool fails.

System
2020-05-27-raspios-buster-lite-armhf.img + rpi-update to switch to v5.4 kernel.

  • Which model of Raspberry Pi? e.g. Pi3B+, PiZeroW
    Pi4
  • Which OS and version (cat /etc/rpi-issue)?
    Raspbian GNU/Linux 10
  • Which firmware version (vcgencmd version)?
    Jun 26 2020 14:48:17
    Copyright (c) 2012 Broadcom
    version b078012603a6a094178f959805996ad225a0d83b (clean) (release) (start)
  • Which kernel version (uname -a)?
    Linux raspberrypi 5.4.49-v7l+ bcm2835-camera: fix a bug in computation of frame timestamp #1323 SMP Fri Jun 26 14:40:18 BST 2020 armv7l GNU/Linux

Additional context
grep -v '#' /boot/config.txt | tr -s "\n"
dtparam=audio=on
[pi4]
dtoverlay=vc4-kms-v3d-pi4
[all]
enable_uart=1
core_freq_min=500

Logs
modetest -Mvc4 -c
Connectors:
id encoder status name size (mm) modes encoders
32 31 connected HDMI-A-1 1280x720 38 31
modes:
name refresh (Hz) hdisp hss hse htot vdisp vss vse vtot)
1920x1080 60 1920 2008 2052 2200 1080 1084 1089 1125 148500 flags: phsync, pvsync; type: preferred, driver
1920x1200 60 1920 2056 2256 2592 1200 1203 1209 1245 193476 flags: nhsync, pvsync; type: userdef
1920x1080 60 1920 2008 2052 2200 1080 1084 1089 1125 148500 flags: phsync, pvsync; type: driver
1920x1080 60 1920 2008 2052 2200 1080 1084 1089 1125 148352 flags: phsync, pvsync; type: driver
1920x1080i 60 1920 2008 2052 2200 1080 1084 1094 1125 74250 flags: phsync, pvsync, interlace; type: driver
1920x1080i 60 1920 2008 2052 2200 1080 1084 1094 1125 74250 flags: phsync, pvsync, interlace; type: driver
1920x1080i 60 1920 2008 2052 2200 1080 1084 1094 1125 74176 flags: phsync, pvsync, interlace; type: driver
1920x1080 50 1920 2448 2492 2640 1080 1084 1089 1125 148500 flags: phsync, pvsync; type: driver
1920x1080i 50 1920 2448 2492 2640 1080 1084 1094 1125 74250 flags: phsync, pvsync, interlace; type: driver
1920x1080i 50 1920 2448 2492 2640 1080 1084 1094 1125 74250 flags: phsync, pvsync, interlace; type: driver
1920x1080 30 1920 2008 2052 2200 1080 1084 1089 1125 74250 flags: phsync, pvsync; type: driver
1920x1080 30 1920 2008 2052 2200 1080 1084 1089 1125 74176 flags: phsync, pvsync; type: driver
1920x1080 25 1920 2448 2492 2640 1080 1084 1089 1125 74250 flags: phsync, pvsync; type: driver
1920x1080 24 1920 2558 2602 2750 1080 1084 1089 1125 74250 flags: phsync, pvsync; type: driver
1920x1080 24 1920 2558 2602 2750 1080 1084 1089 1125 74250 flags: phsync, pvsync; type: driver
1920x1080 24 1920 2558 2602 2750 1080 1084 1089 1125 74176 flags: phsync, pvsync; type: driver
1280x1024 60 1280 1328 1440 1688 1024 1025 1028 1066 108000 flags: phsync, pvsync; type: driver
1360x768 60 1360 1424 1536 1792 768 771 777 795 85500 flags: phsync, pvsync; type: driver
1280x720 60 1280 1390 1430 1650 720 725 730 750 74250 flags: phsync, pvsync; type: driver
1280x720 60 1280 1390 1430 1650 720 725 730 750 74176 flags: phsync, pvsync; type: driver
1280x720 50 1280 1720 1760 1980 720 725 730 750 74250 flags: phsync, pvsync; type: driver
1024x768 60 1024 1048 1184 1344 768 771 777 806 65000 flags: nhsync, nvsync; type: driver
800x600 60 800 840 968 1056 600 601 605 628 40000 flags: phsync, pvsync; type: driver
720x576 50 720 732 796 864 576 581 586 625 27000 flags: nhsync, nvsync; type: driver
720x576 50 720 732 796 864 576 581 586 625 27000 flags: nhsync, nvsync; type: driver
720x576i 50 720 732 795 864 576 580 586 625 13500 flags: nhsync, nvsync, interlace, dblclk; type: driver
720x576i 50 720 732 795 864 576 580 586 625 13500 flags: nhsync, nvsync, interlace, dblclk; type: driver
720x480 60 720 736 798 858 480 489 495 525 27027 flags: nhsync, nvsync; type: driver
720x480 60 720 736 798 858 480 489 495 525 27027 flags: nhsync, nvsync; type: driver
720x480 60 720 736 798 858 480 489 495 525 27000 flags: nhsync, nvsync; type: driver
720x480 60 720 736 798 858 480 489 495 525 27000 flags: nhsync, nvsync; type: driver
720x480i 60 720 739 801 858 480 488 494 525 13514 flags: nhsync, nvsync, interlace, dblclk; type: driver
720x480i 60 720 739 801 858 480 488 494 525 13514 flags: nhsync, nvsync, interlace, dblclk; type: driver
720x480i 60 720 739 801 858 480 488 494 525 13500 flags: nhsync, nvsync, interlace, dblclk; type: driver
720x480i 60 720 739 801 858 480 488 494 525 13500 flags: nhsync, nvsync, interlace, dblclk; type: driver
640x480 60 640 656 752 800 480 490 492 525 25200 flags: nhsync, nvsync; type: driver
640x480 60 640 656 752 800 480 490 492 525 25175 flags: nhsync, nvsync; type: driver
640x480 60 640 656 752 800 480 490 492 525 25175 flags: nhsync, nvsync; type: driver
props:
1 EDID:
flags: immutable blob
blobs:

            value:
                    00ffffffffffff00410c000001010101
                    1c160103808048782ae692a3544a9926
                    0f4a4c21080081800101010101010101
                    010101010101023a801871382d40582c
                    450000d05200001e662150b051001b30
                    4070360076f23100001e000000fc0050
                    48494c4950530a2020202020000000fd
                    00303e0f4611000a2020202020200132
                    020333f152901f202221051404131203
                    1102160715060126097f05157f508301
                    00006c030c004000b82dc02e2e2e2ee3
                    050301023a801871382d40582c450000
                    d05200001e011d803e73382d407e2c45
                    8000d05200001e011d80d0721c162010
                    2c258000d05200009e011d8018711c16
                    20582c250000d05200009e0000000078
    2 DPMS:
            flags: enum
            enums: On=0 Standby=1 Suspend=2 Off=3
            value: 0
    5 link-status:
            flags: enum
            enums: Good=0 Bad=1
            value: 0
    6 non-desktop:
            flags: immutable range
            values: 0 1
            value: 0
    4 TILE:
            flags: immutable blob
            blobs:

            value:
    20 CRTC_ID:
            flags: object
            value: 65
    33 left margin:
            flags: range
            values: 0 100
            value: 0
    34 right margin:
            flags: range
            values: 0 100
            value: 0
    35 top margin:
            flags: range
            values: 0 100
            value: 0
    36 bottom margin:
            flags: range
            values: 0 100
            value: 0

38 37 connected HDMI-A-2 1280x720 37 37
modes:
name refresh (Hz) hdisp hss hse htot vdisp vss vse vtot)
1920x1080 60 1920 2008 2052 2200 1080 1084 1089 1125 148500 flags: phsync, pvsync; type: preferred, driver
1920x1080 60 1920 2008 2052 2200 1080 1084 1089 1125 148500 flags: phsync, pvsync; type: driver
1920x1080 60 1920 2008 2052 2200 1080 1084 1089 1125 148352 flags: phsync, pvsync; type: driver
1920x1080i 60 1920 2008 2052 2200 1080 1084 1094 1125 74250 flags: phsync, pvsync, interlace; type: driver
1920x1080i 60 1920 2008 2052 2200 1080 1084 1094 1125 74250 flags: phsync, pvsync, interlace; type: driver
1920x1080i 60 1920 2008 2052 2200 1080 1084 1094 1125 74176 flags: phsync, pvsync, interlace; type: driver
1920x1080 50 1920 2448 2492 2640 1080 1084 1089 1125 148500 flags: phsync, pvsync; type: driver
1920x1080i 50 1920 2448 2492 2640 1080 1084 1094 1125 74250 flags: phsync, pvsync, interlace; type: driver
1920x1080i 50 1920 2448 2492 2640 1080 1084 1094 1125 74250 flags: phsync, pvsync, interlace; type: driver
1920x1080 30 1920 2008 2052 2200 1080 1084 1089 1125 74250 flags: phsync, pvsync; type: driver
1920x1080 30 1920 2008 2052 2200 1080 1084 1089 1125 74176 flags: phsync, pvsync; type: driver
1920x1080 25 1920 2448 2492 2640 1080 1084 1089 1125 74250 flags: phsync, pvsync; type: driver
1920x1080 24 1920 2558 2602 2750 1080 1084 1089 1125 74250 flags: phsync, pvsync; type: driver
1920x1080 24 1920 2558 2602 2750 1080 1084 1089 1125 74250 flags: phsync, pvsync; type: driver
1920x1080 24 1920 2558 2602 2750 1080 1084 1089 1125 74176 flags: phsync, pvsync; type: driver
1280x1024 60 1280 1328 1440 1688 1024 1025 1028 1066 108000 flags: phsync, pvsync; type: driver
1360x768 60 1360 1424 1536 1792 768 771 777 795 85500 flags: phsync, pvsync; type: driver
1280x720 60 1280 1390 1430 1650 720 725 730 750 74250 flags: phsync, pvsync; type: driver
1280x720 60 1280 1390 1430 1650 720 725 730 750 74176 flags: phsync, pvsync; type: driver
1280x720 50 1280 1720 1760 1980 720 725 730 750 74250 flags: phsync, pvsync; type: driver
1024x768 60 1024 1048 1184 1344 768 771 777 806 65000 flags: nhsync, nvsync; type: driver
800x600 60 800 840 968 1056 600 601 605 628 40000 flags: phsync, pvsync; type: driver
720x576 50 720 732 796 864 576 581 586 625 27000 flags: nhsync, nvsync; type: driver
720x576 50 720 732 796 864 576 581 586 625 27000 flags: nhsync, nvsync; type: driver
720x576i 50 720 732 795 864 576 580 586 625 13500 flags: nhsync, nvsync, interlace, dblclk; type: driver
720x576i 50 720 732 795 864 576 580 586 625 13500 flags: nhsync, nvsync, interlace, dblclk; type: driver
720x480 60 720 736 798 858 480 489 495 525 27027 flags: nhsync, nvsync; type: driver
720x480 60 720 736 798 858 480 489 495 525 27027 flags: nhsync, nvsync; type: driver
720x480 60 720 736 798 858 480 489 495 525 27000 flags: nhsync, nvsync; type: driver
720x480 60 720 736 798 858 480 489 495 525 27000 flags: nhsync, nvsync; type: driver
720x480i 60 720 739 801 858 480 488 494 525 13514 flags: nhsync, nvsync, interlace, dblclk; type: driver
720x480i 60 720 739 801 858 480 488 494 525 13514 flags: nhsync, nvsync, interlace, dblclk; type: driver
720x480i 60 720 739 801 858 480 488 494 525 13500 flags: nhsync, nvsync, interlace, dblclk; type: driver
720x480i 60 720 739 801 858 480 488 494 525 13500 flags: nhsync, nvsync, interlace, dblclk; type: driver
640x480 60 640 656 752 800 480 490 492 525 25200 flags: nhsync, nvsync; type: driver
640x480 60 640 656 752 800 480 490 492 525 25175 flags: nhsync, nvsync; type: driver
640x480 60 640 656 752 800 480 490 492 525 25175 flags: nhsync, nvsync; type: driver
props:
1 EDID:
flags: immutable blob
blobs:

            value:
                    00ffffffffffff00410c000001010101
                    1c160103808048782ae692a3544a9926
                    0f4a4c21080081800101010101010101
                    010101010101023a801871382d40582c
                    450000d05200001e662150b051001b30
                    4070360076f23100001e000000fc0050
                    48494c4950530a2020202020000000fd
                    00303e0f4611000a2020202020200132
                    020333f152901f202221051404131203
                    1102160715060126097f05157f508301
                    00006c030c004000b82dc02e2e2e2ee3
                    050301023a801871382d40582c450000
                    d05200001e011d803e73382d407e2c45
                    8000d05200001e011d80d0721c162010
                    2c258000d05200009e011d8018711c16
                    20582c250000d05200009e0000000078
    2 DPMS:
            flags: enum
            enums: On=0 Standby=1 Suspend=2 Off=3
            value: 0
    5 link-status:
            flags: enum
            enums: Good=0 Bad=1
            value: 0
    6 non-desktop:
            flags: immutable range
            values: 0 1
            value: 0
    4 TILE:
            flags: immutable blob
            blobs:

            value:
    20 CRTC_ID:
            flags: object
            value: 72
    33 left margin:
            flags: range
            values: 0 100
            value: 0
    34 right margin:
            flags: range
            values: 0 100
            value: 0
    35 top margin:
            flags: range
            values: 0 100
            value: 0
    36 bottom margin:
            flags: range
            values: 0 100
            value: 0

dmesg | tail -n60
[ 15.823630] Bluetooth: HCI UART protocol H4 registered
[ 15.823708] Bluetooth: HCI UART protocol Three-wire (H5) registered
[ 15.824033] Bluetooth: HCI UART protocol Broadcom registered
[ 15.992540] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[ 15.992546] Bluetooth: BNEP filters: protocol multicast
[ 15.992559] Bluetooth: BNEP socket layer initialized
[ 1089.294406] irq 32: nobody cared (try booting with the "irqpoll" option)
[ 1089.294414] CPU: 0 PID: 0 Comm: swapper/0 Tainted: G C 5.4.49-v7l+ #1323
[ 1089.294417] Hardware name: BCM2711
[ 1089.294421] Backtrace:
[ 1089.294436] [] (dump_backtrace) from [] (show_stack+0x20/0x24)
[ 1089.294441] r6:c1200000 r5:00000000 r4:c129c6b8 r3:3dd3f420
[ 1089.294450] [] (show_stack) from [] (dump_stack+0xe0/0x124)
[ 1089.294458] [] (dump_stack) from [] (__report_bad_irq+0x38/0xd0)
[ 1089.294463] r8:da848800 r7:00000020 r6:da97b300 r5:00000000 r4:da97b300 r3:3dd3f420
[ 1089.294470] [] (__report_bad_irq) from [] (note_interrupt+0x280/0x2d0)
[ 1089.294475] r6:da97b300 r5:00000000 r4:da97b300 r3:0001863c
[ 1089.294481] [] (note_interrupt) from [] (handle_irq_event_percpu+0x6c/0x8c)
[ 1089.294486] r10:0000016a r9:c1200000 r8:da848800 r7:00000001 r6:da97b300 r5:00000000
[ 1089.294490] r4:c1204f88 r3:00000000
[ 1089.294496] [] (handle_irq_event_percpu) from [] (handle_irq_event+0x54/0x78)
[ 1089.294500] r6:c1201ed0 r5:da97b368 r4:da97b300
[ 1089.294506] [] (handle_irq_event) from [] (handle_fasteoi_irq+0xb4/0x194)
[ 1089.294511] r6:c1201ed0 r5:c1205a14 r4:da97b300 r3:000186a0
[ 1089.294517] [] (handle_fasteoi_irq) from [] (generic_handle_irq+0x34/0x44)
[ 1089.294521] r5:00000000 r4:c10a82e4
[ 1089.294526] [] (generic_handle_irq) from [] (__handle_domain_irq+0x6c/0xc4)
[ 1089.294533] [] (__handle_domain_irq) from [] (gic_handle_irq+0x4c/0x88)
[ 1089.294538] r8:f0815000 r7:f0814000 r6:c1201db0 r5:f081400c r4:c1205a14 r3:c1201db0
[ 1089.294543] [] (gic_handle_irq) from [] (__irq_svc+0x5c/0x7c)
[ 1089.294547] Exception stack(0xc1201db0 to 0xc1201df8)
[ 1089.294551] 1da0: c02023f8 00000000 60000193 c10a8300
[ 1089.294556] 1dc0: 00200002 00000000 00000000 00000001 da848800 00000282 0000016a c1201e6c
[ 1089.294561] 1de0: c12053ac c1201e00 00000000 c02023fc 60000113 ffffffff
[ 1089.294566] r8:da848800 r7:c1201de4 r6:ffffffff r5:60000113 r4:c02023fc r3:3dd3f420
[ 1089.294574] [] (__do_softirq) from [] (irq_exit+0x100/0x110)
[ 1089.294578] r10:0000016a r9:c1200000 r8:da848800 r7:00000001 r6:00000000 r5:00000000
[ 1089.294582] r4:c10a82e4
[ 1089.294588] [] (irq_exit) from [] (__handle_domain_irq+0x70/0xc4)
[ 1089.294593] [] (__handle_domain_irq) from [] (gic_handle_irq+0x4c/0x88)
[ 1089.294598] r8:f0815000 r7:f0814000 r6:c1201ed0 r5:f081400c r4:c1205a14 r3:c1201ed0
[ 1089.294603] [] (gic_handle_irq) from [] (__irq_svc+0x5c/0x7c)
[ 1089.294607] Exception stack(0xc1201ed0 to 0xc1201f18)
[ 1089.294611] 1ec0: c0209b94 00000000 60000093 c021c160
[ 1089.294616] 1ee0: c1204fb4 c1200000 c1204ffc 00000001 c12a30ad c106ca48 0000016a c1201f2c
[ 1089.294620] 1f00: c12053ac c1201f20 00000000 c0209b98 60000013 ffffffff
[ 1089.294625] r8:c12a30ad r7:c1201f04 r6:ffffffff r5:60000013 r4:c0209b98 r3:3dd3f420
[ 1089.294633] [] (arch_cpu_idle) from [] (default_idle_call+0x34/0x48)
[ 1089.294640] [] (default_idle_call) from [] (do_idle+0xec/0x170)
[ 1089.294645] [] (do_idle) from [] (cpu_startup_entry+0x28/0x2c)
[ 1089.294649] r8:ffffffff r7:c12b5440 r6:c106ca48 r5:c12b5498 r4:000000ce r3:c1201f48
[ 1089.294655] [] (cpu_startup_entry) from [] (rest_init+0xbc/0xc0)
[ 1089.294662] [] (rest_init) from [] (arch_call_rest_init+0x18/0x1c)
[ 1089.294666] r4:c1204f88 r3:c109d270
[ 1089.294672] [] (arch_call_rest_init) from [] (start_kernel+0x4e4/0x518)
[ 1089.294678] [] (start_kernel) from [<00000000>] (0x0)
[ 1089.294681] handlers:
[ 1089.294720] [<5b038e4c>] vc4_hvs_irq_handler [vc4]
[ 1089.294724] Disabling IRQ #32
[ 1099.379128] [drm:drm_atomic_helper_wait_for_flip_done [drm_kms_helper]] ERROR [CRTC:72:crtc-3] flip_done timed out

@pelwell
Copy link
Contributor

pelwell commented Jul 2, 2020

dtoverlay=vc4-kms-v3d-pi4 should not be necessary with an up-to-date firmware - dtoverlay=vc4-kms-v3d is sufficient. If you find that it is necessary then I would update your firmware so that it can't be causing other problems.

@mszyprow
Copy link
Contributor Author

mszyprow commented Jul 2, 2020

Okay, I didn't know that dtoverlay=vc4-kms-v3d is now supported on RPi4 too. Anyway, the issue is same when I used it.

@DylanGauchFutureDesigns
Copy link

I am having the same issue. When I enable dtoverlay=vc4-kms-v3d, I am able to access the i2c buses, but am not able to use both HDMI ports. However, if I switch it back to dtoverlay=vc4-fkms-v3d I am able to use both HDMI ports and not able to access the i2c busses. I need to be able to do both.

@JamesH65
Copy link
Contributor

JamesH65 commented Oct 6, 2020

Standard KMS is not yet out of beta, so should not be expected to work in all cases. As for I2C not working with FKMS, I suspect you have a bad DT tree overlay entry (or none at all).

@DylanGauchFutureDesigns
Copy link

When using FKMS, I am having the same issues as described at issue #3152.

@6by9
Copy link
Contributor

6by9 commented Oct 9, 2020

When using FKMS, I am having the same issues as described at issue #3152.

Correct. With FKMS the firmware is in charge of the HDMI I2C interfaces.

If you want to use vc4-kms-v3d on a Pi4, then please compile your own kernel from the rpi-5.9.y branch as that is now fairly stable with the patches that have been accepted for the mainline kernel.
There is still a call to make as to whether we attempt to backport to rpi-5.4.y, or jump forward to rpi-5.9.y sooner than we might otherwise.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants