-
Notifications
You must be signed in to change notification settings - Fork 33
getprop_or_none acts as getprop #50
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
Comments
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. |
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? |
I'm encountering the same issue even with the latest DTC, are there any workarounds? |
the latest DTC does solve the problem for me |
I installed pylibfdt and libfdt from the dtc main / master branches but both times it says Maybe it didn't install libfdt correctly, I'll try again to see if the log gives more information Edit: Cherry-picking only the specific commit onto the 1.7.2 branch worked :) |
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
The text was updated successfully, but these errors were encountered: