Bug 106259 - [bisected] UVD hangs system on Vega10 linux-4.17
Summary: [bisected] UVD hangs system on Vega10 linux-4.17
Status: RESOLVED FIXED
Alias: None
Product: DRI
Classification: Unclassified
Component: DRM/AMDgpu (show other bugs)
Version: DRI git
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Default DRI bug account
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-04-26 21:15 UTC by James Harvey
Modified: 2018-06-17 04:42 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
dmesg (60.54 KB, text/plain)
2018-04-26 21:15 UTC, James Harvey
no flags Details

Description James Harvey 2018-04-26 21:15:23 UTC
Created attachment 139148 [details]
dmesg

Trying to play h264 encoded video with mpv --vo=opengl --hwdec=vdpau results in frozen video and the system unresponsive to key/mouse input.  System freezes roughly 1sec into videos, although audio often continues.  Bisected to the following kernel commit:

2ee150cda7bdc766cf9baca3534f3a2c0b0e8357 is the first bad commit
commit 2ee150cda7bdc766cf9baca3534f3a2c0b0e8357
Author: Christian König <christian.koenig@amd.com>
Date:   Fri Jan 19 15:19:16 2018 +0100

    drm/amdgpu: remove now superflous *_hdp operation

    All HDP invalidation and most flush can now be replaced by the generic
    ASIC function.

    Signed-off-by: Christian König <christian.koenig@amd.com>
    Acked-by: Chunming Zhou <david1.zhou@amd.com>
    Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

:040000 040000 85ee277739bbce19d5dbaf1fb309983198180d0f
056ae126031efe507bea405931ce89864979ef2d M      drivers
-------------------------------------------------

I tested mesa (git-227b1af866) patched with "radeon/vcn: fix mpeg4 msg buffer settings" by Boyuan Zang, but that didn't fix my problem.  I also tested today's pull request for linux drm-fixes-4.17, but the issue is still present.

Software versions:
    Linux 4.17.0-rc1 x86_64
    OpenGL core profile version string: 4.5 (Core Profile) Mesa 18.1.0-rc1
    libdrm: 2.4.91
    libvdpau: 1.1.1
    mpv: 0.27.2
    ffmpeg: 3.4.2-r1

GPU hardware:
    OpenGL renderer string: Radeon RX Vega (VEGA10, DRM 3.23.0, 4.16.0-rc4, LLVM 6.0.0)
    03:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Vega 10 XT [Radeon RX Vega 64] [1002:687f] (rev c3)

CPU hardware:
    AMD Phenom(tm) II X4 955 Processor
Comment 1 Christian König 2018-05-03 17:32:07 UTC
Which branch are you testing this with?
Comment 2 James Harvey 2018-05-04 05:52:05 UTC
Hi Christian, thanks for taking the time to look at this.

I'm seeing this issue on the mainline linux-4.17 release candidates.  I skipped testing rc1, ran the bisect after seeing this on rc2, then tested http://cgit.freedesktop.org/~agd5f/linux/?h=drm-fixes-4.17 prior to the rc3 release, just in case it was already fixed.  Still present on rc3.  

In order to bisect, I did need to cherrypick [fdb401d03d311399d844b9f23ec5ab98a2811f58] drm/amd/display: Fix multiple definitions of handle_crc_irq, otherwise I would get linker errors. 

I'm using the firmware from git.kernel.org dated 2018-04-16.
Comment 3 Alex Deucher 2018-05-09 19:34:06 UTC
Should be fixed with this patch:
https://patchwork.freedesktop.org/patch/221510/
Comment 4 James Harvey 2018-05-09 21:33:29 UTC
Alex, thank you for the patch!  This indeed fixes the hang.
Comment 5 Lem 2018-06-05 00:41:08 UTC
It appears this bug is still present in 4.17 final (and the patch provided above doesn't appear to apply cleanly to 4.17). I get the same display hang with a Vega 56 on Ubuntu 18.04, Padoka PPA using mpv, vdpau and opengl. The system is still responsive to SSH though. Kernel 4.16.x works perfectly with the same setup.
Comment 6 James Harvey 2018-06-17 04:42:22 UTC
Patch was merged into drm-next and is confirmed fixed in 4.18-rc1, so I'm closing.

This patch would be nice to have in a stable version of the 4.17 kernel though.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.