Skip to content

Commit 254aff0

Browse files
committed
panel: Parse qcom,dsi-display-list for even newer SoCs like SM8150
There is another indirection there, probably to support multiple panels (i.e. a primary and a secondary one) or something. Meh. Also make sure we don't parse panels twice by putting them in a set first. Fixes #3
1 parent bbbb274 commit 254aff0

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

panel.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -283,9 +283,19 @@ def find(fdt: Fdt2) -> Iterator[Panel]:
283283

284284
# Newer device trees do not necessarily have panels below MDP,
285285
# search for qcom,dsi-display node instead
286+
panel_phandles = set()
287+
286288
for display in fdt.find_by_compatible('qcom,dsi-display'):
287-
# Actual display node is pointed to by qcom,dsi-panel
288-
phandle = fdt.getprop(display, 'qcom,dsi-panel').as_uint32()
289+
# On even newer SoCs there is another node with qcom,dsi-display-list
290+
displays = fdt.getprop_or_none(display, 'qcom,dsi-display-list')
291+
if displays is None:
292+
panel_phandles.add(fdt.getprop(display, 'qcom,dsi-panel').as_uint32())
293+
else:
294+
for display_phandle in displays.as_uint32_array():
295+
display = fdt.node_offset_by_phandle(display_phandle)
296+
panel_phandles.add(fdt.getprop(display, 'qcom,dsi-panel').as_uint32())
297+
298+
for phandle in panel_phandles:
289299
offset = fdt.node_offset_by_phandle(phandle)
290300
panel = Panel.parse(fdt, offset)
291301
if panel:

0 commit comments

Comments
 (0)