Add quirks:prefer_hdr to fix HDR activation for some clients #12436
+40
−0
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.
Describe your PR, what does it fix/add?
Adds
quirks:prefer_hdr0 - off (default)
1 - always
2 - gamescope only
When this setting is active CM proto sends HDR image description as a preferred one regardless of the monitor settings.
Fixes
render:cm_auto_hdrand whitescreen with forced HDR for some clients.Should fix chromium flickering in fullscreen on some setups.
In most cases changing this setting while a client is running won't affect it right away.
Is there anything you want to mention? (unchecked code, possible bugs, found problems, breaking compatibility, etc.)
Might not use the best way to detect gamescope.
DS with gamescope HDR might produce glitches not related to this PR.
Might cause unneeded SDR -> HDR -> SDR conversion.
If it doesn't help with chromium verify that it is not caused by https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37880 "Restore SDR mode again when the swapchain gets destroyed - At least some drivers, e.g., amdgpu, need a full atomic modeset for switching between SDR and HDR modes."
Is it ready for merging, or does it need work?
Ready