Fix 3DFP output on Amlogic HDMITX21 - #32
Open
boeschy wants to merge 4 commits into
Open
Conversation
Contributor
|
I will test it next week. 3dfp is completely missed in hdmitx21 driver, so maybe there are other places to where a switch is need. Please remove all the AI comment text in the commits. The commit itself have the description already. |
Author
|
The two additional commits are necessary to properly switch my LG 3D TV to 3D either with TAB/SBS or FP signal. |
added 4 commits
August 6, 2026 07:38
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.
Fix 3D MVC Frame-Packing output tearing on S6 (S905X5)
On my Ugoos AM9 Pro (Amlogic S6) box, 3D MVC playback in Frame-Packing depending on the 3D display, the output showed either severe V-Sync errors / image tearing, or didn't work at all. The same CoreELEC build with the same source plays 3D MVC correctly on G12B (S922X), which uses the legacy hdmitx20 driver instead of hdmitx21.
Root cause are two independent gaps in hdmitx21 relative to hdmitx20, both only relevant when hdev->tx_comm.flag_3dfp is set:
Patch 1/4 doubles the TMDS pixel clock in set_hdmitx_s6_htx_pll() when flag_3dfp is set, before the VCO/divider search. Verified: for the 1080p24/25/30 VIC group this produces the same 5.94 GHz target VCO that hdmitx20's validated setting_3dfp_enc_clk_val[] table already uses for that group.
Patch 2/4 ports the relevant fixed ENCP register tables for 1080p24/25/30/50/60 and 720p50/60 verbatim from hdmitx20's tvregstab_3dfp[] and uses them directly for 3D FP instead of the generic calculation, avoiding the DE-window drift described above. Falls back to the generic path for any VIC not covered.
Patch 3/4 fixes a separate, independent bug: hdmi21_set_3d() sent the classic HDMI 1.4a 3D VSIF via a Dolby-Vision-aware routing helper that misroutes it to the HF-VSIF packet buffer on any display without an EDID InfoFrame Data Block - which is most standalone 3D TVs. On such a display, none of Frame Packing/Top-and-Bottom/ Side-by-Side ever activated, regardless of trigger (manual toggle or playback start), even though the packet content itself was correct.
Patch 4/4 fixes two Frame-Packing-specific timing/sequencing issues once patch 3 gets the VSIF to the right buffer: PHY enable needs to wait for ENCP/VPU to settle into the new FP timing, and the VSIF (sent before the mode-set, against the old timing) needs to be re-sent once ENCP has been reprogrammed for the new one, so the packet scheduler's auto blanking-relative position stays valid.
This has only been tested on my Ugoos AM9 Pro box connected to an LG 3D TV and a 3D capable Xgimi beamer. It needs to be verified to work on other S6/hdmitx21 boxes.
Edit: My LG 3D TV didn't switch to 3D output, therefor commit 3 (fixes TAB/SBS output) and 4 (fixes FP output) have been added.
Disclaimer: Claude helped me to analyze the issue and to create the fix and comments.