Bug 71923 - Screen corruption when watching VDPAU-accelerated H264 video
Summary: Screen corruption when watching VDPAU-accelerated H264 video
Status: RESOLVED MOVED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/Gallium/r600 (show other bugs)
Version: 9.2
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Default DRI bug account
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-11-22 15:28 UTC by Łukasz Skocz
Modified: 2019-09-18 19:11 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Dmesg log with the described errors (63.39 KB, text/plain)
2013-11-22 15:28 UTC, Łukasz Skocz
Details
vdpauinfo output (100 bytes, text/plain)
2013-11-22 15:29 UTC, Łukasz Skocz
Details
glxinfo output (56.44 KB, text/plain)
2013-11-22 15:29 UTC, Łukasz Skocz
Details

Description Łukasz Skocz 2013-11-22 15:28:15 UTC
Created attachment 89641 [details]
Dmesg log with the described errors

Hi, i have a trouble watching some H264 videos when using VDPAU acceleration. What happens is the screen gets completly corrupted (gray bars cover the whole screen) when player plays a certain frame in the video. It always happens at the same point of the video, for some videos it doesn't happen at all. I managed to blindly save smesg output to a file when this happened, and it's filled with these kinds of messages: 

[   47.595028] [drm:radeon_cs_ib_chunk] *ERROR* Invalid command stream !
[   48.303022] Forbidden register 0x0020 in cs at 9
[   48.303029] [drm:radeon_cs_ib_chunk] *ERROR* Invalid command stream !
[   56.146022] Forbidden register 0x0024 in cs at 9
[   56.146029] [drm:radeon_cs_ib_chunk] *ERROR* Invalid command stream !
[   57.148021] Forbidden register 0x0028 in cs at 9
[   57.148028] [drm:radeon_cs_ib_chunk] *ERROR* Invalid command stream !
[   57.523022] Forbidden register 0x0024 in cs at 9
[   57.523030] [drm:radeon_cs_ib_chunk] *ERROR* Invalid command stream !

I'm using Arch Linux with 3.12.1-ck at the moment, but it also happened on 3.11-ck and 3.11 vanilla.

lspci reports this card name, it's a Radeon 4570:
01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] RV710/M92 [Mobility Radeon HD 4530/4570/545v]

I'm using the newest stable mesa 9.2.3 and xf86-video-ati 7.2.0. The issue happens with mpv and mplayer.
Comment 1 Łukasz Skocz 2013-11-22 15:29:02 UTC
Created attachment 89642 [details]
vdpauinfo output
Comment 2 Łukasz Skocz 2013-11-22 15:29:33 UTC
Created attachment 89643 [details]
glxinfo output
Comment 3 Łukasz Skocz 2013-11-22 15:33:44 UTC
Comment on attachment 89642 [details]
vdpauinfo output

display: :0.0   screen: 0
API version: 1
Information string: G3DVL VDPAU Driver Shared Library version 1.0

Video surface:

name   width height types
-------------------------------------------
420     8192  8192  NV12 
422     8192  8192  NV12 
444     8192  8192  NV12 

Decoder capabilities:

name               level macbs width height
-------------------------------------------
MPEG1                16  9216  2048  1152
MPEG2_SIMPLE         16  9216  2048  1152
MPEG2_MAIN           16  9216  2048  1152
H264_BASELINE        16  9216  2048  1152
H264_MAIN            16  9216  2048  1152
H264_HIGH            16  9216  2048  1152
VC1_SIMPLE           16  9216  2048  1152
VC1_MAIN             16  9216  2048  1152
VC1_ADVANCED         16  9216  2048  1152

Output surface:

name              width height nat types
----------------------------------------------------
B8G8R8A8          8192  8192    y  NV12 
R8G8B8A8          8192  8192    y  NV12 
R10G10B10A2       8192  8192    y  NV12 
B10G10R10A2       8192  8192    y  NV12 

Bitmap surface:

