Bug 215600

Summary: Radeon - *ERROR* Failed waiting for UVD message
Product: Drivers Reporter: Richard Herbert (rherbert)
Component: Video(Other)Assignee: drivers_video-other
Status: RESOLVED CODE_FIX    
Severity: normal CC: alirezaimi, christian.koenig, edsudeck74, rherbert
Priority: P1    
Hardware: x86-64   
OS: Linux   
Kernel Version: 5.17-rc4 Subsystem:
Regression: Yes Bisected commit-id:
Attachments: Details
Potential fix

Description Richard Herbert 2022-02-12 22:13:07 UTC
Created attachment 300445 [details]
Details

When attempting to play some types of videos with VLC 3.0.16 (eg. *.flv, *.mp4), when running kernels 5.17-rc1 to 5.17-rc3, only the audio portion is heard and the VLC video screen remains black. Meanwhile, many of these entries are written per second to /var/log/syslog:

2/12/22 3:41 PM	starbug	kernel	[drm:radeon_uvd_cs_parse [radeon]] *ERROR* Failed waiting for UVD message (-1)!
2/12/22 3:41 PM	starbug	kernel	[drm:radeon_cs_ioctl [radeon]] *ERROR* Invalid command stream !
2/12/22 3:41 PM	starbug	kernel	[drm:radeon_uvd_cs_parse [radeon]] *ERROR* Failed waiting for UVD message (-1)!
2/12/22 3:41 PM	starbug	kernel	[drm:radeon_cs_ioctl [radeon]] *ERROR* Invalid command stream !
2/12/22 3:41 PM	starbug	kernel	[drm:radeon_uvd_cs_parse [radeon]] *ERROR* Failed waiting for UVD message (-1)!
2/12/22 3:41 PM	starbug	kernel	[drm:radeon_cs_ioctl [radeon]] *ERROR* Invalid command stream !


The problem doesn't occur in kernels of the 5.16 series.  It may have been introduced here:


https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/diff/drivers/gpu/drm/radeon/radeon_uvd.c?id=v5.16&id2=v5.17-rc1


Thanks!
Comment 1 Christian König 2022-02-21 08:35:19 UTC
Created attachment 300497 [details]
Potential fix

Please test the attached patch, it should fix the issue.
Comment 2 Richard Herbert 2022-02-21 14:56:01 UTC
Applied the provided patch to kernel 5.17-rc5. Confirming the patch fixes the issue.

Thanks!
Comment 3 alireza 2023-11-28 08:46:12 UTC
Hi
I have same error in debian with kernel 6.1.0-13-amd64 and vlc 3.0.20-0+deb12u1 .
Comment 4 alireza 2023-11-28 09:03:03 UTC
upgraded to 6.5.0-0.deb12.1-amd64 from backport repo but not solved .
Comment 5 edsudeck74 2024-01-18 10:02:48 UTC
Same. Arch, Linux 6.6.10. Old laptop with Radeon graphics.

[  509.113392] [drm:radeon_uvd_cs_parse [radeon]] *ERROR* Failed mapping the UVD message (-22)!
[  509.113573] [drm:radeon_cs_ioctl [radeon]] *ERROR* Invalid command stream !


And later:

[  514.145319] [drm:radeon_uvd_cs_parse [radeon]] *ERROR* Invalid UVD handle 0x70500005!
[  514.145636] [drm:radeon_cs_ioctl [radeon]] *ERROR* Invalid command stream !