OLED brightness in Linux
Recently I've got a new laptop with OLED panel only to find out that brightness control for OLED panels is not yet supported in Linux. Archlinux wiki page mentions using gamma ramp for controlling perceived brightness using hackish userspace tools (icc-brightness), so my first thought was to implement a hack for i915 driver to expose backlight interface that actually adjusts gamma ramp. So I went to #dri-devel to ask around whether this idea sounds too crazy and it turned out that there are better ways than using gamma ramp. Basically if you use gamma ramp you essentially reduce dynamic range, i.e. if you have 8 bits per pixel at 50% brightness you would get 7 bit, at 25% - 6 bit and that will result in banding artefacts at low brightness levels. To overcome that issue OLED panels actually have an interface to control brightness. There are at least 2 competing "standards" - VESA and Intel proprietary. First one is already supported by i915 driver while latter is not. Unfo