name              width height
------------------------------
B8G8R8A8          8192  8192
R8G8B8A8          8192  8192
R10G10B10A2       8192  8192
B10G10R10A2       8192  8192
A8                8192  8192

Video mixer:

feature name                    sup
------------------------------------
DEINTERLACE_TEMPORAL             -
DEINTERLACE_TEMPORAL_SPATIAL     -
INVERSE_TELECINE                 -
NOISE_REDUCTION                  y
SHARPNESS                        y
LUMA_KEY                         -
HIGH QUALITY SCALING - L1        -
HIGH QUALITY SCALING - L2        -
HIGH QUALITY SCALING - L3        -
HIGH QUALITY SCALING - L4        -
HIGH QUALITY SCALING - L5        -
HIGH QUALITY SCALING - L6        -
HIGH QUALITY SCALING - L7        -
HIGH QUALITY SCALING - L8        -
HIGH QUALITY SCALING - L9        -

parameter name                  sup      min      max
-----------------------------------------------------
VIDEO_SURFACE_WIDTH              y        48     2048
VIDEO_SURFACE_HEIGHT             y        48     1152
CHROMA_TYPE                      y  
LAYERS                           y         0        4

attribute name                  sup      min      max
-----------------------------------------------------
BACKGROUND_COLOR                 y  
CSC_MATRIX                       y  
NOISE_REDUCTION_LEVEL            y      0.00     1.00
SHARPNESS_LEVEL                  y     -1.00     1.00
LUMA_KEY_MIN_LUMA                y  
LUMA_KEY_MAX_LUMA                y  


Inconsistency detected by ld.so: dl-close.c: 771: _dl_close: Assertion `map->l_init_called' failed!
Comment 4 Christian König 2013-11-22 16:40:45 UTC
Please provide a sample video where this is happening.
Comment 5 Łukasz Skocz 2013-11-22 17:05:08 UTC
(In reply to comment #4)
> Please provide a sample video where this is happening.

This one seems to cause the same error as my files (can't upload mine due to copyright restrains):
http://www.cccp-project.net/beta/test_files/KAA_fumoffu_old_x264_breaks_lavc.mkv

I noticed that the playback sometimes finishes sucessfully if i stop moving the mouse completly, but as soon as i start moving it, the breakage is certain.
Comment 6 Christian König 2013-11-25 13:13:42 UTC
I can't reproduce the problem. Can you try this with mesa master branch?

Thanks in advance.
Comment 7 Łukasz Skocz 2013-11-26 08:14:16 UTC
(In reply to comment #6)
> I can't reproduce the problem. Can you try this with mesa master branch?
> 
> Thanks in advance.

I just compiled Mesa master using https://aur.archlinux.org/packages/me/mesa-r300-r600-radeonsi-git/PKGBUILD , just added --disable-dri3 flag.
The same thing happens, but it seems that i was mistaken about it happening always on the same frame of the video. The mkv file i posted sometimes plays fully without a problem, and sometimes it causes corruption with a seemingly random frame. Same thing happens with my own videos.
Could it be that it's a kernel driver bug, not related to Mesa?
Comment 8 Christian König 2013-11-26 10:13:36 UTC
(In reply to comment #7)
> Could it be that it's a kernel driver bug, not related to Mesa?

Not really. The kernel is complaining that mesa is sending down invalid commands, but I have no idea how that can happen.

Either we have a very subtile and rare bug somewhere in the userspace driver stack or something is corrupting our command buffer while it gets send to the kernel.

What application do you use? Could you try playing with a different one?
Comment 9 Łukasz Skocz 2013-11-26 11:28:17 UTC
> What application do you use? Could you try playing with a different one?

It happens with mplayer and mpv while using vdpau. I tried to reproduce this in vlc and it doesn't happen, although i'm not sure it's using vdpau, the ui is a bit confusing.
Comment 10 GitLab Migration User 2019-09-18 19:11:49 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/mesa/mesa/issues/471.


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.