Skip to content

Conversation

@my4ng
Copy link
Contributor

@my4ng my4ng commented Dec 31, 2025

This adds per output bits per colour (BPC) config as requested in #1533.

output "DP-1" {
    ...
    bpc 10
}

Supported values are 8, 10. If not explicitly set, niri will not change the existing max bpc connector property.

@YaLTeR
Copy link
Owner

YaLTeR commented Dec 31, 2025

Do we want to do this? Over just listing all formats always?

@my4ng
Copy link
Contributor Author

my4ng commented Dec 31, 2025

I think this will mitigate the bandwidth issue you mentioned by limiting the max bpc (for some monitors), and also any potential driver/display issue where they advertise more than what they support. One change I will make is to set the default based on the "max dpc" that is reported from DRM. Nevertheless, I don't see any disadvantage for finer-grain control as done in the case of KWin and Mutter.

@YaLTeR
Copy link
Owner

YaLTeR commented Dec 31, 2025

I'm not sure if there is a bandwidth issue, just hypothesizing. If possible I'm for no config.

One change I will make is to set the default based on the "max dpc" that is reported from DRM.

max bpc is something the compositor can change though?

as done in the case of KWin and Mutter.

What do they do?

@my4ng
Copy link
Contributor Author

my4ng commented Dec 31, 2025

max bpc is something the compositor can change though?

Sorry I meant from EDID. Though it might be easier to use the DRM set default if no bpc is give.

From Mutter:

Useful for lowering bandwidth requirements on systems that can't maintain a stable signal. Or for increasing the displayed colour depth on kernel drivers that default to too low (allegedly amdgpu has done this in the past).

Though I think we also need to also set the max bpc property too along side the color format changes.

@my4ng
Copy link
Contributor Author

my4ng commented Dec 31, 2025

A few changes:

  1. COLOR_FORMATS_10 now used by default (unless bpc 8 explicitly set) Unified COLOR_FORMATS with 10 bpc then 8 bpc formats used.
  2. Readd set_max_bpc called on device init/session resume only when bpc explicitly set

EDIT: It means that by default, without any config, niri will use 10 bpc when possible default driver set (or potentially other compositor set) max bpc.

@my4ng
Copy link
Contributor Author

my4ng commented Jan 8, 2026

@YaLTeR should be ready for review 👍

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.

2 participants