Repository navigation
HEVC decode - fix a whole lot of security holes and misc issues - #7780
Open
jc-kynesim wants to merge 17 commits into
Open
jc-kynesim wants to merge 17 commits into
jc-kynesim wants to merge 17 commits into
Conversation
tile_entry_fill will not fulfil its stated guarantee to leave one slot free if its loop never runs. Fix that. Signed-off-by: John Cox <jc@kynesim.co.uk>
If there is a concurrent decode and streamoff request the is a theoretical window in which the streamoff can complete before the decode. Close it. Signed-off-by: John Cox <jc@kynesim.co.uk>
frame_slot and rpi_currpoc are used in the error path before they are set. Fix this. Signed-off-by: John Cox <jc@kynesim.co.uk>
Typo after checking if PPS has changed. Fix it Signed-off-by: John Cox <jc@kynesim.co.uk>
…e started Starting the h/w and therefore keeping decode context based only on OUTPUT streaming state allows CAPTURE formats to change without the context changing. This allows for missized buffers. Fix so the h/w is shutdown if either stream is off. Signed-off-by: John Cox <jc@kynesim.co.uk>
Remove device serialization of G_FMT and S_FMT and use the per context lock instead for these ops. Signed-off-by: John Cox <jc@kynesim.co.uk>
Add code to invalidate a capture buffer slot if the buffer is removed Also change sync to use wait_for_competion which is both neater and safer than the existing wait_queue logic Signed-off-by: John Cox <jc@kynesim.co.uk>
min_queued_buffers = 1 is unneeded and Claude asserts that it can cause a (unlikely) race such that a job can be started before _start has completed so remove it. (Hantro doesn't have this line) Signed-off-by: John Cox <jc@kynesim.co.uk>
Requests are manually completed fix cleanup code to complete them. Signed-off-by: John Cox <jc@kynesim.co.uk>
Take the control lock whilst h265_setup is in progress to avoid inconsistent values whilst in use. Signed-off-by: John Cox <jc@kynesim.co.uk>
Control setup errors ignored, v4l2_fh_exit missing on error path. Fixe these. Signed-off-by: John Cox <jc@kynesim.co.uk>
Tighten up value checking so we cannot program wrong values into the h/w Signed-off-by: John Cox <jc@kynesim.co.uk>
Tiles must turn up in the correct order. Enforce this. Signed-off-by: John Cox <jc@kynesim.co.uk>
It is possible to remove all CAPTURE buffers whilst streaming. This allows format change as that makes it no longer busy. Check for streaming too. Signed-off-by: John Cox <jc@kynesim.co.uk>
Setup checks the vb2_v4l2_buffer plane length member which may not be correct for dmabufs as that just just what the user passed not the actual size - use v2_plane_size on the vb2_buf instead Signed-off-by: John Cox <jc@kynesim.co.uk>
Separate unregister and device release functions so we behave corrcetly if unbound whilst running. Signed-off-by: John Cox <jc@kynesim.co.uk>
Pick a format that matches the SPS (if set) in hevc_d_try_fmt_vid_cap if what the user set is unsupported or bad rather than leaving bad and always fixing up to NV12MT_COL128 Signed-off-by: John Cox <jc@kynesim.co.uk>
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.
I ran Mythos over hevc_d and it found quite a lot of stuff that previous Claude's hadn't found. This is the accumulated patch set. We aren't quite clean but I'm not worried by any of the remaining points it raised.
Time for Dom's Claude to argue with my Claude :-)