Skip to content

linux-omarchy: prefer DSC over eDP color depths below 8 bpc - #477

Open
NeroSong wants to merge 2 commits into
omacom:masterfrom
NeroSong:fix/edp-dsc-color-depth
Open

NeroSong wants to merge 2 commits into
omacom:masterfrom
NeroSong:fix/edp-dsc-color-depth

Conversation

@NeroSong

@NeroSong NeroSong commented Sep 16, 2026

Copy link
Copy Markdown

Summary

On the HONOR MagicBook Pro 14, the uncompressed eDP link search selects 6 bpc with dithering at 3120×2080 @ 120 Hz, even though the panel supports DSC. Because the uncompressed configuration succeeds, the driver never tries DSC.

This patch tries DSC when a valid uncompressed eDP configuration falls below 8 bpc and below the permitted input depth. On the tested machine, it produces 8 bpc with DSC and no dithering at the same resolution and refresh rate.

This may also benefit other DSC-capable eDP panels where link bandwidth limitations cause the uncompressed configuration to fall below 8 bpc. Hardware validation so far covers the HONOR MagicBook Pro 14.

Changes

  • Carry the same patch in linux-omarchy and linux-omarchy-bore, bump pkgrel to 5, and add SHA-256 and BLAKE2 checksums.
  • Restore the original requested depth before computing DSC limits.
  • If optional DSC configuration or the final dotclock check fails, restore the valid uncompressed configuration, including the complete DSC state and FEC flag. This covers compression_enabled_on_link, which intel_dp_dsc_reset_config() does not clear.
  • Restrict the new preference to eDP; retain the existing error handling when DSC is required.

Validation

  • Hardware-tested on a HONOR MagicBook Pro 14 with linux-omarchy 7.2.5-3 using a rebuilt xe module: normal boot, 3120×2080 @ 120 Hz, 24 bpp, DSC enabled, and dithering disabled. Initial external-display hotplug also worked. The submitted revision preserves the tested executable logic.
  • Ten extracted-function tests with stubbed hardware helpers pass. The late-dotclock rollback regression fails with the original reset-only fallback and passes with complete state restoration.
  • The patch applies without fuzz to the target display source in both 7.2.5-4 kernel recipes.
  • Source/checksum alignment, local source hashes, bash -n, and makepkg --printsrcinfo checks pass for both recipes.
  • Kernel checkpatch.pl: zero errors and zero warnings; git diff --check passes.

Reproduce the policy tests

The regression harness and run instructions are included in this PR. After preparing a kernel source tree with this patch applied, run from the repository root:

python3 tests/edp-dsc.py /path/to/prepared/linux-7.2.5

The runner extracts the actual policy function, compiles it with stubbed hardware helpers, and runs ten named cases. A negative control checks that reset-only rollback fails specifically at the late-dotclock compression_enabled_on_link assertion. Both prepared base and BORE display sources pass these checks. The script does not modify the source tree or install anything.

Attribution and packaging

Adapted from Ruslan Shevchenko’s original eDP DSC patch. The DSC preference and requested-depth restoration come from that work. My subsequent changes complete failure-state restoration, adapt the patch to Omarchy, shorten comments, and integrate the package recipes.

The original authorship, sign-off, copyright, and MIT license text are retained. The original sign-off does not imply approval of these adaptations.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant