Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion panel.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,11 @@ def __init__(self, name: str, fdt: Fdt2, node: int) -> None:
self.traffic_mode = TrafficMode.parse(fdt.getprop(node, 'qcom,mdss-dsi-traffic-mode'))

backlight = fdt.getprop_or_none(node, 'qcom,mdss-dsi-bl-pmic-control-type')
self.backlight = BacklightControl(backlight.as_str()) if backlight else None
# FIXME https://android.googlesource.com/kernel/msm/+/52edb91eb65ab5e84fd98061057d3ffa2074ffc1
backlight_str = backlight.as_str()
if backlight_str == "bl_ctrl_dcs_l":
backlight_str = "bl_ctrl_dcs"
self.backlight = BacklightControl(backlight_str) if backlight else None
self.max_brightness = fdt.getprop_uint32(node, 'qcom,mdss-dsi-bl-max-level', None)
if self.backlight == BacklightControl.DCS and self.max_brightness is None:
print("WARNING: DCS backlight without maximum brightness, ignoring...")
Expand Down