Summary: | Green bottom half of video frame when using JPEG acceleration (vcn_v1_0_jpeg_ring_emit_fence() WARNING) | ||
---|---|---|---|
Product: | Mesa | Reporter: | Rafał Miłecki <zajec5> |
Component: | Drivers/Gallium/radeonsi | Assignee: | Default DRI bug account <dri-devel> |
Status: | RESOLVED MOVED | QA Contact: | Default DRI bug account <dri-devel> |
Severity: | normal | ||
Priority: | medium | CC: | boyuan.zhang |
Version: | unspecified | ||
Hardware: | Other | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: |
good frame ("Use hardware acceleration when available" disabled)
bad frame ("Use hardware acceleration when available" enabled) all green frame (started with the commit 1b25d340b791 ("radeonsi: use compute for resource_copy_region when possible")) |
Description
Rafał Miłecki
2019-03-16 17:42:46 UTC
Created attachment 143694 [details]
good frame ("Use hardware acceleration when available" disabled)
Created attachment 143695 [details]
bad frame ("Use hardware acceleration when available" enabled)
This is a regression introduced by the commit 36258308a794 ("st/va: fix the incorrect max profiles report"). Previously I was using Mesa 18.2 for a month or two without ever seeing this issue. Another problem caused by the above commit 36258308a794 is re-introducing corrupted colors in YouTube playbacks when using Chromium with "Use hardware acceleration when available" enabled. That was originally reported by me in the bug 109080. Playing YouTube video using kernel 5.0.1 and Mesa 18.3.4 results in corrupted colors and following errors: [ 6376.312717] gmc_v9_0_process_interrupt: 38 callbacks suppressed [ 6376.312726] amdgpu 0000:04:00.0: [mmhub] VMC page fault (src_id:0 ring:40 vmid:3 pasid:32775, for process chromium pid 21146 thread chromium -:cs0 pid 21208) [ 6376.312730] amdgpu 0000:04:00.0: in page starting at address 0x0000800106198000 from 18 [ 6376.312733] amdgpu 0000:04:00.0: VM_L2_PROTECTION_FAULT_STATUS:0x00340451 [ 6376.312746] amdgpu 0000:04:00.0: [mmhub] VMC page fault (src_id:0 ring:40 vmid:3 pasid:32775, for process chromium pid 21146 thread chromium -:cs0 pid 21208) [ 6376.312748] amdgpu 0000:04:00.0: in page starting at address 0x0000800106199000 from 18 [ 6376.312750] amdgpu 0000:04:00.0: VM_L2_PROTECTION_FAULT_STATUS:0x00000000 [ 6376.312762] amdgpu 0000:04:00.0: [mmhub] VMC page fault (src_id:0 ring:174 vmid:0 pasid:0, for process pid 0 thread pid 0) [ 6376.312764] amdgpu 0000:04:00.0: in page starting at address 0x0000000000000000 from 18 [ 6376.312766] amdgpu 0000:04:00.0: VM_L2_PROTECTION_FAULT_STATUS:0x0000073C [ 6376.312781] amdgpu 0000:04:00.0: [mmhub] VMC page fault (src_id:0 ring:158 vmid:0 pasid:0, for process pid 0 thread pid 0) [ 6376.312783] amdgpu 0000:04:00.0: in page starting at address 0x0000000000000000 from 18 [ 6376.312785] amdgpu 0000:04:00.0: VM_L2_PROTECTION_FAULT_STATUS:0x00000000 [ 6386.301258] [drm:amdgpu_job_timedout [amdgpu]] *ERROR* ring vcn_dec timeout, signaled seq=192, emitted seq=194 [ 6386.301398] [drm:amdgpu_job_timedout [amdgpu]] *ERROR* Process information: process pid 0 thread pid 0 [ 6386.301414] [drm] GPU recovery disabled. [ 6396.541548] [drm:amdgpu_job_timedout [amdgpu]] *ERROR* ring vcn_dec timeout, signaled seq=192, emitted seq=194 [ 6396.541636] [drm:amdgpu_job_timedout [amdgpu]] *ERROR* Process information: process pid 0 thread pid 0 [ 6396.541639] [drm] GPU recovery disabled. [ 6406.782141] [drm:amdgpu_job_timedout [amdgpu]] *ERROR* ring vcn_dec timeout, signaled seq=192, emitted seq=194 [ 6406.782241] [drm:amdgpu_job_timedout [amdgpu]] *ERROR* Process information: process pid 0 thread pid 0 [ 6406.782244] [drm] GPU recovery disabled. [ 6417.022165] [drm:amdgpu_job_timedout [amdgpu]] *ERROR* ring vcn_dec timeout, signaled seq=192, emitted seq=194 [ 6417.022268] [drm:amdgpu_job_timedout [amdgpu]] *ERROR* Process information: process pid 0 thread pid 0 [ 6417.022271] [drm] GPU recovery disabled. my screen freezes shortly after that. I've verified that reverting 36258308a794 from the top of 18.3.4 release fixes both issues. This is about what the patch does: --- a/src/gallium/state_trackers/va/context.c +++ b/src/gallium/state_trackers/va/context.c @@ -175,7 +175,7 @@ VA_DRIVER_INIT_FUNC(VADriverContextP ctx) ctx->version_minor = 1; *ctx->vtable = vtable; *ctx->vtable_vpp = vtable_vpp; - ctx->max_profiles = PIPE_VIDEO_PROFILE_MPEG4_AVC_HIGH - PIPE_VIDEO_PROFILE_UNKNOWN; + ctx->max_profiles = PIPE_VIDEO_PROFILE_MAX - PIPE_VIDEO_PROFILE_UNKNOWN - 1; It just correct the number of max_profile, that HW can support. It's not make sense to me this would cause such issue based on the ticket, unless player wrongly use the this after querying this. Can this be reproduced with Mesa master branch? or Can this be reproduced with any other players? Other confusion is that the patch is to fix the chromium browser issue https://bugs.freedesktop.org/show_bug.cgi?id=109107 Thanks for looking at this Leo! Initially I didn't realize the consequences of your patch. I hopefully understand it now. Before the commit 36258308a794 ("st/va: fix the incorrect max profiles report") my Chromium was simply NOT USING any Video Acceleration. Chromium was complaining with the following errors: [21202:21202:0317/122002.223002:ERROR:vaapi_wrapper.cc(587)] : vaQueryConfigProfiles returned: 14 [21202:21202:0317/122002.223045:ERROR:vaapi_wrapper.cc(587)] : vaQueryConfigProfiles returned: 14 So your change didn't introduce any regression in JPEG hardware decoding. It only exposed an existing bug by allowing Chromium to use Video Acceleration. ***** Let me provide some new (hopefully useful) info on this problem: 1) This problem is clearly about the JPEG decoding. If I revert commit 55e7de7b1935 ("radeonsi: enable vcn jpeg decode for raven") from any recent branch (18.3, 19.0 or master) the problem disappears. 2) The problem exists from the beginning. If I do: git checkout 55e7de7b1935 git cherry-pick 36258308a794 git cherry-pick dafa02c980c1 I get a Chromium with working Video Acceleration AND half bottom of webcam frames being green. 3) I tested few branches: 18.3: bottom half of webcam frames are green 19.0: whole webcam frames are green master: whole webcam frames are green As you can see things got worse with the 19.0 branch (frames are totally green instead of half green). That regression was added by the commit 1b25d340b791 ("radeonsi: use compute for resource_copy_region when possible"). Hopefully this is some hint on what's wrong and what's causing the original problem. ***** Leo: I didn't try any other players, I've yet to learn how to use JPEG hw decoding with some other application/player. Created attachment 143705 [details] all green frame (started with the commit 1b25d340b791 ("radeonsi: use compute for resource_copy_region when possible")) Webcam frames became all green with the commit 1b25d340b791 ("radeonsi: use compute for resource_copy_region when possible"): https://cgit.freedesktop.org/mesa/mesa/commit/?id=1b25d340b791ad8350bdfb27f1a91ac79fa17748 It makes more sense now, we'll take a look. But the thing is we don't got Raven system with a camera, so it's probably hard to reproduce. -- 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/1383. |
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.