Skip to contentSkip to conversation

Heavy artifacts during hw accelerated playback of wmv files

Bug 100510 [email protected] 1 participant 13 messages Mar 31, 2017 – May 17, 2017

lore
Share & tools
lore

[email protected]

author Reviewed-by Alex Deucher
#0 lore raw

https://bugs.freedesktop.org/show_bug.cgi?id=100510

Bug ID: 100510
Summary: [radeon] Heavy artifacts during hw accelerated
playback of wmv files
Product: DRI
Version: unspecified
Hardware: Other
OS: All
Status: NEW
Severity: normal
Priority: medium
Component: libdrm
Assignee: [email protected]
Reporter: [email protected]

Hi,

with versions newer than libdrm-2.4.66 I have heavy artifacts during hw accelerated playback of wmv files vaapi/vdpau tested with gstreamer- 0.10 and ffmpeg based mpv.

The error occures only with wmv, h264 works.

Bisect result:
db138b9ba12a0de5d6140832c0679c2418e3e7e0 is the first bad commit commit db138b9ba12a0de5d6140832c0679c2418e3e7e0

Author: Michel Dänzer <[email protected]>
Date:   Thu Jan 21 18:08:49 2016 +0900

radeon: Pass radeon_bo_open flags to the DRM_RADEON_GEM_CREATE ioctl

Not doing so makes it impossible for radeon_bo_open callers to set any RADEON_GEM_* flags for the newly created BO.

If I revert this commit on the current master branch the artefacts are gone.

System environment:
-- chipset: AMD GX-217GA SOC with Radeon(tm) HD Graphics -- system architecture: 32-bit
-- xserver: 1.19.1
-- mesa: 13.0.3, 13.0.6, 17.0.2
-- libdrm: 2.4.74
-- kernel: 4.4.11
-- Linux distribution: eLux
-- Machine or mobo model: HP t620 dual core thin client

Regards,
Jan Burgmeier

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#2 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=100510

--- Comment #2 from Jan Burgmeier <[email protected]> --- Created attachment 130614
--> https://bugs.freedesktop.org/attachment.cgi?id=130614&action=edit
full dmesg output

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#3 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=100510

--- Comment #3 from Christian König <[email protected]> --- Created attachment 130615
--> https://bugs.freedesktop.org/attachment.cgi?id=130615&action=edit
Hack for testing

Please apply the attached code change with "git apply hack.patch" on a linux kernel tree and see if that helps.

It overrides the setting from libdrm to always use VRAM for UVD submissions. Not a final solution, but it should help to narrow down the problem.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#4 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=100510

--- Comment #4 from Jan Burgmeier <[email protected]> --- I applied the hack to HEAD of the staging-next branch and it worked.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#5 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=100510

Christian König <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

 Attachment #130615|0                           |1

is obsolete| |

--- Comment #5 from Christian König <[email protected]> --- Created attachment 130618
--> https://bugs.freedesktop.org/attachment.cgi?id=130618&action=edit
Hack number 2 for testing

Ok, just as I expected we suddenly don't put buffers into VRAM any more and the UVD block has an undocumented requirement for WMV playback that those buffers needs to be in VRAM.

No idea why user space is broken, but the kernel should catch such cases and force them into VRAM when the hardware needs that.

Please revert the last hack and try this one. It should only the first and second buffer into VRAM.

If that doesn't work try to change the if so that the first,second and third buffer are forced into VRAM etc....

I need to know which one is needed in VRAM here.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#7 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=100510

--- Comment #7 from Christian König <[email protected]> --- Created attachment 130810
--> https://bugs.freedesktop.org/attachment.cgi?id=130810&action=edit
Final solution.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#8 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=100510

Christian König <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED
Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#9 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=100510

Michel Dänzer <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC|[email protected] |

--- Comment #8 from Michel Dänzer <[email protected]> --- Thanks, but I actually receive updates via the dri-devel mailing list.

Do we know yet which flags are getting passed to radeon_bo_open for the BO(s) in question?

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#10 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=100510

--- Comment #9 from Christian König <[email protected]> --- (In reply to Michel Dänzer from comment #8)

Quoted 4 lines

Thanks, but I actually receive updates via the dri-devel mailing list.

Do we know yet which flags are getting passed to radeon_bo_open for the BO(s) in question?

No, so far I've concentrated on figuring out what's going on inside the kernel.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#11 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=100510

Arthur Marsh <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |---

--- Comment #10 from Arthur Marsh <[email protected]> --- commit 8f12bbe6d94a51f3ae314c27cc7b9b315adfe383

Author: Christian König <[email protected]>
Date:   Tue Apr 11 19:20:20 2017 +0200

drm/radeon: force the UVD DPB into VRAM as well

Seems to be mandatory for WMV playback.

Bugs: https://bugs.freedesktop.org/show_bug.cgi?id=100510

breaks video playback for me with a VERDE card (DVD and some other formats), with the error:

[75728.141010] [drm:radeon_uvd_cs_parse [radeon]] *ERROR* msg/fb buffer
14674000-1686F000 out of 256MB segment!                                         
[75728.141030] [drm:radeon_cs_ioctl [radeon]] *ERROR* Invalid command stream !

I'm happy to supply more specifics of my configuration.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#12 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=100510

Michel Dänzer <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

         Resolution|---                         |FIXED
             Status|REOPENED                    |RESOLVED

--- Comment #11 from Michel Dänzer <[email protected]> --- Arthur, please file your own report. The commit in question did fix the problem reported here, so this is the correct status.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel