https://bugs.freedesktop.org/show_bug.cgi?id=94471
Bug ID: 94471 Summary: Tonga UVD 4Kx4K = failed to allocate a buffer Product: Mesa Version: git Hardware: Other OS: All Status: NEW Severity: normal Priority: medium Component: Drivers/Gallium/radeonsi Assignee: dri-devel@lists.freedesktop.org Reporter: adf.lists@gmail.com QA Contact: dri-devel@lists.freedesktop.org
I see >= tonga uvd height has recently been increased -
https://cgit.freedesktop.org/mesa/mesa/commit/?id=353a4f844f9e845dad93de9c28...
radeon/uvd: increase max height to 4096 for VI and newer With this issue 'mpv --hwdec=vdpau --vo=vdpau <stream>' fails for vdpau decode if the stream height is 4096. Vdpau decode of height upto 4096 is necessary usecase on amdgpu driver for VI and newer platforms.
The fix is in driver specific implementation of "Decoder Query Capabilities" API to return 4096 for VI and newer platforms. With this fix vdpauinfo reports height support as 4096 and mpv for vdpau decode works fine for 4096 height streams.
On agd5f drm-fixes-4.5 4096x4096 fails for me (also fails with --vo vdpau)
andy [~]$ mpv --hwdec=vdpau /mnt/sdb1/ffmpeg-mpl-tests/x264-4096.mkv Playing: /mnt/sdb1/ffmpeg-mpl-tests/x264-4096.mkv (+) Video --vid=1 (*) (h264) amdgpu: Failed to allocate a buffer: amdgpu: size : 0 bytes amdgpu: alignment : 4096 bytes amdgpu: domains : 2 amdgpu: Failed to allocate a buffer: amdgpu: size : 0 bytes amdgpu: alignment : 4096 bytes amdgpu: domains : 2 EE radeon_uvd.c:1109 ruvd_create_decoder UVD - Can't allocated bitstream buffers. [vo/opengl/x11] Disabling screensaver failed (-1). Make sure the xdg-screensaver script is installed. Using software decoding. VO: [opengl] 4096x4096 => 7282x4096 yuv420p
dmesg
[ 8308.529176] [TTM] Illegal buffer object size [ 8308.529210] [drm:amdgpu_gem_object_create [amdgpu]] *ERROR* Failed to allocate GEM object (0, 2, 4096, -22) [ 8308.529326] [TTM] Illegal buffer object size [ 8308.529339] [drm:amdgpu_gem_object_create [amdgpu]] *ERROR* Failed to allocate GEM object (0, 2, 4096, -22)
https://bugs.freedesktop.org/show_bug.cgi?id=94471
--- Comment #1 from Christian König deathsimple@vodafone.de --- Hi Andy,
sounds like the estimated bitstream buffer size doesn't fit into a 32bit integer any more.
Where can I download such a stream for testing?
Thanks, Christian.
https://bugs.freedesktop.org/show_bug.cgi?id=94471
--- Comment #2 from Andy Furniss adf.lists@gmail.com --- (In reply to Christian König from comment #1)
Hi Andy,
sounds like the estimated bitstream buffer size doesn't fit into a 32bit integer any more.
Where can I download such a stream for testing?
I wondered that myself so I made one with ffmpeg/libx264.
Further testing shows that 4080x4080 works and >= 4082x4082 fails.
I tried getting libx264 to make constrained baseline but no difference.
These 2 were made like
ffmpeg -i a-2160p60.mkv -vf scale=w=4080:h=4080 -c:v libx264 -vframes 10 x264-4080.mkv
as they are only 10 frames tested like -
mpv --speed=0.1 -fs --hwdec=vdpau x264-4080.mkv
While here a shameless bump of a similar VCE issue :-)
I don't know the precise fail point for VCE but 3840x2160 fails 2560x1440 works.
https://bugs.freedesktop.org/show_bug.cgi?id=91281
https://bugs.freedesktop.org/show_bug.cgi?id=94471
--- Comment #3 from Andy Furniss adf.lists@gmail.com --- Created attachment 122202 --> https://bugs.freedesktop.org/attachment.cgi?id=122202&action=edit 4082 fails
https://bugs.freedesktop.org/show_bug.cgi?id=94471
--- Comment #4 from Andy Furniss adf.lists@gmail.com --- Created attachment 122203 --> https://bugs.freedesktop.org/attachment.cgi?id=122203&action=edit 4080 works
https://bugs.freedesktop.org/show_bug.cgi?id=94471
--- Comment #5 from Andy Furniss adf.lists@gmail.com --- Of course those are square - It is possible to get height 4096 working as long as width is lower than 4082.
https://bugs.freedesktop.org/show_bug.cgi?id=94471
--- Comment #6 from Andy Furniss adf.lists@gmail.com --- Mesa commit
commit 51227b41c6b026f5b0a3925093b91800cdfcc923 Author: Indrajit Das indrajit-kumar.das@amd.com Date: Fri May 27 18:27:15 2016 +0530
radeon/uvd: fix overflow error while calculating bit stream buffer size
gets rid of the errors and so mpv/mplayer will attempt to use uvd, but no video is displayed, just a black screen.
https://bugs.freedesktop.org/show_bug.cgi?id=94471
GitLab Migration User gitlab-migration@fdo.invalid changed:
What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |MOVED Status|NEW |RESOLVED
--- Comment #7 from GitLab Migration User gitlab-migration@fdo.invalid --- -- 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/1230.
dri-devel@lists.freedesktop.org