Repository navigation
Conversation
plane.c tags every RGB framebuffer DCP_COLORSPACE_NATIVE. The desktop renders sRGB, and Apple's external panels (Studio Display, Studio Display XDR, Pro Display XDR) are Display P3, so sRGB values land on P3 primaries unconverted and every saturated colour, reds most visibly, comes out far more vivid than on macOS. The internal panel does not show this because DCP applies its own factory pipeline there. Tag the surface DCP_COLORSPACE_BG_SRGB for non-eDP connectors so DCP converts sRGB to the panel gamut in hardware, which is what macOS asks of it. YUV planes keep their own tag. Behind appledrm.external_srgb, default off and writable at runtime. Compositors now map sRGB into the panel gamut themselves: Omarchy 4.5 sets cm = "edid" on every Apple Silicon monitor rule (omacom/omarchy PR #17640), and Hyprland users set cm or an ICC profile by hand. With DCP converting as well the picture is converted twice, which measured as flattened reds on a Studio Display XDR next to the internal panel. Y is for a compositor that does no colour management of its own. Seen on an M1 Max MacBook Pro (J314c) driving a Studio Display XDR at 5120x2880@60 over USB-C DisplayPort, DCP firmware 13.5. Co-Authored-By: Claude Fable 5.1 <[email protected]> Signed-off-by: Brian Toll <[email protected]>
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.
drm: apple: tag RGB surfaces on external displays as sRGB
Target: omacom/linux-aurora, branch
integration/aurora. One commit (branchdcp-external-srgb). Split out of #157; the link colorimetry change stays there and the XRGB2101010 fix is #411. This patch is independent of both, but is only useful once the link carries a default-RGB colorimetry (#157), since a BT.2020 link stretches the converted pixels again.Problem
plane.ctags every RGB framebufferDCP_COLORSPACE_NATIVE, andiomfb_template.conly rewrites that for eDP. The desktop renders sRGB, and Apple's external panels (Studio Display, Studio Display XDR, Pro Display XDR) are Display P3, so sRGB values land on P3 primaries with no conversion and every saturated colour comes out far more vivid than on macOS. The internal panel never shows this because DCP applies its own factory pipeline there.DCP can do the conversion itself when a surface is tagged
DCP_COLORSPACE_BG_SRGB, which is what macOS asks of it (AsahiLinux#547).Fix
New module parameter
appledrm.external_srgb, default off, writable at runtime through/sys/module/appledrm/parameters/external_srgb. When on, RGB surfaces for non-eDP connectors are taggedDCP_COLORSPACE_BG_SRGBso DCP converts to the panel gamut in hardware. YUV planes keep their own tag.Why the default is off: compositors now map sRGB into the panel gamut themselves. Omarchy 4.5 sets
cm = "edid"on every Apple Silicon monitor rule (omacom/omarchy#17640, merged 2026-11-05), and Hyprland users setcmor an ICC profile by hand. With DCP converting as well, the picture is converted twice. Measured on a Studio Display XDR next to the internal panel, that reads as flattened reds.Yis for a compositor that does no colour management of its own, and for A/B testing, since it can be flipped live. The global is left uninitialised per kernel style; theMODULE_PARM_DESCstates the default.Tested
MacBook Pro 14" M1 Max (j314c), DCP firmware 13.5, Studio Display XDR at 5120x2880@60 over a Thunderbolt DP tunnel, Hyprland 0.56.2 for the side-by-side tests, 0.57.1 in daily use since, with the default-RGB link from #157 in place. Reference was the internal panel beside it, same swatch page on both.
external_srgb=Ywith Hyprland on plaincm = "srgb": clearly closer to the internal panel than the untouched driver, reds still a little more saturated with a hue shift.external_srgb=Yplus a compositor-side profile: reds go flat (double conversion), which is why the default isN.external_srgb=Nplus a compositor-side ICC profile: a match. This is the configuration in daily use since 2026-10-19 (local kernel releases 12 through 16), which also exercises the parameter's default path.drivers/gpu/drm/apple/builds onintegration/aurora8eddf5a with the Omarchy config (W=1, clang); checkpatch --strict reports only theCo-Authored-Bytrailer spelling and the pre-existingDRM_MODE_CONNECTOR_eDPCamelCase check.🤖 Generated with Claude Code