1. Mastering display metadata
output_enable_hdr() filled only .primaries and .transfer_function of
wlr_output_image_description; the other four fields stayed zero, so the panel
received an HDR infoframe with 0.0 primaries and zero luminance in the mastering
block. wlroots does not expose the EDID luminances, so the values come from the
monitorrule: hdr_min_lum, hdr_max_lum (also sent as max_cll) and hdr_max_avg_lum
(max_fall). Unset keys leave the fields at zero, so existing configs are
unaffected.
hdr_force enables HDR when the EDID does not advertise BT.2020/PQ, for panels
that declare it only inside a DisplayID 2.0 extension. It skips the two
EDID-derived checks only; the output_color_transform check stays.
2. togglehdr[,on|off|toggle][,<monitor name>|all]
Runtime equivalent of sway's `output <name> hdr on|off|toggle`. HDR could only
be set from monitorrule, so changing it required a config reload that also
re-applies mode, scale, position and transform on every output. With `all`,
toggle takes one decision for every output instead of flipping each against its
own state. Outputs that cannot do HDR are skipped before any state is mutated.
3. Damage the whole output when the image description changes
wlroots damages the whole output for a geometry, transform, scale or rendered
gamma LUT change, but not for an image description change, which also changes
how every pixel is encoded. Anything left undamaged kept the luminance mapping
it had when last drawn, leaving rectangles at the wrong brightness on a static
screen. Filling the damage ring is enough and uses only public API.
Tested on wlroots 0.20.2 with the Vulkan renderer, on two panels: mastering
616/616/400 and 417/417/417, each from its own EDID, where both were 0/0/0
before.