All of lore.kernel.org
 help / color / mirror / Atom feed
* [Bug 91281] Tonga VCE 2160p encode fails with  BO to small for addr
@ 2015-07-09 10:38 bugzilla-daemon
  2016-07-29 23:08 ` bugzilla-daemon
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: bugzilla-daemon @ 2015-07-09 10:38 UTC (permalink / raw)
  To: dri-devel


[-- Attachment #1.1: Type: text/plain, Size: 893 bytes --]

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

            Bug ID: 91281
           Summary: Tonga VCE 2160p encode fails with  BO to small for
                    addr
           Product: DRI
           Version: XOrg git
          Hardware: Other
                OS: All
            Status: NEW
          Severity: normal
          Priority: medium
         Component: DRM/AMDgpu
          Assignee: dri-devel@lists.freedesktop.org
          Reporter: adf.lists@gmail.com

I don't know what the VCE is supposed to do on this R9 285 card but testing
with 2160p gives.

amdgpu: The CS has been rejected, see dmesg for more information.

[drm:amdgpu_vce_cs_reloc [amdgpu]] *ERROR* BO to small for addr 0x0002450000 14
13

Same test works with 1080p (bit slow but I haven't tested/understood the PM
situation yet).

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 2107 bytes --]

[-- Attachment #2: Type: text/plain, Size: 159 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug 91281] Tonga VCE 2160p encode fails with  BO to small for addr
  2015-07-09 10:38 [Bug 91281] Tonga VCE 2160p encode fails with BO to small for addr bugzilla-daemon
@ 2016-07-29 23:08 ` bugzilla-daemon
  2016-08-01 10:19 ` bugzilla-daemon
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: bugzilla-daemon @ 2016-07-29 23:08 UTC (permalink / raw)
  To: dri-devel


[-- Attachment #1.1: Type: text/plain, Size: 828 bytes --]

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

--- Comment #1 from Andy Furniss <adf.lists@gmail.com> ---
Now that vaapi is enabled the situation with this is more mixed.

omx still just always fails.

ffmpeg vaapi always works.

gatreamer vaapi fails or works depending on framerate, which is a bit
confusing.

For 2160p as long as I say framerate <=30 it works. For 4096x2160 it has to be
<=26.

Adding size to the kernel error message shows that the failing size = 2x raw
framesize -

[drm:amdgpu_vce_cs_reloc [amdgpu]] *ERROR* BO to small for addr 0x0108fde000 14
13 24883200

Adding debugging to vlVaCreateBuffer doesn't show any difference between
working and failing cases - the size requested being one raw frame.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 1625 bytes --]

[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug 91281] Tonga VCE 2160p encode fails with  BO to small for addr
  2015-07-09 10:38 [Bug 91281] Tonga VCE 2160p encode fails with BO to small for addr bugzilla-daemon
  2016-07-29 23:08 ` bugzilla-daemon
@ 2016-08-01 10:19 ` bugzilla-daemon
  2016-08-01 23:49 ` bugzilla-daemon
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: bugzilla-daemon @ 2016-08-01 10:19 UTC (permalink / raw)
  To: dri-devel


[-- Attachment #1.1: Type: text/plain, Size: 466 bytes --]

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

--- Comment #2 from Andy Furniss <adf.lists@gmail.com> ---
More debugging and size 24883200 works fine in the working case, it's

mapping->it.last

that varies between working and failing.

                    size     mapping->it.last

0x0108fde000 14 13 24883200 1101026 = OK

0x0108fde000 14 13 24883200 1088786 = fail

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 1263 bytes --]

[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug 91281] Tonga VCE 2160p encode fails with  BO to small for addr
  2015-07-09 10:38 [Bug 91281] Tonga VCE 2160p encode fails with BO to small for addr bugzilla-daemon
  2016-07-29 23:08 ` bugzilla-daemon
  2016-08-01 10:19 ` bugzilla-daemon
@ 2016-08-01 23:49 ` bugzilla-daemon
  2016-08-03 12:24 ` bugzilla-daemon
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: bugzilla-daemon @ 2016-08-01 23:49 UTC (permalink / raw)
  To: dri-devel


[-- Attachment #1.1: Type: text/plain, Size: 545 bytes --]

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

--- Comment #3 from Andy Furniss <adf.lists@gmail.com> ---
I know what causes this now.

It's the get_cpb_num case statement in radeon_vce.c.

It only handles up to 51 and defaults to 42.

ffmpeg lucked into working because it calls 51 when it should really be 52.

gstreamer vaapi calls correctly so only > 2160p30 fails as 52 gets default.

gstreamer omx always fails because it seems to max at 42.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 1339 bytes --]

[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug 91281] Tonga VCE 2160p encode fails with  BO to small for addr
  2015-07-09 10:38 [Bug 91281] Tonga VCE 2160p encode fails with BO to small for addr bugzilla-daemon
                   ` (2 preceding siblings ...)
  2016-08-01 23:49 ` bugzilla-daemon
@ 2016-08-03 12:24 ` bugzilla-daemon
  2016-08-03 23:13 ` bugzilla-daemon
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: bugzilla-daemon @ 2016-08-03 12:24 UTC (permalink / raw)
  To: dri-devel


[-- Attachment #1.1: Type: text/plain, Size: 384 bytes --]

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

--- Comment #4 from Christian König <deathsimple@vodafone.de> ---
Nice catch. Brave enough to provide a patch or should Leo and I take a look?

I'm just back from vacation and so busy that I probably won't come to it before
the end of the month.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 1183 bytes --]

[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug 91281] Tonga VCE 2160p encode fails with  BO to small for addr
  2015-07-09 10:38 [Bug 91281] Tonga VCE 2160p encode fails with BO to small for addr bugzilla-daemon
                   ` (3 preceding siblings ...)
  2016-08-03 12:24 ` bugzilla-daemon
@ 2016-08-03 23:13 ` bugzilla-daemon
  2016-08-07 23:32 ` bugzilla-daemon
  2016-12-06  9:57 ` bugzilla-daemon
  6 siblings, 0 replies; 8+ messages in thread
From: bugzilla-daemon @ 2016-08-03 23:13 UTC (permalink / raw)
  To: dri-devel


[-- Attachment #1.1: Type: text/plain, Size: 1012 bytes --]

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

--- Comment #5 from Andy Furniss <adf.lists@gmail.com> ---
I can do a patch, but I'll need time to think/look/test more.

First thought = easy just add 52 and maybe make default vary with chip type as
done elsewhere, will fix gst-vaapi, but not going to help OMX.

Initial testing/looking it seems gst-omx doesn't go up to 5.2 plus gstreamer
(or me + gstreamer) doesn't seem able to pass level anyway so it picks it up
from the state tracker default - 4.2, changing this to 5.1 gets me 2160p
encoding - but I guess I can't do anything platform specific in there.

Maybe if fps is available in addition to width/height in radeon_vce.c ignore
what level is sent by player as they may be wrong/not say anyway and work it
out?

Of course I don't currently know if this is possible, what implications there
may be and what to do about different hardware capabilities.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 1803 bytes --]

[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug 91281] Tonga VCE 2160p encode fails with  BO to small for addr
  2015-07-09 10:38 [Bug 91281] Tonga VCE 2160p encode fails with BO to small for addr bugzilla-daemon
                   ` (4 preceding siblings ...)
  2016-08-03 23:13 ` bugzilla-daemon
@ 2016-08-07 23:32 ` bugzilla-daemon
  2016-12-06  9:57 ` bugzilla-daemon
  6 siblings, 0 replies; 8+ messages in thread
From: bugzilla-daemon @ 2016-08-07 23:32 UTC (permalink / raw)
  To: dri-devel


[-- Attachment #1.1: Type: text/plain, Size: 1144 bytes --]

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

--- Comment #6 from Andy Furniss <adf.lists@gmail.com> ---
Maybe if enc->base.level is unreliable I shouldn't trust
enc->base.max_references either, but it seems that the h/w gets set up using it
-

radeon_vce_40_2_2.c
RVCE_CS(MAX2(enc->base.max_references, 1) - 1); // encBPicPattern
RVCE_CS(MIN2(enc->base.max_references, 2)); // encNumberOfReferenceFrames
RVCE_CS(enc->base.max_references + 1); // encMaxNumRefFrames

radeon_vce_52.c:
enc->enc_pic.pc.enc_b_pic_pattern = MAX2(enc->base.max_references, 1) - 1;
enc->enc_pic.pc.enc_number_of_reference_frames = MIN2(enc->base.max_references,
2);
enc->enc_pic.pc.enc_max_num_ref_frames = enc->base.max_references + 1;

So unless I miss something the whole function body of get_cpb_num could be
replaced with just

return MIN2(enc->base.max_references + 1, 16);

It works testing wise with level 5.2 and doesn't need the level given by the
encoder/omx state tracker to be correct. It also saves allocating buffers that
aren't really used.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 1971 bytes --]

[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug 91281] Tonga VCE 2160p encode fails with  BO to small for addr
  2015-07-09 10:38 [Bug 91281] Tonga VCE 2160p encode fails with BO to small for addr bugzilla-daemon
                   ` (5 preceding siblings ...)
  2016-08-07 23:32 ` bugzilla-daemon
@ 2016-12-06  9:57 ` bugzilla-daemon
  6 siblings, 0 replies; 8+ messages in thread
From: bugzilla-daemon @ 2016-12-06  9:57 UTC (permalink / raw)
  To: dri-devel


[-- Attachment #1.1: Type: text/plain, Size: 693 bytes --]

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

Andy Furniss <adf.lists@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|NEW                         |RESOLVED

--- Comment #7 from Andy Furniss <adf.lists@gmail.com> ---
Fixed in mesa

https://cgit.freedesktop.org/mesa/mesa/commit/?id=5338fb34d6af656adaf0c80d57b5a6168f81d3e1

https://cgit.freedesktop.org/mesa/mesa/commit/?id=2a38a5b2b28aa6e2c5c005bf5a2bfeae11623f22

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 2414 bytes --]

[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2016-12-06  9:57 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-09 10:38 [Bug 91281] Tonga VCE 2160p encode fails with BO to small for addr bugzilla-daemon
2016-07-29 23:08 ` bugzilla-daemon
2016-08-01 10:19 ` bugzilla-daemon
2016-08-01 23:49 ` bugzilla-daemon
2016-08-03 12:24 ` bugzilla-daemon
2016-08-03 23:13 ` bugzilla-daemon
2016-08-07 23:32 ` bugzilla-daemon
2016-12-06  9:57 ` bugzilla-daemon

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.