Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

panel: support bl_ctrl_dcs_l backlight type #31

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
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