Repository navigation
drm/apple: T6050: no DSC modes on an external engine without its provider clock - #4501
Merged
RyanTheTide merged 4 commits intoDec 5, 2026
Conversation
…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>
…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>
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. Signed-off-by: Rolando Trevino <122947376+rolotrealanis98@users.noreply.github.com>
…ming, not the color cache dcp_select_color_mode() looked the timing's default SDR element and its PQ element up in colors[] to see whether they need DSC. colors[] keeps only the best DCP_MAX_COLOR_ENTRIES (64) elements by score, so a low-scored DSC-required default (10-bit RGB, ID 88) below 64 uncompressed SDR elements was not in it, the lookup answered "no DSC", and the fast path handed ID 88 to an engine that cannot run DSC. parse_mode() now records whether the timing's own DSCRequiredColorElementIDs lists the default element (color_mode_dsc) and the PQ element (pq_dsc), and the no_dsc checks read those flags. KUnit color_no_dsc_survives_full_cache fills colors[] with 64 uncompressed SDR elements and leaves the DSC-required default and PQ elements out of it: with no_dsc the default request gets one of the 64 and the PQ request is refused; without no_dsc both get the timing's own pick. It fails at the previous head. parser_tiled_size_keeps_dsc_modes also checks that color_mode_dsc follows the timing's list, including a tiled size that clears it. Signed-off-by: Rolando Trevino <122947376+rolotrealanis98@users.noreply.github.com>
|
Merge readiness at
Areas: Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels. |
satchlj
approved these changes
Dec 5, 2026
satchlj
left a comment
Member
There was a problem hiding this comment.
Reviewed at becfc13a5599 (code review only; J716s re-row at this head pending as noted in Not yet).
- Scoping
dcp_ext_unclocked()to externalapple,t6050-dcpextengines without firmware clocks (!dcp->num_firmware_clocks && dcp->hw.external_processor) leaves clocked engines, internal panels, and other SoCs unchanged while avoiding null-dev derefs on internal test DCPs. - Recording
color_mode_dscandpq_dscdirectly fromlimits.dsc_requiredinparse_mode()avoids relying on the 64-entrycolors[]cache for the default SDR and PQ fast paths, and gating both fast paths anddcp_scan_color_modes()onreq->no_dsccleanly keeps timings with an uncompressed SDR element (e.g. 8-bit RGB alongside DSC 10-bit RGB) usable whiledcp_mode_valid()rejects timings with no uncompressed SDR element. - KUnit
color_no_dsc_picks_uncompressedandcolor_no_dsc_survives_full_cachecover both the mixed uncompressed/DSC case and the full-cache eviction edge case cleanly.
Verdict: APPROVE.
Contributor
|
Hardware row at exact head
|
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.
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: at becfc13: KUnit dcp-display 349/350 (1 skipped), including the new full-cache case, which fails at the previous head; W=1 for drivers/gpu/drm/apple. J716s rows were taken at #3922's heads (HDMI at 86202c6, USB-C at 1660f80, in that PR); a row at this head follows.
Risk: two-way door. T6050 (M5)
apple,t6050-dcpextengines without clock-ids only; engines with a clock table, internal panels and other SoCs keep their color selection.Not yet: a J716s row at this head (USB-C and HDMI 2560x1600).
This replaces #3922 on a fresh branch from current main (that branch's history isn't rewritten), with the last review's finding fixed in the new top commit:
colors[], which keeps only the best 64 elements by score. A DSC-required default scored below 64 uncompressed SDR elements was missing from it, so the lookup said "no DSC" and the fast path handed it to the clockless engine.parse_mode()now records from the timing's ownDSCRequiredColorElementIDswhether the default element (color_mode_dsc) and the PQ element (pq_dsc) need DSC, and the checks read those flags.color_no_dsc_survives_full_cachebuilds exactly that case (64 uncompressed SDR elements, the DSC-required default and PQ elements outside the cache). With the old lookup it fails three expectations; with this commit it passes.parser_tiled_size_keeps_dsc_modesalso checkscolor_mode_dscfollows the timing's list.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 and flags those elements. On anapple,t6050-dcpextwithout firmware clocks, the color request carriesno_dsc: the selection never picks a DSC-required element, so a timing whose default is 10-bit RGB but which also lists 8-bit RGB uncompressed runs on 8-bit RGB, anddcp_mode_valid()refuses a timing only when none of its SDR elements runs uncompressed (dcp_mode_has_dsc_free_sdr()). Whether the default and PQ elements need DSC is taken from the timing's own list at parse time (color_mode_dsc,pq_dsc). 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 replaced the cap with the firmware's list, the third moved from refusing a mode by its default element to keeping the selection off DSC-required elements (the HDMI 2560x1600@165 case), and the fourth fixes the color-cache lookup above. It also checks
external_processorbefore the compatible string: with the cap,parser_internal_v27_only_120hzoopsed 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:
DSCRequiredColorElementIDslists 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.dptxport_call_set_link_ratetracepoint and theSET_ACTIVE_LANE_COUNTdebug line on each plug. bpc is the color element the firmware set (set_digital_out_mode ... colorID: 81) andmode_set_gated ... DSC=NO.getClockFrequency(0) (0) < videoClock ... Giving up on frequenciesat 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.drivers/gpu/drm/apple/tests/display.kunitconfig(arm64 QEMU, LLVM): 206 passed, 1 skipped, 0 failed, including the newparser_color_needs_dscandparser_internal_v27_only_120hz.iomfb.oandparser.owith W=1: 0 warnings.