[Mos] Fix Xe media engine reset on 32-bit media-driver#2005
[Mos] Fix Xe media engine reset on 32-bit media-driver#2005matte-schwartz wants to merge 1 commit into
Conversation
batch_addrs[0] (uint64_t) was cast through uintptr_t before assignment to exec.address (__u64). On 32-bit builds this truncates GPU VAs above 4GB, causing the kernel to reject or fault the dispatch and reset the media engine. Pass batch_addrs[0] directly. For the array pointer branch, use the standard (uint64_t)(uintptr_t) idiom. Signed-off-by: Matthew Schwartz <matthew.schwartz@linux.dev>
|
Sorry, I was under the impression given some older merged PRs in this repo (#1493) that 32-bit was somewhat supported, but I see now I was mistaken and that you've stated 32-bit builds are not supported: #1989 (comment). This was actually for a media engine reset I ran into while looking into the feature requested in that issue, so it probably makes more sense to continue discussions there. |
|
I tested this patch on an Intel Arc Pro B70 system using the Test environment (32-bit VAAPI stack): Before applying this PR, 32-bit VAAPI initialized successfully, but actual encode failed. A minimal 32-bit FFmpeg H.264 VAAPI test failed with: Steam Remote Play showed the same effective failure through its 32-bit VAAPI path: After applying this PR, the same 32-bit FFmpeg H.264 VAAPI test succeeds. Steam Remote Play H.264 hardware encoding also works after applying the patch. The stream now uses HW encode, video is visible, and I no longer see the previous slow-encode / black-screen behavior in a short test. So from my testing, this PR fixes a real 32-bit VAAPI H.264 encode failure on Battlemage / Any plans on merging the PR? |
|
@fviolence fwiw, in case it doesn't get merged, using the SteamRT3 beta seems to work with just the 64-bit |
|
Yes, SteamRT3 indeed uses the 64-bit |
batch_addrs[0] (uint64_t) was cast through uintptr_t before assignment to exec.address (__u64). On 32-bit builds this truncates GPU VAs above 4GB, causing the kernel to reject or fault the dispatch and reset the media engine.
Pass batch_addrs[0] directly. For the array pointer branch, use the standard (uint64_t)(uintptr_t) idiom.