Skip to content
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

CRTC vblank wait timed out #2

Open
cristianc opened this issue Nov 13, 2023 · 9 comments
Open

CRTC vblank wait timed out #2

cristianc opened this issue Nov 13, 2023 · 9 comments

Comments

@cristianc
Copy link

cristianc commented Nov 13, 2023

Hi, I'm trying to run this driver against 6.6 kernel version (I'm not sure about which additional information are needed).

When I turn on and connect the display, the system freezes and I get the following kernel messages (through journalctl previous boot log):

nov 10 12:42:33 cristian-corebook kernel: usb 2-2: [drm] *ERROR* flip_done timed out
nov 10 12:42:33 cristian-corebook kernel: usb 2-2: [drm] *ERROR* [CRTC:34:crtc-0] commit wait timed out
nov 10 12:42:43 cristian-corebook kernel: usb 2-2: [drm] *ERROR* flip_done timed out
nov 10 12:42:43 cristian-corebook kernel: usb 2-2: [drm] *ERROR* [PLANE:32:plane-0] commit wait timed out
nov 10 12:42:43 cristian-corebook kernel: ------------[ cut here ]------------
nov 10 12:42:43 cristian-corebook kernel: [CRTC:34:crtc-0] vblank wait timed out
nov 10 12:42:43 cristian-corebook kernel: WARNING: CPU: 2 PID: 960 at drivers/gpu/drm/drm_atomic_helper.c:1679 drm_atomic_helper_wait_for_vblanks.part.0+0x23d/0x250
nov 10 12:42:43 cristian-corebook kernel: Modules linked in: fl2000(OE) rfcomm ccm cmac algif_hash algif_skcipher af_alg uvcvideo videobuf2_vmalloc uvc videobuf2_memops videobuf2_v4l2 videodev videobuf2_common mc bnep qrtr btusb btrtl btintel btbcm btmtk intel_rapl_msr snd_sof_amd_rembrandt intel_rapl_common snd_sof_amd_renoir bluetooth snd_sof_amd_acp snd_sof_pci snd_sof_xtensa_dsp ecdh_generic edac_mce_amd snd_sof kvm_amd snd_hda_codec_realtek amdgpu snd_hda_codec_generic snd_sof_utils kvm ledtrig_audio snd_hda_codec_hdmi joydev snd_soc_core iwlmvm mousedev snd_hda_intel snd_compress irqbypass ac97_bus snd_intel_dspcfg crct10dif_pclmul snd_pcm_dmaengine drm_exec snd_intel_sdw_acpi crc32_pclmul amdxcp snd_pci_ps polyval_clmulni mac80211 snd_hda_codec drm_buddy snd_rpl_pci_acp6x polyval_generic gpu_sched gf128mul snd_acp_pci snd_hda_core i2c_algo_bit ghash_clmulni_intel hid_multitouch snd_acp_legacy_common libarc4 sha512_ssse3 drm_suballoc_helper snd_hwdep snd_pci_acp6x i2c_hid_acpi drm_ttm_helper vfat i2c_hid snd_pci_acp5x aesni_intel snd_pcm ttm
nov 10 12:42:43 cristian-corebook kernel:  fat snd_rn_pci_acp3x crypto_simd iwlwifi drm_display_helper snd_timer snd_acp_config cryptd cec snd snd_soc_acpi video psmouse rapl sp5100_tco pcspkr acpi_cpufreq k10temp snd_pci_acp3x ccp soundcore i2c_amd_mp2_plat i2c_piix4 wmi cfg80211 i2c_amd_mp2_pci mac_hid rfkill squashfs uinput vboxnetflt(OE) vboxnetadp(OE) vboxdrv(OE) crypto_user fuse dm_mod loop bpf_preload ip_tables x_tables ext4 crc32c_generic crc16 mbcache jbd2 serio_raw atkbd libps2 vivaldi_fmap nvme crc32c_intel xhci_pci nvme_core i8042 xhci_pci_renesas nvme_common serio
nov 10 12:42:43 cristian-corebook kernel: CPU: 2 PID: 960 Comm: Xorg Tainted: G    B   W  OE      6.6.0-1-MANJARO #1 3dc4a4a6ba876de190ca2fd82f9af30616aeb92e
nov 10 12:42:43 cristian-corebook kernel: Hardware name: Microtech CoreBook/CB15SH35, BIOS XPSH_LM15601.15.1.corebook 03/12/2021
nov 10 12:42:43 cristian-corebook kernel: RIP: 0010:drm_atomic_helper_wait_for_vblanks.part.0+0x23d/0x250
nov 10 12:42:43 cristian-corebook kernel: Code: 01 ef 48 83 c7 08 e8 02 4b 82 ff 45 85 f6 0f 85 cc fe ff ff 49 8b 54 24 20 41 8b 74 24 60 48 c7 c7 b0 d0 ec a3 e8 33 d4 7a ff <0f> 0b e9 af fe ff ff e8 77 45 4a 00 0f 1f 80 00 00 00 00 90 90 90
nov 10 12:42:43 cristian-corebook kernel: RSP: 0018:ffffaeeb81833b78 EFLAGS: 00010286
nov 10 12:42:43 cristian-corebook kernel: RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000027
nov 10 12:42:43 cristian-corebook kernel: RDX: ffff96ac18ea1708 RSI: 0000000000000001 RDI: ffff96ac18ea1700
nov 10 12:42:43 cristian-corebook kernel: RBP: 0000000000000000 R08: 0000000000000000 R09: ffffaeeb81833a00
nov 10 12:42:43 cristian-corebook kernel: R10: 0000000000000003 R11: ffffffffa46c8d08 R12: ffff96ab16ade670
nov 10 12:42:43 cristian-corebook kernel: R13: ffff96ab17a10080 R14: 0000000000000000 R15: 0000000000000000
nov 10 12:42:43 cristian-corebook kernel: FS:  00007f13b99da5c0(0000) GS:ffff96ac18e80000(0000) knlGS:0000000000000000
nov 10 12:42:43 cristian-corebook kernel: CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
nov 10 12:42:43 cristian-corebook kernel: CR2: 00007f4149ac8cc8 CR3: 0000000118be2000 CR4: 00000000003506e0
nov 10 12:42:43 cristian-corebook kernel: Call Trace:
nov 10 12:42:43 cristian-corebook kernel:  <TASK>
nov 10 12:42:43 cristian-corebook kernel:  ? drm_atomic_helper_wait_for_vblanks.part.0+0x23d/0x250
nov 10 12:42:43 cristian-corebook kernel:  ? __warn+0x81/0x130
nov 10 12:42:43 cristian-corebook kernel:  ? drm_atomic_helper_wait_for_vblanks.part.0+0x23d/0x250
nov 10 12:42:43 cristian-corebook kernel:  ? report_bug+0x171/0x1a0
nov 10 12:42:43 cristian-corebook kernel:  ? prb_read_valid+0x1b/0x30
nov 10 12:42:43 cristian-corebook kernel:  ? srso_return_thunk+0x5/0x10
nov 10 12:42:43 cristian-corebook kernel:  ? handle_bug+0x3c/0x80
nov 10 12:42:43 cristian-corebook kernel:  ? exc_invalid_op+0x17/0x70
nov 10 12:42:43 cristian-corebook kernel:  ? asm_exc_invalid_op+0x1a/0x20
nov 10 12:42:43 cristian-corebook kernel:  ? drm_atomic_helper_wait_for_vblanks.part.0+0x23d/0x250
nov 10 12:42:43 cristian-corebook kernel:  ? drm_atomic_helper_wait_for_vblanks.part.0+0x23d/0x250
nov 10 12:42:43 cristian-corebook kernel:  ? __pfx_autoremove_wake_function+0x10/0x10
nov 10 12:42:43 cristian-corebook kernel:  drm_atomic_helper_commit_tail+0x74/0x90
nov 10 12:42:43 cristian-corebook kernel:  commit_tail+0xd1/0x130
nov 10 12:42:43 cristian-corebook kernel:  drm_atomic_helper_commit+0x11a/0x140
nov 10 12:42:43 cristian-corebook kernel:  drm_atomic_commit+0x9a/0xd0
nov 10 12:42:43 cristian-corebook kernel:  ? __pfx___drm_printfn_info+0x10/0x10
nov 10 12:42:43 cristian-corebook kernel:  drm_atomic_helper_dirtyfb+0x1ad/0x280
nov 10 12:42:43 cristian-corebook kernel:  drm_mode_dirtyfb_ioctl+0xfe/0x190
nov 10 12:42:43 cristian-corebook kernel:  ? __pfx_drm_mode_dirtyfb_ioctl+0x10/0x10
nov 10 12:42:43 cristian-corebook kernel:  drm_ioctl_kernel+0xcd/0x170
nov 10 12:42:43 cristian-corebook kernel:  drm_ioctl+0x26d/0x4b0
nov 10 12:42:43 cristian-corebook kernel:  ? __pfx_drm_mode_dirtyfb_ioctl+0x10/0x10
nov 10 12:42:43 cristian-corebook kernel:  __x64_sys_ioctl+0x97/0xd0
nov 10 12:42:43 cristian-corebook kernel:  do_syscall_64+0x60/0x90
nov 10 12:42:43 cristian-corebook kernel:  ? srso_return_thunk+0x5/0x10
nov 10 12:42:43 cristian-corebook kernel:  ? syscall_exit_to_user_mode+0x2b/0x40
nov 10 12:42:43 cristian-corebook kernel:  ? srso_return_thunk+0x5/0x10
nov 10 12:42:43 cristian-corebook kernel:  ? do_syscall_64+0x6c/0x90
nov 10 12:42:43 cristian-corebook kernel:  entry_SYSCALL_64_after_hwframe+0x6e/0xd8
nov 10 12:42:43 cristian-corebook kernel: RIP: 0033:0x7f13ba3c83af
nov 10 12:42:43 cristian-corebook kernel: Code: 00 48 89 44 24 18 31 c0 48 8d 44 24 60 c7 04 24 10 00 00 00 48 89 44 24 08 48 8d 44 24 20 48 89 44 24 10 b8 10 00 00 00 0f 05 <89> c2 3d 00 f0 ff ff 77 18 48 8b 44 24 18 64 48 2b 04 25 28 00 00
nov 10 12:42:43 cristian-corebook kernel: RSP: 002b:00007ffc3d7e3ce0 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
nov 10 12:42:43 cristian-corebook kernel: RAX: ffffffffffffffda RBX: 000055be5367c260 RCX: 00007f13ba3c83af
nov 10 12:42:43 cristian-corebook kernel: RDX: 00007ffc3d7e3d70 RSI: 00000000c01864b1 RDI: 000000000000002b
nov 10 12:42:43 cristian-corebook kernel: RBP: 00007ffc3d7e3d70 R08: 0000000000000001 R09: 0000000000000001
nov 10 12:42:43 cristian-corebook kernel: R10: 00007f13ba2cb3f0 R11: 0000000000000246 R12: 00000000c01864b1
nov 10 12:42:43 cristian-corebook kernel: R13: 000000000000002b R14: 000055be5340bf90 R15: 0000000000000008
nov 10 12:42:43 cristian-corebook kernel:  </TASK>
nov 10 12:42:43 cristian-corebook kernel: ---[ end trace 0000000000000000 ]---
nov 10 12:42:53 cristian-corebook kernel: usb 2-2: [drm] *ERROR* flip_done timed out
nov 10 12:42:53 cristian-corebook kernel: usb 2-2: [drm] *ERROR* [CRTC:34:crtc-0] commit wait timed out

