video: driver: fix RO buffer DMA memory leak on teardown and fix raw buffer size for interlace handling#89
Merged
vgarodia merged 2 commits intoApr 3, 2026
Conversation
Interlace is enabled by default during buffer size calculation. Due to this, the size is computed a larger value. Keep interlace decision be decided by the firmware event when it can firmly say if the content is interlace or progressive. Change-Id: I796a01442a871a0a0c5b993200c84b5b488cbf0a Signed-off-by: Venkata Siva Pavan KumarVenkatapatigari <venvenk@qti.qualcomm.com>
vgarodia
approved these changes
Apr 3, 2026
vgarodia
requested changes
Apr 3, 2026
vgarodia
left a comment
Contributor
There was a problem hiding this comment.
Confirm the CB changes with upstream driver as well
Ensure RO and external buffers are properly freed with dma_free_attrs() during flush and destroy paths instead of only logging non-zero refcounts. Also guard msm_vb2_put() against zero refcount buffers and avoid freeing DMA memory for decode output buffers that are tracked as read-only, to prevent double free and memory corruption. Change-Id: I5ebc548bfb28a895077dd2b0d4020a14a1e79bbc Signed-off-by: Renjiang Han <renjiang@qti.qualcomm.com>
161966b to
5ef5403
Compare
Contributor
Author
CB changes has issue with upstream driver. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ensure RO and external buffers are properly freed with dma_free_attrs()
during flush and destroy paths instead of only logging non-zero refcounts.
Also guard msm_vb2_put() against zero refcount buffers and avoid freeing
DMA memory for decode output buffers that are tracked as read-only, to
prevent double free and memory corruption.
Fix raw buffer size calculation by deferring interlace handling to firmware events.