OpenBSD cvs log

created 2022-07-10T00:01:26Z
begin 2022-07-08T00:00:00Z
end 2022-07-09T00:00:00Z
path src/sys
commits 1

date 2022-07-08T21:29:20Z
author miod
files src/sys/dev/wscons/wsdisplay.c log diff annotate
message Display parameters exposed to userland as percentages (backlight, brightness,
contrast) are not valid if they only have one state, i.e. minimum and maximum
values being equal.

Do not expose them to userland in this case, for wsconsctl would attempt to
divide by zero (which is known to have unwelcome consequences).

This allows display drivers trusting not-so-reliable sources (fdt, bogus
hardware...) to not have to perform those checks themselves.

Found the hard way by daniel@. No firm consensus on this workaround, using
one seniority point here, will revert if this spawns complaints.