Skip to content

backend-drm: Avoid providing a divisor of zero

Marius Vlad requested to merge mvlad/weston:wip/mvlad/div-by-zero into main

The value of max brightness could be zero which would result in divizion by zero. In case happens, or we get into negative values assume the maximum value of 255 to get a value between the specified range of 0-255.

Fixes: #878 (closed) Signed-off-by: Marius Vlad marius.vlad@collabora.com

Merge request reports