Fix Chrome seek corruption and AV1 fallback during accelerated playback - #5
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e345272164
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| int fd = export_dmabuf_memory(&drv->driverContext, img->fds[0]); | ||
| if (fd < 0) return false; |
There was a problem hiding this comment.
Verify the native buffer's tiling before reimporting it
For a legacy PRIME import from another NVIDIA allocator, successfully exporting the GEM object to an RM memory FD proves only that it is native NVKMS storage; the export ioctl returns no surface-layout metadata. Pitches, offsets, and allocation size do not uniquely determine the DRM modifier, so a linear buffer or one using a different block height can satisfy the preceding geometry checks and then be mapped with planes' inferred block-linear layout, corrupting reads and writes. Restrict this path to allocations whose modifier was previously recorded by this driver, or obtain and verify the actual layout before creating the CUDA arrays.
Useful? React with 👍 / 👎.
Chrome can show stale or split frames after seeking, and AV1 playback can fail during decoder reinitialization and fall back to VP9. Complete writes to shared surfaces before returning from EndPicture, propagate resolve failures, and preserve valid DMA-BUF reuse across decoder resets and backing-cache eviction.
Validation on RTX 5080 / NVIDIA 610.57.04 / Chrome 153.0.8010.36:
The native reimport path is limited to validated single-object packed layouts; it does not infer arbitrary foreign tiled layouts from legacy PRIME descriptors. GPU/browser validation was performed locally; the GitHub workflow covers the compiler/VP9/sanitizer matrix.