It seems that system crashes against drm_atomic_helper_wait_for_vblanks. I've looked for info about this issue unsuccessfully.
How to start to investigate seriously? Any ideas?
Waiting for a reply, thanks.

@rhgndf
Copy link
Owner

rhgndf commented Nov 24, 2023

Hi, I have seen that happen previously while debugging, this happens when the vblank function isn't called on time in this line:

drm_crtc_handle_vblank(&fl2000_dev->pipe.crtc);
I modified it in the latest commit so the vblank function is always called.

However, I am not able to replicate this on kernel 6.6.1-1-MANJARO, so I don't have a good idea why it crashes.

@cristianc
Copy link
Author

Unfortunately, also getting the latest commit, I still get system hang:

usbcore: registered new interface driver fl2000_usb
[system] Activating via systemd: service name='org.freedesktop.home1' unit='dbus-org.freedesktop.home1.service' requested by ':1.80' (uid=0 pid=1978 comm="sudo dmesg -w")
[system] Activation via systemd failed for unit 'dbus-org.freedesktop.home1.service': Unit dbus-org.freedesktop.home1.service not found.
cristian : TTY=pts/0 ; PWD=/home/cristian/fl2000_drm ; USER=root ; COMMAND=/usr/bin/dmesg -w
pam_unix(sudo:session): session opened for user root(uid=0) by cristian(uid=1000)
usb 2-2: new SuperSpeed USB device number 2 using xhci_hcd
usb 2-2: config 1 interface 1 altsetting 0 has a duplicate endpoint with address 0x81, skipping
usb 2-2: config 1 interface 1 altsetting 0 has a duplicate endpoint with address 0x1, skipping
usb 2-2: config 1 interface 1 altsetting 1 has a duplicate endpoint with address 0x81, skipping
usb 2-2: config 1 interface 1 altsetting 1 has a duplicate endpoint with address 0x1, skipping
usb 2-2: config 1 interface 1 altsetting 2 has a duplicate endpoint with address 0x81, skipping
usb 2-2: config 1 interface 1 altsetting 2 has a duplicate endpoint with address 0x1, skipping
usb 2-2: config 1 interface 1 altsetting 3 has a duplicate endpoint with address 0x81, skipping
usb 2-2: config 1 interface 1 altsetting 3 has a duplicate endpoint with address 0x1, skipping
usb 2-2: config 1 interface 1 altsetting 4 has a duplicate endpoint with address 0x81, skipping
usb 2-2: config 1 interface 1 altsetting 4 has a duplicate endpoint with address 0x1, skipping
usb 2-2: config 1 interface 1 altsetting 5 has a duplicate endpoint with address 0x81, skipping
usb 2-2: config 1 interface 1 altsetting 5 has a duplicate endpoint with address 0x1, skipping
usb 2-2: config 1 interface 1 altsetting 6 has a duplicate endpoint with address 0x81, skipping
usb 2-2: config 1 interface 1 altsetting 6 has a duplicate endpoint with address 0x1, skipping
usb 2-2: New USB device found, idVendor=1d5c, idProduct=2000, bcdDevice= 2.00
usb 2-2: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[drm] Initialized fl2000_drm 1.0.1 20181001 for 2-2 on minor 0
checking bus 2, device 2: "/sys/devices/pci0000:00/0000:00:08.1/0000:03:00.3/usb2/2-2"
bus: 2, device: 2 was not an MTP device
usb 2-2: [drm] Cannot find any crtc or sizes
usb 2-2: [drm] Cannot find any crtc or sizes
usb 2-2: is sink event 1
usb 2-2: interrupt
usb 2-2: [drm] fb1: fl2000_drmdrmfb frame buffer device
checking bus 2, device 2: "/sys/devices/pci0000:00/0000:00:08.1/0000:03:00.3/usb2/2-2"
bus: 2, device: 2 was not an MTP device
xhci_hcd 0000:03:00.3: WARNING: Host System Error
xhci_hcd 0000:03:00.3: AMD-Vi: Event logged [IO_PAGE_FAULT domain=0x000b address=0xdec00000 flags=0x0000]
xhci_hcd 0000:03:00.3: AMD-Vi: Event logged [IO_PAGE_FAULT domain=0x000b address=0xdec01000 flags=0x0000]
xhci_hcd 0000:03:00.3: AMD-Vi: Event logged [IO_PAGE_FAULT domain=0x000b address=0xdec01500 flags=0x0000]
xhci_hcd 0000:03:00.3: AMD-Vi: Event logged [IO_PAGE_FAULT domain=0x000b address=0xdec00d00 flags=0x0000]
xhci_hcd 0000:03:00.3: AMD-Vi: Event logged [IO_PAGE_FAULT domain=0x000b address=0xdec00e00 flags=0x0000]
xhci_hcd 0000:03:00.3: AMD-Vi: Event logged [IO_PAGE_FAULT domain=0x000b address=0xdec01600 flags=0x0000]
xhci_hcd 0000:03:00.3: AMD-Vi: Event logged [IO_PAGE_FAULT domain=0x000b address=0xdec00f00 flags=0x0000]
xhci_hcd 0000:03:00.3: AMD-Vi: Event logged [IO_PAGE_FAULT domain=0x000b address=0xdec01a00 flags=0x0000]
xhci_hcd 0000:03:00.3: AMD-Vi: Event logged [IO_PAGE_FAULT domain=0x000b address=0xdec01800 flags=0x0000]
xhci_hcd 0000:03:00.3: AMD-Vi: Event logged [IO_PAGE_FAULT domain=0x000b address=0xdec01700 flags=0x0000]
------------[ cut here ]------------
[CRTC:34:crtc-0] vblank wait timed out
WARNING: CPU: 6 PID: 1118 at drivers/gpu/drm/drm_atomic_helper.c:1679 drm_atomic_helper_wait_for_vblanks.part.0+0x23d/0x250
Modules linked in: fl2000(OE) rfcomm ccm cmac algif_hash algif_skcipher af_alg bnep btusb btrtl btintel btbcm btmtk bluetooth ecdh_generic usbhid amdgpu snd_sof_amd_vangogh snd_sof_amd_rembrandt qrtr snd_sof_amd_renoir snd_sof_amd_acp snd_sof_pci snd_sof_xtensa_dsp snd_hda_codec_realtek snd_sof snd_hda_codec_generic snd_sof_utils ledtrig_audio snd_hda_codec_hdmi snd_soc_core snd_hda_intel snd_intel_dspcfg snd_compress drm_exec snd_intel_sdw_acpi amdxcp ac97_bus drm_buddy snd_hda_codec snd_pcm_dmaengine snd_pci_ps gpu_sched snd_rpl_pci_acp6x snd_hda_core snd_acp_pci i2c_algo_bit snd_acp_legacy_common snd_hwdep snd_pci_acp6x drm_suballoc_helper drm_ttm_helper snd_pcm snd_pci_acp5x ttm snd_timer snd_rn_pci_acp3x drm_display_helper snd snd_acp_config soundcore cec snd_soc_acpi snd_pci_acp3x uvcvideo videobuf2_vmalloc uvc videobuf2_memops videobuf2_v4l2 intel_rapl_msr videodev intel_rapl_common videobuf2_common mc edac_mce_amd kvm_amd iwlmvm joydev ccp mousedev kvm mac80211 irqbypass crct10dif_pclmul
 crc32_pclmul polyval_clmulni polyval_generic gf128mul hid_multitouch ghash_clmulni_intel libarc4 sha512_ssse3 vfat i2c_hid_acpi aesni_intel i2c_hid fat crypto_simd cryptd iwlwifi sp5100_tco rapl i2c_amd_mp2_plat psmouse pcspkr k10temp acpi_cpufreq i2c_piix4 video wmi cfg80211 i2c_amd_mp2_pci mac_hid rfkill squashfs uinput vboxnetflt(OE) vboxnetadp(OE) vboxdrv(OE) crypto_user fuse dm_mod loop bpf_preload ip_tables x_tables ext4 crc32c_generic crc16 mbcache jbd2 serio_raw atkbd libps2 nvme vivaldi_fmap crc32c_intel nvme_core xhci_pci i8042 nvme_common xhci_pci_renesas serio
CPU: 6 PID: 1118 Comm: Xorg Tainted: G           OE      6.6.1-1-MANJARO #1 687b15099018d0e5ba5b23b34b7d0a03393c64a8
Hardware name: Microtech CoreBook/CB15SH35, BIOS XPSH_LM15601.15.1.corebook 03/12/2021
RIP: 0010:drm_atomic_helper_wait_for_vblanks.part.0+0x23d/0x250
Code: 01 ef 48 83 c7 08 e8 f2 3f 82 ff 45 85 f6 0f 85 cc fe ff ff 49 8b 54 24 20 41 8b 74 24 60 48 c7 c7 a8 e0 ec 8f e8 23 c9 7a ff <0f> 0b e9 af fe ff ff e8 67 50 4a 00 0f 1f 80 00 00 00 00 90 90 90
RSP: 0018:ffffab34c125fbd0 EFLAGS: 00010282
RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000027
RDX: ffff8ee0d8fa1708 RSI: 0000000000000001 RDI: ffff8ee0d8fa1700
RBP: 0000000000000000 R08: 0000000000000000 R09: ffffab34c125fa58
R10: 0000000000000003 R11: ffffffff906ca3c8 R12: ffff8edff3a66670
R13: ffff8edfe1465480 R14: 0000000000000000 R15: 0000000000000000
FS:  00007fd6900b95c0(0000) GS:ffff8ee0d8f80000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000056443d149d44 CR3: 0000000113282000 CR4: 00000000003506e0
Call Trace:
 <TASK>
 ? drm_atomic_helper_wait_for_vblanks.part.0+0x23d/0x250
 ? __warn+0x81/0x130
 ? drm_atomic_helper_wait_for_vblanks.part.0+0x23d/0x250
 ? report_bug+0x171/0x1a0
 ? srso_return_thunk+0x5/0x10
 ? console_unlock+0x78/0x120
 ? handle_bug+0x3c/0x80
 ? exc_invalid_op+0x17/0x70
 ? asm_exc_invalid_op+0x1a/0x20
 ? drm_atomic_helper_wait_for_vblanks.part.0+0x23d/0x250
 ? __pfx_autoremove_wake_function+0x10/0x10
 drm_atomic_helper_commit_tail+0x74/0x90
 commit_tail+0xd1/0x130
 drm_atomic_helper_commit+0x11a/0x140
 drm_atomic_commit+0x9a/0xd0
 ? __pfx___drm_printfn_info+0x10/0x10
 drm_client_modeset_commit_atomic+0x203/0x250
 drm_client_modeset_commit_locked+0x5a/0x160
 drm_client_modeset_commit+0x25/0x40
 drm_fb_helper_lastclose+0x49/0x80
 drm_lastclose+0x3b/0x90
 drm_release+0xd9/0xf0
 __fput+0xed/0x290
 __x64_sys_close+0x3d/0x80
 do_syscall_64+0x60/0x90
 ? srso_return_thunk+0x5/0x10
 ? __x64_sys_ioctl+0xaf/0xd0
 ? srso_return_thunk+0x5/0x10
 ? syscall_exit_to_user_mode+0x2b/0x40
 ? srso_return_thunk+0x5/0x10
 ? do_syscall_64+0x6c/0x90
 ? srso_return_thunk+0x5/0x10
 ? ksys_write+0xd8/0xf0
 ? srso_return_thunk+0x5/0x10
 ? syscall_exit_to_user_mode+0x2b/0x40
 ? srso_return_thunk+0x5/0x10
 ? do_syscall_64+0x6c/0x90
 ? exc_page_fault+0x7f/0x180
 entry_SYSCALL_64_after_hwframe+0x6e/0xd8
RIP: 0033:0x7fd690a99aba
Code: 00 00 0f 05 48 3d 00 f0 ff ff 77 44 c3 0f 1f 00 48 83 ec 18 89 7c 24 0c e8 c3 a2 f8 ff 8b 7c 24 0c 89 c2 b8 03 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 36 89 d7 89 44 24 0c e8 23 a3 f8 ff 8b 44 24
RSP: 002b:00007ffd742e0730 EFLAGS: 00000293 ORIG_RAX: 0000000000000003
RAX: ffffffffffffffda RBX: 000055a2dab86670 RCX: 00007fd690a99aba
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 000000000000002c
RBP: 0000000000000000 R08: 000000055a2dab03 R09: 0000000000000007
R10: 000055a2dab03510 R11: 0000000000000293 R12: 000000000000002c
R13: 000055a2dab03510 R14: 000055a2da5b5420 R15: 0000000000000000
 </TASK>
---[ end trace 0000000000000000 ]---
usb 2-2: [drm] *ERROR* flip_done timed out
usb 2-2: [drm] *ERROR* [CRTC:34:crtc-0] commit wait timed out

(I'm running 6.6.1-1-MANJARO too)

@rhgndf
Copy link
Owner

rhgndf commented Nov 25, 2023

Thanks for the logs! I think I might have an idea what's going on.

@cristianc
Copy link
Author

P.S. I've tested the driver with two different (VGA) displays

@rhgndf
Copy link
Owner

rhgndf commented Nov 26, 2023

It seems like its something to do with the AMD IOMMU. I am also testing on an AMD cpu but I couldn't reproduce the issue.

@cristianc
Copy link
Author

I've tested fl2000 driver with a different machine (Intel Core 2 Duo) and Lubuntu 23.10 (kernel version 6.6.10).

At first, I've looked at resolution of the built-in display (before connecting frescologic device and loading driver):

xrandr -q
Screen 0: minimum 320 x 200, current 1280 x 800, maximum 8192 x 8192
LVDS-1 connected primary 1280x800+0+0 (normal left inverted right x axis y axis) 331mm x 207mm
   1280x800      59.98*+  59.98  
   1280x720      59.98  
   1024x768      59.98  
   960x720       59.98  
   928x696       59.98  
   896x672       59.98  
   1024x576      59.98  
   960x600       59.98  
   960x540       59.98  
   800x600       59.98  
   840x525       59.98  
   864x486       59.97  
   700x525       59.98  
   800x450       59.98  
   640x512       59.98  
   700x450       59.98  
   640x480       59.98  
   720x405       59.98  
   684x384       59.98  
   640x360       59.97  
   512x384       59.98  
   512x288       59.97  
   480x270       59.98  
   400x300       59.97  
   432x243       59.97  
   320x240       59.98  
   360x202       59.97  
   320x180       59.97  
VGA-1 disconnected (normal left inverted right x axis y axis)
SVIDEO-1 disconnected (normal left inverted right x axis y axis)

Trying to load the driver module, i got error:
insmod: ERROR: could not insert module fl2000.ko: Unknown symbol in module
So, I've followed suggestions as described at rhgndf/ms912x#3 (comment)
I've run sudo modprobe drm_shmem_helper and then sudo insmod fl2000.ko. This way, I don't even have to run modprobe drm and modprobe drm_kms_helper since loading drm_shmem_helper loads automatically drm and drm_kms_helper modules too:

lsmod | grep drm
drm_shmem_helper       24576  1 fl2000
drm_buddy              20480  1 i915
drm_display_helper    241664  1 i915
cec                    98304  2 drm_display_helper,i915
drm_kms_helper        274432  3 drm_display_helper,i915,fl2000
drm                   798720  14 drm_kms_helper,drm_shmem_helper,drm_display_helper,drm_buddy,i915,ttm,fl2000

BTW, here is what dmesg says when loading driver and connecting the external display (in this case, a TV) through FrescoLogic device:

[  229.460304] usbcore: registered new interface driver fl2000_usb
[  323.669263] usb 2-2: new high-speed USB device number 4 using ehci-pci
[  323.834143] usb 2-2: config 1 interface 1 altsetting 0 has a duplicate endpoint with address 0x81, skipping
[  323.834162] usb 2-2: config 1 interface 1 altsetting 0 has a duplicate endpoint with address 0x1, skipping
[  323.834169] usb 2-2: config 1 interface 1 altsetting 1 has a duplicate endpoint with address 0x81, skipping
[  323.834176] usb 2-2: config 1 interface 1 altsetting 1 has a duplicate endpoint with address 0x1, skipping
[  323.834188] usb 2-2: New USB device found, idVendor=1d5c, idProduct=2000, bcdDevice= 2.00
[  323.834196] usb 2-2: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[  323.837304] usb 2-2: Using USB 2.0, resolutions may be limited
[  323.842684] [drm] Initialized fl2000_drm 1.0.1 20181001 for 2-2 on minor 1
[  323.862470] usb 2-2: [drm] Cannot find any crtc or sizes
[  323.864887] usb 2-2: [drm] Cannot find any crtc or sizes
[  323.979512] usb 2-2: is sink event 1
[  323.979859] usb 2-2: interrupt
[  324.750543] usb 2-2: [drm] fb1: fl2000_drmdrmfb frame buffer device
[  325.536796] usb 2-2: lbuf_overflow
[  325.537037] usb 2-2: vga frame drop
[  325.537043] usb 2-2: interrupt
[  365.598192] usb 2-2: lbuf_underflow
[  365.598441] usb 2-2: vga frame drop
[  365.598448] usb 2-2: interrupt
[  411.651532] usb 2-2: lbuf_overflow
[  411.652030] usb 2-2: vga frame drop
[  411.652042] usb 2-2: interrupt
[  436.617336] usb 2-2: lbuf_underflow
[  436.617575] usb 2-2: vga frame drop
[  436.617581] usb 2-2: interrupt
[  436.687240] usb 2-2: lbuf_overflow
[  436.687819] usb 2-2: vga frame drop
[  436.687830] usb 2-2: interrupt
...
[  472.409162] usb 2-2: lbuf_underflow
[  472.409537] usb 2-2: vga frame drop
[  472.409543] usb 2-2: interrupt
[  684.551171] usb 2-2: lbuf_overflow
[  684.551666] usb 2-2: vga frame drop
[  684.551678] usb 2-2: interrupt
[  700.363218] usb 2-2: lbuf_overflow
[  700.363716] usb 2-2: vga frame drop
[  700.363728] usb 2-2: interrupt

In this case, the Core 2 Duo machine has just usb 2.0 ports. So, WRT https://media.quzo.co.uk/quzo/site/mmo_26403400_1569939013_7302_32524.pdf it should be:

Maximum Analog Resolutions
USB 3.0: 1920x1200
USB 2.0: 800x600

Indeed, I could select just a low resolution (due to that, desktop does not render properly). BTW, I had to play around with refresh rate in order to prevent blinking and partial frames:

xrandr -q
Screen 0: minimum 320 x 200, current 2080 x 800, maximum 8192 x 8192
LVDS-1 connected primary 1280x800+0+0 (normal left inverted right x axis y axis) 331mm x 207mm
   1280x800      59.98*+  59.98  
   1280x720      59.98  
   1024x768      59.98  
   960x720       59.98  
   928x696       59.98  
   896x672       59.98  
   1024x576      59.98  
   960x600       59.98  
   960x540       59.98  
   800x600       59.98  
   840x525       59.98  
   864x486       59.97  
   700x525       59.98  
   800x450       59.98  
   640x512       59.98  
   700x450       59.98  
   640x480       59.98  
   720x405       59.98  
   684x384       59.98  
   640x360       59.97  
   512x384       59.98  
   512x288       59.97  
   480x270       59.98  
   400x300       59.97  
   432x243       59.97  
   320x240       59.98  
   360x202       59.97  
   320x180       59.97  
VGA-1 disconnected (normal left inverted right x axis y axis)
SVIDEO-1 disconnected (normal left inverted right x axis y axis)
VGA-1-2 connected 800x600+1280+0 (normal left inverted right x axis y axis) 510mm x 290mm
   832x624       74.55  
   800x600       72.19    75.00    60.32*   56.25  
   640x480       75.00    72.81    66.67    59.94  
   720x400       70.08  
xrandr -q
Screen 0: minimum 320 x 200, current 1920 x 800, maximum 8192 x 8192
LVDS-1 connected primary 1280x800+0+0 (normal left inverted right x axis y axis) 331mm x 207mm
   1280x800      59.98*+  59.98  
   1280x720      59.98  
   1024x768      59.98  
   960x720       59.98  
   928x696       59.98  
   896x672       59.98  
   1024x576      59.98  
   960x600       59.98  
   960x540       59.98  
   800x600       59.98  
   840x525       59.98  
   864x486       59.97  
   700x525       59.98  
   800x450       59.98  
   640x512       59.98  
   700x450       59.98  
   640x480       59.98  
   720x405       59.98  
   684x384       59.98  
   640x360       59.97  
   512x384       59.98  
   512x288       59.97  
   480x270       59.98  
   400x300       59.97  
   432x243       59.97  
   320x240       59.98  
   360x202       59.97  
   320x180       59.97  
VGA-1 disconnected (normal left inverted right x axis y axis)
SVIDEO-1 disconnected (normal left inverted right x axis y axis)
VGA-1-2 connected 640x480+1280+0 (normal left inverted right x axis y axis) 510mm x 290mm
   832x624       74.55  
   800x600       72.19    75.00    60.32    56.25  
   640x480       75.00*   72.81    66.67    59.94  
   720x400       70.08  

Waiting for a reply,

Thanks.

@rhgndf
Copy link
Owner

rhgndf commented Jan 8, 2024

The lbuf overflow, interrupt and vga frame drop is harmless. The flickering is due to the driver not sending frames fast enough. This could probably be fixed though, but I'm not sure how at this moment.

@cristianc
Copy link
Author

The lbuf overflow, interrupt and vga frame drop is harmless. The flickering is due to the driver not sending frames fast enough. This could probably be fixed though, but I'm not sure how at this moment.

Above all, this test is useful to show how FL2000DX works somehow with an Intel platform as Core 2 Duo (at least by using usb 2.0 mode). So far, there have been just two reports that the device may not work on AMD platforms but more testers would be needed to confirm this.

ookiegajwa added a commit to ookiegajwa/fl2000_drm that referenced this issue Oct 18, 2024
Fixes rhgndf#3
May improve rhgndf#2 by dropping the use of deprecated edid functions
@ookiegajwa
Copy link

After testing on my machine with #5, I found that the freezing issues and occurrences of CRTC vblank wait timed out were eliminated. This may have simply been a quirk of my monitor that was fixed (as I was only having these issues with one monitor), but it might be worth a shot to check it out :)

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

3 participants