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

getprop_or_none acts as getprop #50

Open
HorizonEmuTeam opened this issue Dec 15, 2024 · 2 comments
Open

getprop_or_none acts as getprop #50

HorizonEmuTeam opened this issue Dec 15, 2024 · 2 comments

Comments

@HorizonEmuTeam
Copy link

I am getting an error because panel.py couldn't find an optional property. Getprop_or_none() is used, but the program returns getprop()'s error and fails. Expected behaviour is getprop_or_none() ignoring the unfound property and just returning nothing.
Log:
Parsing: dsi-panel-oplus-senna-bc-nt37705-1240-2772-dsc-cmd.dtb
Parsing: oplus_senna_bc_nt37705_1240_2772_dsc_cmd (senna ab575 tm nt37705 dsc cmd mode panel)
WARNING: Multiple display timings are not supported yet, using first!
ERROR: Failed to get property: qcom,mdss-dsi-bl-pmic-control-type
Traceback (most recent call last):
File "/home/user/linux-mdss-dsi-panel-driver-generator/lmdpdg.py", line 77, in
panel = Panel.parse(fdt, offset)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/user/linux-mdss-dsi-panel-driver-generator/panel.py", line 334, in parse
return name and Panel(name.as_str(), fdt, node)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/user/linux-mdss-dsi-panel-driver-generator/panel.py", line 233, in init
backlight = fdt.getprop_or_none(node, 'qcom,mdss-dsi-bl-pmic-control-type')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/user/linux-mdss-dsi-panel-driver-generator/fdt2.py", line 38, in getprop_or_none
prop = self.getprop(nodeoffset, prop_name, [FDT_ERR_NOTFOUND])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/user/linux-mdss-dsi-panel-driver-generator/fdt2.py", line 32, in getprop
return super().getprop(nodeoffset, prop_name, quiet)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/user/.local/lib/python3.12/site-packages/libfdt.py", line 454, in getprop
return Property(prop_name, bytearray(pdata[0]))
^^^^^^^^^^^^^^^^^^^
TypeError: cannot convert 'NoneType' object to bytearray
dsi-panel-oplus-senna-bc-nt37705-1240-2772-dsc-cmd.dtb does not contain any usable panel specifications

@HorizonEmuTeam
Copy link
Author

HorizonEmuTeam commented Dec 15, 2024

I am using Python 3.12.3 (main, Nov 6 2024, 18:32:19) and latest current release of linux-mdss-dsi-panel-driver-generator, also pylibfdt from dtc 1.7.2.

@stephan-gh
Copy link
Member

This feels related to https://git.kernel.org/pub/scm/utils/dtc/dtc.git/commit/?id=9a969f3b70b07bbf1c9df44a38d7f8d1d3a6e2a5, can you try if latest pylibfdt (from main branch) fixes it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants