Skip to content

drm/apple: T6050: no DSC modes on an external engine without its provider clock - #3922

Open
rolotrealanis98 wants to merge 3 commits into
aurora-silicon:mainfrom
rolotrealanis98:pr/t6050-dcpext-unclocked-dsc
Open

rolotrealanis98 wants to merge 3 commits into
aurora-silicon:mainfrom
rolotrealanis98:pr/t6050-dcpext-unclocked-dsc

Conversation

@rolotrealanis98

@rolotrealanis98 rolotrealanis98 commented Dec 2, 2026 •

Copy link
Copy Markdown
Contributor

What: a T6050 external engine without firmware clocks never selects a color element the firmware lists as DSC required, and refuses a timing only when none of its SDR elements runs uncompressed.
Tested: J716s HDMI row at 86202c6 (in the comments), the USB-C rows below at 1660f80, KUnit, host tests and W=1.
Risk: two-way door. T6050 (M5) apple,t6050-dcpext engines without clock-ids only; engines with a clock table, internal panels and other SoCs keep their color selection.

Problem

On the J716s (M5 Pro, firmware 27.3) a USB-C display at 2560x1600@260 stays black. The dcpext firmware compresses that timing with DSC. The J716s ADT gives the dispext/dcpext engines no clock-ids, so the driver has no provider clock to answer the firmware with. The same display runs uncompressed at 60 to 180 Hz on both USB-C ports, and on HDMI at 165 Hz.

#3457's dcp_mode_beyond_provider_clock() limits modes by the provider clock, but by design it skips a processor without a provider clock table, which is this case.

Change

The firmware sends, with each timing of the connected display, the color elements that need DSC on its link (DSCRequiredColorElementIDs). The parser already reads that list into the timing's color restrictions. parse_mode() now records whether the color element a mode uses is on it (color_needs_dsc). An apple,t6050-dcpext without firmware clocks refuses those modes. Engines with a clock table, internal panels and other SoCs are unchanged.

The first version capped such an engine at what a four-lane HBR3 link carries uncompressed at 10 bits per component. As review pointed out, that was only an upper bound: it let through modes a narrower link compresses and applied the same limit to HDMI. The second commit replaces the cap with the firmware's list. It also checks external_processor before the compatible string: with the cap, parser_internal_v27_only_120hz oopsed on a test DCP without a device.

Testing (at 1660f80)

J716s (MacBook Pro 16-inch, M5 Pro, firmware 27.3), kernel 7.3.0-g4b12f91447f1 = the J716s daily on main 0c502a2 with this change (same diff), Innoview 2560x1600 display (the firmware lists 2560x1600 timings up to 260 Hz; DSC 1.2a sink), USB-C DisplayPort:

Port Link 2560x1600 offered Mode run bpc DSC Picture
front-left (ATC 1) HBR3 (0x1e), 4 lanes 180, 165, 144, 120, 60 Hz 165 Hz, then 180 Hz 8 (RGB, color element 81) no yes (owner)
right (ATC 2) HBR3 (0x1e), 4 lanes 180, 165, 144, 120, 60 Hz 165 Hz 8 (RGB, color element 81) no yes (owner)
  • 260 Hz (and 240 Hz) are no longer offered at 2560x1600. On both ports the firmware's DSCRequiredColorElementIDs lists every color element of those two timings and none of any other. 1920x1080 at 240 and 260 Hz needs no DSC and is still offered.
  • Link rate and lane count are from the dptxport_call_set_link_rate tracepoint and the SET_ACTIVE_LANE_COUNT debug line on each plug. bpc is the color element the firmware set (set_digital_out_mode ... colorID: 81) and mode_set_gated ... DSC=NO.
  • Clock errors: on this engine the firmware logs getClockFrequency(0) (0) < videoClock ... Giving up on frequencies at every mode set, uncompressed modes included. The daily without this change logs the same line at 179 Hz. No new clock errors. 0 WARN/Oops/SError.
  • The 2-lane and HDMI routes follow the same list. I haven't run a 2-lane link here; HDMI on this kernel was not retested.
  • KUnit drivers/gpu/drm/apple/tests/display.kunitconfig (arm64 QEMU, LLVM): 206 passed, 1 skipped, 0 failed, including the new parser_color_needs_dsc and parser_internal_v27_only_120hz.
  • iomfb.o and parser.o with W=1: 0 warnings.

…ider clock

On the J716s a USB-C display at 2560x1600@260 stayed black: the dcpext
firmware enables DSC for it, sizes the stream from its provider clock 0
("using getClockFrequency(0)"), the driver has no firmware clock to give
(the ADT's dispext/dcpext clock-ids are empty) and the firmware logs
"getClockFrequency(0) (0) < videoClock ... Giving up on frequencies".
The same display at 60 and 165 Hz (no DSC) shows a picture on both
USB-C ports, and HDMI at 165 Hz does too.

Until that clock is known, an apple,t6050-dcpext without firmware clocks
offers only the modes a 4-lane HBR3 link carries uncompressed at 10 bits
per component.

Signed-off-by: Rolando Trevino <122947376+rolotrealanis98@users.noreply.github.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Dec 2, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-12-02T11:43:31.284414Z c39b257 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions github-actions Bot added area:display Area from CODEOWNERS (bot) needs-hw-row No hardware row at the PR head (bot) needs-review No approving review from Core or Omarchy Mac yet (bot) needs-template PR body lacks Tested or Risk (bot) labels Dec 2, 2026
@github-actions

github-actions Bot commented Dec 2, 2026 •

Copy link
Copy Markdown

Merge readiness at 86202c62: not ready yet

Check Detail
CI at head no failing: pr-text / pr-text, pr-text / pr-text
Review no needs one approving review from Core, Omarchy Mac or Aurora Maintainers (not the author)
Requested changes no requested by aurora-silicon-review
Hardware row at head no no line with the head SHA 86202c62, a Mac and a result in the PR body or a comment
Conflicts ok none
PR text ok Risk: two-way · . T6050 (M5) apple,t6050-dcpext engines without clock-ids only; engines with a clock table, internal panels and other SoCs keep their color selection. Problem On the J716s (M5 Pro, firmware 27.3) a USB-C display at 2560x1600@260 stays black. The dcpext firmware compresses that timing with DSC. The J716s ADT gives the dispext/dcpext engines no clock-ids, so the driver has no provider clock to answer the firmware with. The same display runs uncompressed at 60 to 180 Hz on both USB-C ports, and on HDMI at 165 Hz.

Areas: area:display

Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels.

@satchlj satchlj left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: FINISH, then merge at c39b257d5985fe297d9eaa8314bf5235cabe3550
Blockers:

  1. PR structure (pr-readiness PR text | no): add a Tested: line and a Risk: line specifying two-way / one-way door and affected Macs.
  2. Exact-head hardware row (pr-readiness Hardware row at head | no): record the J716s hardware verification line referencing exact head c39b257d (the current description cites commit 54bf2dfa9358 on 5a870d0f0b3f).
  3. Connector-scope check (drivers/gpu/drm/apple/iomfb.c): dcp_ext_mode_needs_unclocked_dsc() applies a blanket 25.92 Gb/s (4-lane HBR3 10bpc) cap to all apple,t6050-dcpext instances lacking firmware clocks, including HDMI connectors. HDMI 2.1 FRL carries up to 48 Gb/s uncompressed (e.g., 4K@120 10bpc at ~35.6 Gb/s without DSC). Please confirm whether T6050 external HDMI engines also hit the getClockFrequency(0) failure above 25.92 Gb/s (or whether the tested HDMI-A-1 240 Hz mode needed DSC only because the sink/link ran TMDS/HDMI 2.0), and either scope the cap to DP / TMDS links or explicitly document the HDMI 2.1 FRL trade-off in Risk:.

Checked: no Apple material, drivers/gpu/drm/apple/iomfb.c dcp_mode_valid() / dcp_mode_beyond_provider_clock() interaction, pr-readiness checks, PR text

Evidence
  • drivers/gpu/drm/apple/iomfb.c: dcp_ext_mode_needs_unclocked_dsc() returns true when !dcp->num_firmware_clocks && of_device_is_compatible(dcp->dev->of_node, "apple,t6050-dcpext") && (u64)clock_khz * 1000 * 30 > 25920000000ULL.
  • Non-blocking code notes:
    • Consider checking dcp->fw_compat == DCP_FIRMWARE_V_27_0 (matching dcp_mode_beyond_provider_clock() directly above) and checking whether an engine/firmware capability property can replace the SoC compatible check.
    • On 8bpc-only DP links, HBR3 carries up to 1,080 MHz uncompressed (vs 864 MHz at 30 bpp); acceptable as a conservative temporary bound while clocks are missing, worth noting if intentional.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c39b257d59

ℹ️ 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".

Comment thread drivers/gpu/drm/apple/iomfb.c Outdated
static bool dcp_ext_mode_needs_unclocked_dsc(struct apple_dcp *dcp, u32 clock_khz)
{
return !dcp->num_firmware_clocks &&
of_device_is_compatible(dcp->dev->of_node, "apple,t6050-dcpext") &&

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Initialize the existing mode-validation fixture's device

With CONFIG_DRM_APPLE_DISPLAY_KUNIT_TEST enabled, parser_internal_v27_only_120hz() in parser-test.c allocates a zeroed apple_dcp but never assigns dcp->dev. Its first dcp_mode_valid() call has num_firmware_clocks == 0, so this new helper dereferences a null device and crashes the test before its assertions complete; the previous provider-clock check short-circuited on the empty clock table. Initialize the fixture's device, for example to its fake platform device, alongside this change so the existing display KUnit suite remains runnable.

Useful? React with 👍 / 👎.

@github-actions github-actions Bot added the changes-requested A reviewer requested changes (bot) label Dec 2, 2026

@DjDeveloperr DjDeveloperr left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please verify the transport limits before calling this a DSC filter. At c39b257d5985, the new helper permits 864 MHz and rejects 864.001 MHz on any clockless T6050 external engine. A 650 MHz RGB mode at 10 bits per component passes the filter but needs 19.5 Gb/s, above the 12.96 Gb/s available on a two-lane HBR3 link. The cutoff also applies to HDMI, since the helper receives the engine and no connector information. It is an upper bound for four-lane HBR3 and does not tell whether a particular link will use DSC.

The missing row is J716s on firmware 27.3 at this head, with the same 2560×1600 display connected by USB-C DisplayPort. Please show 260 Hz is no longer offered, 165 Hz lights on both ports, and there are no new clock errors. Record the negotiated rate, lane count and bits per component. If the cap is kept for limited links or for HDMI, include a row that checks those routes too.

The arm64 make ARCH=arm64 LLVM=1 O=... -j8 W=1 drivers/gpu/drm/apple/iomfb.o build passed. A host check compiled the exact helper and verified the cutoff and the clocked/internal controls.

@github-actions github-actions Bot added blast:m5 Macs affected, from Merge risk (bot) door:two-way Revertible or not, from Merge risk (bot) and removed needs-hw-row No hardware row at the PR head (bot) needs-template PR body lacks Tested or Risk (bot) labels Dec 4, 2026
…ck cap

The previous change capped an apple,t6050-dcpext without firmware clocks
at what a four-lane HBR3 link carries uncompressed at 10 bits per
component. That is only an upper bound: it lets through modes a
narrower link compresses, and applies the same limit to HDMI.

The firmware sends, with each timing of the connected display, the
color elements that need DSC on its link (DSCRequiredColorElementIDs).
On the J716s, for a 2560x1600 display on USB-C, it lists every element
of 2560x1600@240 and @260 and none of the others. 260 Hz is the mode
that stays black; 60 to 180 Hz run uncompressed. The parser
already reads that list into the timing's color restrictions. Record
whether the color element a mode uses is in it, and refuse those modes
on such an engine instead of comparing the clock.

Check external_processor before the compatible string, so a DCP without
a device, as in the display KUnit tests, is not dereferenced: with the
cap, parser_internal_v27_only_120hz oopsed in dcp_mode_valid().

Signed-off-by: Rolando Trevino <122947376+rolotrealanis98@users.noreply.github.com>
@github-actions github-actions Bot added needs-hw-row No hardware row at the PR head (bot) needs-template PR body lacks Tested or Risk (bot) and removed changes-requested A reviewer requested changes (bot) blast:m5 Macs affected, from Merge risk (bot) door:two-way Revertible or not, from Merge risk (bot) labels Dec 4, 2026
@rolotrealanis98

Copy link
Copy Markdown
Contributor Author

Thanks, you were right: the cap was an upper bound for one link, not a DSC test. Pushed 1660f80 on top.

The firmware already says per timing which color elements need DSC on the connected link (DSCRequiredColorElementIDs), and the parser already reads it. The engine now refuses a mode whose chosen color element is on that list, instead of comparing the clock. That covers narrower links and HDMI without assuming a rate or lane count. The same commit fixes an oops your note led me to: with the cap, dcp_mode_valid() read dcp->dev->of_node on the display KUnit tests' device-less DCP (parser_internal_v27_only_120hz). It now checks external_processor first.

The J716s row at this head (same diff on the daily, firmware 27.3, the 2560x1600 display over USB-C DisplayPort):

Port Link 2560x1600 offered Run bpc DSC Picture
front-left (ATC 1) HBR3, 4 lanes 60–180 Hz 165, 180 Hz 8 (RGB) no yes
right (ATC 2) HBR3, 4 lanes 60–180 Hz 165 Hz 8 (RGB) no yes
  • 260 Hz (and 240 Hz) are no longer offered. On both ports these are the only timings the firmware lists as DSC-required.
  • Clock errors: the firmware logs getClockFrequency(0) (0) < videoClock ... Giving up on frequencies at every mode set on this engine, uncompressed ones included. The daily without the change logs the same line at 179 Hz, so nothing new.
  • I couldn't run a 2-lane link or retest HDMI on this kernel. Both now go through the firmware's own list rather than a constant.

Display KUnit: 206 passed, 1 skipped. W=1 iomfb.o/parser.o: 0 warnings. Details are in the description.

@aurora-silicon-review aurora-silicon-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: MERGE at 1660f80

On a T6050 external engine with no firmware clocks, modes whose colour element the firmware itself lists in DSCRequiredColorElementIDs are no longer offered. Before, those modes came up black (J716s, 2560x1600@240/260). Uncompressed modes on the same display, internal panels, engines with a clock table and other SoCs are unchanged.

Checked:

  • parse_mode() sets color_needs_dsc only when the timing's limits are known and the chosen best_color_mode is in limits.dsc_required, i.e. the firmware's per-timing list, not an assumed link budget. The tiled-half path drops the list, and the new KUnit case covers that.
  • dcp_ext_mode_needs_unclocked_dsc() checks num_firmware_clocks and external_processor before the compatible string, so a test DCP without a device no longer reaches of_device_is_compatible (the earlier parser_internal_v27_only_120hz oops). It returns MODE_CLOCK_HIGH, the same status the provider-clock limit uses.
  • CI is green at head. The author reports KUnit display 206 pass / 1 skip, W=1 clean, and the J716s row at this head on both USB-C ports (165/180 Hz uncompressed with picture, 240/260 Hz no longer offered, no new clock errors).

Follow-ups (not blocking):

  • The apple,t6050-dcpext compatible check is the narrowest block property for now. Once someone sees DSC with no provider clock on another external engine, the condition can become just "no firmware clocks plus DSC-required colour element".
  • Readiness doesn't parse the J716s table as a row: a one-line 1660f805 J716s PASS ... comment would satisfy it.

The filter refused a timing when the parser's pick for it was DSC
required. Over HDMI on the J716s that pick is 10-bit RGB (color element
88) for every 2560x1600 timing, and at 165 Hz the firmware lists 88 as
DSC required but not 8-bit RGB (83), so 2560x1600@165 went away although
it runs uncompressed. The same pick was also what a default color request
set: 88 at 165 Hz, which this engine can only run compressed.

A clockless T6050 external engine now asks for no DSC
(dcp_color_request.no_dsc): the color selection skips DSC-required
elements, the default SDR request included, and a timing is refused only
when none of its safe SDR elements runs uncompressed. The parser's
color_needs_dsc goes; the KUnit case checks the selection instead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: rolotrealanis98 <122947376+rolotrealanis98@users.noreply.github.com>
@rolotrealanis98

Copy link
Copy Markdown
Contributor Author

Pushed 86202c62a605 on top (normal push). Retesting over HDMI found that 1660f805 dropped 2560x1600@165, which runs uncompressed:

  • The parser's pick for every 2560x1600 timing of this display is 10-bit RGB (color element 88). At 165 Hz the firmware lists 88 in DSCRequiredColorElementIDs but not 8-bit RGB (83), so color_needs_dsc refused the timing.
  • With a default color request, that pick is also what the mode set sends: 88 at 165 Hz, which this engine can only run compressed (the boot-time DSC=YES with colorID 88 noted in arm64: dts: apple: t6050-j716s: describe the HDMI port on dcpext1 #4300).

86202c62 replaces the per-mode flag with dcp_color_request.no_dsc for a clockless apple,t6050-dcpext. Color selection skips DSC-required elements (the default SDR request included), and a timing is refused only when none of its safe SDR elements runs uncompressed. Other engines, internal panels and other SoCs keep their selection. The parser's color_needs_dsc is removed; the KUnit case color_no_dsc_picks_uncompressed checks the selection.

Hardware at 86202c62a605: J716s (MacBook Pro 16-inch, M5 Pro), firmware 27.3, Innoview 2560x1600 over HDMI (dcpext1). Kernel 7.3.0-gd92ce65ce605 = the J716s daily with this branch's three commits and #4317's. DTB = daily tree + #4300.

1660f805 86202c62
2560x1600 offered 120, 60 Hz 165, 120, 60 Hz
2560x1600 @240, @260 refused refused
1920x1080@240 offered offered
Mode run 2560x1600@120, colorID 83 and 88 2560x1600@165, colorID 83, mode_set_gated ... DSC=NO
DSC=YES at any mode set — none
WARN/Oops/SError 0 0

Trace of the firmware's color elements (iomfb_color_mode): 83 = 8-bit sRGB RGB full, 88 = 10-bit sRGB RGB full; iomfb_parse_mode_success gives best_color_mode: 88 for timings 77 (120 Hz), 79 (165 Hz), 80 (240 Hz) and 81 (260 Hz).

KUnit at 86202c62 (arm64 QEMU, LLVM): dcp-fabric 117/117, dcp-topology 235 passed + 1 skipped, dcp-display 206 passed + 1 skipped. apple-dcp host selftests pass. W=1: 0 warnings for iomfb.o, parser.o, iomfb_v27.o, iomfb_v13_3.o, iomfb_v12_3.o.

@github-actions github-actions Bot added blast:m5 Macs affected, from Merge risk (bot) door:two-way Revertible or not, from Merge risk (bot) and removed needs-hw-row No hardware row at the PR head (bot) needs-template PR body lacks Tested or Risk (bot) labels Dec 4, 2026

@aurora-silicon-review aurora-silicon-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: REQUEST_CHANGES at 86202c62a6059518f9f2ca71f0d58b84beb28a27

Blockers:

Failure: A full color cache can still send a DSC-required ID to the clockless engine. With one low-score DSC-required RGB10 default (ID 88) and 64 higher-scored uncompressed SDR entries, parser.c:655 drops ID 88 from the score-sorted cache, while parser.c:1180 still chooses it as the default RGB ID. dcp-color.h:339 returns false for an absent ID. The new fast path at dcp-color.h:380 then returns ID 88 under no_dsc, and the timing is admitted because the cache has other uncompressed SDR entries. The earlier head consulted the timing's DSC list directly. Preserve the restriction independently of the truncated color cache.

Failure: Commit 86202c62a6059518f9f2ca71f0d58b84beb28a27 contains a prohibited co-author attribution trailer. Please provide clean commit metadata on a fresh branch so the published history is preserved.

Checked: Compared the new revision against 1660f805, read the parser and request paths, and reproduced the cache-boundary behavior with the exact parser and selector helpers. The delta changes no DT files or board-specific rules. The reported J716s row covers the mixed-color timing on that display.

Evidence

With 63 other entries the cache retained ID 88 and no_dsc returned uncompressed ID 1. With 64 other entries the cache dropped ID 88, the same request returned ID 88, and the original timing restriction still marked it DSC-required. This was a host replay using synthetic timings.

@rolotrealanis98

Copy link
Copy Markdown
Contributor Author

@DjDeveloperr 86202c62 changes the approach since your review: the clockless engine now keeps DSC-required color elements out of the selection instead of refusing a mode by the parser's pick (details and the J716s HDMI row in the comment above). Could you take another look when you have time?

@github-actions github-actions Bot added ci-failing A check failed at the PR head (bot) changes-requested A reviewer requested changes (bot) needs-hw-row No hardware row at the PR head (bot) labels Dec 5, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:display Area from CODEOWNERS (bot) blast:m5 Macs affected, from Merge risk (bot) changes-requested A reviewer requested changes (bot) ci-failing A check failed at the PR head (bot) door:two-way Revertible or not, from Merge risk (bot) needs-hw-row No hardware row at the PR head (bot) needs-review No approving review from Core or Omarchy Mac yet (bot)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants