Repository navigation
Conversation
Commit 645dde2 ("drm/bridge: tc358762: revert move ops to enable") moved tc358762_init() from tc358762_enable() back into tc358762_pre_enable() and dropped the "ctx->pre_enabled = true" assignment that ended the old pre_enable. Mainline still has it. pre_enabled now stays false, so tc358762_post_disable() always returns early: the vddc regulator is enabled on every pre_enable but never disabled, and the reset GPIO is never asserted again. Unbinding the driver while the display is enabled then warns in _regulator_put(): WARNING: ... at drivers/regulator/core.c:2460 _regulator_put+0x58/0x68 ... devm_regulator_release+0x1c/0x30 ... tc358762_driver_exit+0x18/0x38a0 [tc358762] Set pre_enabled again at the end of tc358762_pre_enable(). Fixes: 645dde2 ("drm/bridge: tc358762: revert move ops to enable") Signed-off-by: Henry Zhang <henryzhang62@gmail.com>
The VC4_NUM_TXP_OVERLAY_PLANES (32) overlay planes for the writeback CRTC are created with a default zpos of i + 1, so 1 to 32, but with the zpos range of the normal overlay planes, 1 to VC4_NUM_OVERLAY_PLANES + 1 (17). Planes 17 to 31 of that loop therefore start with a zpos outside their own range, and writing the current value back fails with EINVAL. On a Pi 5, 15 of the 56 planes have a zpos above their maximum, and the igt test kms_properties fails on it: (kms_properties) CRITICAL: Failed assertion: value <= values[1] (kms_properties) CRITICAL: error: 0x12 > 0x11 Subtest get_properties-sanity-non-atomic: FAIL Subtest get_properties-sanity-atomic: FAIL Use VC4_NUM_TXP_OVERLAY_PLANES + 1 as the maximum for those planes. Tested on a Pi 5 (6.18.39) with the patched vc4 module loaded from the initramfs: - planes with a zpos outside their range: 15 of 56 -> 0 of 56 - kms_properties: 8 pass / 2 fail -> 10 pass / 0 fail - the other KMS tests run (kms_atomic, kms_addfb_basic, kms_getfb, kms_prop_blob, kms_lease, kms_writeback, kms_atomic_transition, ...) give the same results as before. kms_flip has the same set of timing-dependent failures on HDMI-A-1 with and without this change; each of those subtests passes and fails on reruns. The failure was found with igt-gpu-tools. The fix and this changelog were written with the help of an AI coding assistant (Claude), and the testing above was run on real hardware. Fixes: 5c85a4b ("drm/vc4: Assign 32 overlay planes to writeback only") Signed-off-by: Roy <rongh7426@gmail.com>
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 there 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>
Does NOT include the clock and IRQ changes. 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_completion 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. Fix 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 is just what the user passed not the actual size - use vb2_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 correctly 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>
…ration It is possible to flood the log with warning messages by setting bad values in SPS, PPS etc. It is valuable to have this info when debugging so reduce the level to debug. Reported-by: Roy <rongh7426@gmail.com> Closes: raspberrypi#7796 Signed-off-by: John Cox <jc@kynesim.co.uk>
Contributor
Author
|
@jc-kynesim Can you cast your eye over this? |
Contributor
|
I can have a look, but the best way forward might be to wait for @6by9 to produce our next attempt at an upstream set of patches, wipe everything that we have in hevc_d and apply that + whatever patches we want to fix up clocks and old formats? |
Contributor
Author
|
I'm happy to leave these here unmerged for now. |
pelwell
marked this pull request as draft
November 27, 2026 09:25
Contributor
|
I'll note that there are two commits at the start of the sequence that seem to have nothing to do with hevc_d that you still might want to merge. |
Contributor
Author
|
Thanks - I have already merged them, and I find it strange that the GUI isn't allowing an update or rebase to reflect the fact. |
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.
The forward-port of #7780 didn't go smoothly. This PR is Claude's attempt - it builds cleanly, but I can't say beyond that.
The notes: