msm8916-mainline / linux-mdss-dsi-panel-driver-generator

Generate Linux DRM panel kernel driver based on QCOM MDSS DSI device tree
GNU General Public License v2.0
53 stars 33 forks source link

Support panels under qcom,sde-kms #19

Closed z3ntu closed 1 year ago

z3ntu commented 2 years ago

The structure changed again for new SoCs, like on fairphone-fp4.

Test dtb (zipped because github..): fp4.dtb.zip

stephan-gh commented 2 years ago

I think you should simply add the new "qcom,sde-kms" compatible as another case here:

https://github.com/msm8916-mainline/linux-mdss-dsi-panel-driver-generator/blob/1b91d259909af4958f451407885a531f5be1981b/panel.py#L311-L315

All the panels seem to be below that.

z3ntu commented 2 years ago

You mean like this?

diff --git a/panel.py b/panel.py
index 8aa2078..ee6d18a 100644
--- a/panel.py
+++ b/panel.py
@@ -314,6 +314,12 @@ def find(fdt: Fdt2) -> Iterator[Panel]:
                if panel:
                    yield panel

+       for mdp in fdt.find_by_compatible('qcom,sde-kms'):
+           for sub in fdt.subnodes(mdp):
+               panel = Panel.parse(fdt, sub)
+               if panel:
+                   yield panel
+
        # Newer device trees do not necessarily have panels below MDP,
        # search for qcom,dsi-display node instead
        panel_phandles = set()

That still goes into the qcom,dsi-panel code. Log:

``` Parsing: /home/luca/work/fp4/fp4.dtb Parsing: r66451_fhd_plus_120hz_cmd (r66451 amoled cmd mode dsi visionox 120HZ panel with DSC) WARNING: Multiple display timings are not supported yet, using first! Generating: r66451_fhd_plus_120hz_cmd (r66451 amoled cmd mode dsi visionox 120HZ panel with DSC) Parsing: r66451_fhd_plus_120hz_video (r66451 amoled video mode dsi visionox 120HZ panel with DSC) Generating: r66451_fhd_plus_120hz_video (r66451 amoled video mode dsi visionox 120HZ panel with DSC) Parsing: r66451_fhd_plus_144hz_cmd (r66451 amoled cmd mode dsi visionox panel with DSC) Generating: r66451_fhd_plus_144hz_cmd (r66451 amoled cmd mode dsi visionox panel with DSC) Parsing: sim_cmd (Simulator cmd mode dsi panel) WARNING: Multiple display timings are not supported yet, using first! Generating: sim_cmd (Simulator cmd mode dsi panel) Parsing: sharp_qsync_fhd_cmd (Sharp fhd cmd mode qsync dsi panel) WARNING: Multiple display timings are not supported yet, using first! Generating: sharp_qsync_fhd_cmd (Sharp fhd cmd mode qsync dsi panel) WARNING: DCS command SET_TEAR_SCANLINE with incorrect argument count (expected: 2, is: 1). Consider using --dumb-dcs WARNING: DCS command SET_SCROLL_AREA with incorrect argument count (expected: 6, is: 1). Consider using --dumb-dcs WARNING: DCS command SET_TEAR_OFF with incorrect argument count (expected: 0, is: 1). Consider using --dumb-dcs Parsing: r66451_fhd_plus_90hz_video (r66451 amoled video mode dsi visionox 90HZ panel with DSC) Generating: r66451_fhd_plus_90hz_video (r66451 amoled video mode dsi visionox 90HZ panel with DSC) Parsing: ft8716u_1080p_video (ft8716u 1080p video mode dsi panel) Generating: ft8716u_1080p_video (ft8716u 1080p video mode dsi panel) Parsing: sim_video (Simulator video mode dsi panel) WARNING: DCS backlight without maximum brightness, ignoring... Generating: sim_video (Simulator video mode dsi panel) Parsing: rm69299_visionox_amoled_video (rm69299 amoled fhd+ video mode dsi visionox panel) Generating: rm69299_visionox_amoled_video (rm69299 amoled fhd+ video mode dsi visionox panel) Parsing: r66451_fhd_plus_60hz_video (r66451 amoled video mode dsi visionox 60HZ panel with DSC) Generating: r66451_fhd_plus_60hz_video (r66451 amoled video mode dsi visionox 60HZ panel with DSC) Parsing: r66451_fhd_plus_60hz_cmd (r66451 amoled cmd mode dsi visionox 60HZ panel with DSC) Generating: r66451_fhd_plus_60hz_cmd (r66451 amoled cmd mode dsi visionox 60HZ panel with DSC) Parsing: sharp_qsync_fhd_video (Sharp fhd video mode qsync dsi panel) WARNING: Multiple display timings are not supported yet, using first! Generating: sharp_qsync_fhd_video (Sharp fhd video mode qsync dsi panel) WARNING: DCS command SET_TEAR_SCANLINE with incorrect argument count (expected: 2, is: 1). Consider using --dumb-dcs WARNING: DCS command SET_SCROLL_AREA with incorrect argument count (expected: 6, is: 1). Consider using --dumb-dcs WARNING: DCS command SET_TEAR_OFF with incorrect argument count (expected: 0, is: 1). Consider using --dumb-dcs Parsing: r66451_fhd_plus_90hz_cmd (r66451 amoled cmd mode dsi visionox 90HZ panel with DSC) Generating: r66451_fhd_plus_90hz_cmd (r66451 amoled cmd mode dsi visionox 90HZ panel with DSC) Parsing: rm69299_visionox_amoled_cmd (rm69299 amoled fhd+ cmd mode dsi visionox panel) Generating: rm69299_visionox_amoled_cmd (rm69299 amoled fhd+ cmd mode dsi visionox panel) Parsing: hx83112a_auo_1080p_video (hx83112a auo 1080p video mode dsi panel) Generating: hx83112a_auo_1080p_video (hx83112a auo 1080p video mode dsi panel) ERROR: Failed to get property: qcom,dsi-panel Traceback (most recent call last): File "/home/luca/tools/linux-mdss-dsi-panel-driver-generator/./lmdpdg.py", line 75, in for panel in Panel.find(fdt): File "/home/luca/tools/linux-mdss-dsi-panel-driver-generator/panel.py", line 331, in find panel_phandles.add(fdt.getprop(display, 'qcom,dsi-panel').as_uint32()) File "/home/luca/tools/linux-mdss-dsi-panel-driver-generator/fdt2.py", line 32, in getprop return super().getprop(nodeoffset, prop_name, quiet) File "/usr/lib/python3.10/site-packages/libfdt.py", line 451, in getprop pdata = check_err_null(fdt_getprop(self._fdt, nodeoffset, prop_name), File "/usr/lib/python3.10/site-packages/libfdt.py", line 156, in check_err_null raise FdtException(val) libfdt.FdtException: pylibfdt error -1: FDT_ERR_NOTFOUND ```
stephan-gh commented 2 years ago

Should probably add a check if qcom,dsi-panel exists, then? :)

z3ntu commented 1 year ago

@stephan-gh Updated, thanks for the reminder!

z3ntu commented 1 year ago

Full log with fp4.dtb:

``` Parsing: /home/luca/work/fp4/fp4.dtb Parsing: r66451_fhd_plus_120hz_cmd (r66451 amoled cmd mode dsi visionox 120HZ panel with DSC) WARNING: Multiple display timings are not supported yet, using first! Generating: r66451_fhd_plus_120hz_cmd (r66451 amoled cmd mode dsi visionox 120HZ panel with DSC) Parsing: r66451_fhd_plus_120hz_video (r66451 amoled video mode dsi visionox 120HZ panel with DSC) Generating: r66451_fhd_plus_120hz_video (r66451 amoled video mode dsi visionox 120HZ panel with DSC) Parsing: r66451_fhd_plus_144hz_cmd (r66451 amoled cmd mode dsi visionox panel with DSC) Generating: r66451_fhd_plus_144hz_cmd (r66451 amoled cmd mode dsi visionox panel with DSC) Parsing: sim_cmd (Simulator cmd mode dsi panel) WARNING: Multiple display timings are not supported yet, using first! Generating: sim_cmd (Simulator cmd mode dsi panel) Parsing: sharp_qsync_fhd_cmd (Sharp fhd cmd mode qsync dsi panel) WARNING: Multiple display timings are not supported yet, using first! Generating: sharp_qsync_fhd_cmd (Sharp fhd cmd mode qsync dsi panel) WARNING: DCS command SET_TEAR_SCANLINE with incorrect argument count (expected: 2, is: 1). Consider using --dumb-dcs WARNING: DCS command SET_SCROLL_AREA with incorrect argument count (expected: 6, is: 1). Consider using --dumb-dcs WARNING: DCS command SET_TEAR_OFF with incorrect argument count (expected: 0, is: 1). Consider using --dumb-dcs Parsing: r66451_fhd_plus_90hz_video (r66451 amoled video mode dsi visionox 90HZ panel with DSC) Generating: r66451_fhd_plus_90hz_video (r66451 amoled video mode dsi visionox 90HZ panel with DSC) Parsing: ft8716u_1080p_video (ft8716u 1080p video mode dsi panel) Generating: ft8716u_1080p_video (ft8716u 1080p video mode dsi panel) Parsing: sim_video (Simulator video mode dsi panel) WARNING: DCS backlight without maximum brightness, ignoring... Generating: sim_video (Simulator video mode dsi panel) Parsing: rm69299_visionox_amoled_video (rm69299 amoled fhd+ video mode dsi visionox panel) Generating: rm69299_visionox_amoled_video (rm69299 amoled fhd+ video mode dsi visionox panel) Parsing: r66451_fhd_plus_60hz_video (r66451 amoled video mode dsi visionox 60HZ panel with DSC) Generating: r66451_fhd_plus_60hz_video (r66451 amoled video mode dsi visionox 60HZ panel with DSC) Parsing: r66451_fhd_plus_60hz_cmd (r66451 amoled cmd mode dsi visionox 60HZ panel with DSC) Generating: r66451_fhd_plus_60hz_cmd (r66451 amoled cmd mode dsi visionox 60HZ panel with DSC) Parsing: sharp_qsync_fhd_video (Sharp fhd video mode qsync dsi panel) WARNING: Multiple display timings are not supported yet, using first! Generating: sharp_qsync_fhd_video (Sharp fhd video mode qsync dsi panel) WARNING: DCS command SET_TEAR_SCANLINE with incorrect argument count (expected: 2, is: 1). Consider using --dumb-dcs WARNING: DCS command SET_SCROLL_AREA with incorrect argument count (expected: 6, is: 1). Consider using --dumb-dcs WARNING: DCS command SET_TEAR_OFF with incorrect argument count (expected: 0, is: 1). Consider using --dumb-dcs Parsing: r66451_fhd_plus_90hz_cmd (r66451 amoled cmd mode dsi visionox 90HZ panel with DSC) Generating: r66451_fhd_plus_90hz_cmd (r66451 amoled cmd mode dsi visionox 90HZ panel with DSC) Parsing: rm69299_visionox_amoled_cmd (rm69299 amoled fhd+ cmd mode dsi visionox panel) Generating: rm69299_visionox_amoled_cmd (rm69299 amoled fhd+ cmd mode dsi visionox panel) Parsing: hx83112a_auo_1080p_video (hx83112a auo 1080p video mode dsi panel) Generating: hx83112a_auo_1080p_video (hx83112a auo 1080p video mode dsi panel) ```
99degree commented 1 year ago

thumb-up!

just to update status, there is some other error found as below: ~/source/linux-mdss-dsi-panel-driver-generator# ./lmdpdg.py ../dts/lisa_fdt_dump.dtb Parsing: ../dts/lisa_fdt_dump.dtb Parsing: nt36672e_fhd_plus_144_video (nt36672e fhd plus 144Hz video panel) Generating: nt36672e_fhd_plus_144_video (nt36672e fhd plus 144Hz video panel) Parsing: nt36672e_fhd_plus_120_video (nt36672e fhd plus 120Hz Video panel) Generating: nt36672e_fhd_plus_120_video (nt36672e fhd plus 120Hz Video panel) WARNING: DCS command SOFT_RESET with incorrect argument count (expected: 0, is: 1). Consider using --dumb-dcs WARNING: DCS command SOFT_RESET with incorrect argument count (expected: 0, is: 1). Consider using --dumb-dcs WARNING: DCS command EXIT_SLEEP_MODE with incorrect argument count (expected: 0, is: 1). Consider using --dumb-dcs WARNING: DCS command ENTER_PARTIAL_MODE with incorrect argument count (expected: 0, is: 1). Consider using --dumb-dcs WARNING: DCS command ENTER_NORMAL_MODE with incorrect argument count (expected: 0, is: 1). Consider using --dumb-dcs WARNING: DCS command EXIT_INVERT_MODE with incorrect argument count (expected: 0, is: 1). Consider using --dumb-dcs WARNING: DCS command ENTER_INVERT_MODE with incorrect argument count (expected: 0, is: 1). Consider using --dumb-dcs WARNING: DCS command SET_DISPLAY_ON with incorrect argument count (expected: 0, is: 1). Consider using --dumb-dcs WARNING: DCS command SET_COLUMN_ADDRESS with incorrect argument count (expected: 4, is: 1). Consider using --dumb-dcs WARNING: DCS command SET_PAGE_ADDRESS with incorrect argument count (expected: 4, is: 1). Consider using --dumb-dcs WARNING: DCS command SET_TEAR_OFF with incorrect argument count (expected: 0, is: 1). Consider using --dumb-dcs WARNING: DCS command SET_TEAR_ON with invalid arguments b'\x1f': 31 is not a valid TearMode Consider using --dumb-dcs WARNING: DCS command ENTER_INVERT_MODE with incorrect argument count (expected: 0, is: 1). Consider using --dumb-dcs WARNING: DCS command SOFT_RESET with incorrect argument count (expected: 0, is: 1). Consider using --dumb-dcs WARNING: DCS command EXIT_INVERT_MODE with incorrect argument count (expected: 0, is: 1). Consider using --dumb-dcs WARNING: DCS command ENTER_INVERT_MODE with incorrect argument count (expected: 0, is: 1). Consider using --dumb-dcs WARNING: DCS command NOP with incorrect argument count (expected: 0, is: 1). Consider using --dumb-dcs WARNING: DCS command EXIT_SLEEP_MODE with incorrect argument count (expected: 0, is: 1). Consider using --dumb-dcs WARNING: DCS command EXIT_INVERT_MODE with incorrect argument count (expected: 0, is: 1). Consider using --dumb-dcs WARNING: DCS command SET_DISPLAY_OFF with incorrect argument count (expected: 0, is: 1). Consider using --dumb-dcs WARNING: DCS command SET_DISPLAY_ON with incorrect argument count (expected: 0, is: 1). Consider using --dumb-dcs WARNING: DCS command SET_COLUMN_ADDRESS with incorrect argument count (expected: 4, is: 1). Consider using --dumb-dcs WARNING: DCS command SET_SCROLL_AREA with incorrect argument count (expected: 6, is: 1). Consider using --dumb-dcs WARNING: DCS command SET_TEAR_OFF with incorrect argument count (expected: 0, is: 1). Consider using --dumb-dcs WARNING: DCS command SET_TEAR_ON with invalid arguments b'@': 64 is not a valid TearMode Consider using --dumb-dcs WARNING: DCS command SET_SCROLL_START with incorrect argument count (expected: 2, is: 1). Consider using --dumb-dcs WARNING: DCS command EXIT_IDLE_MODE with incorrect argument count (expected: 0, is: 1). Consider using --dumb-dcs WARNING: DCS command ENTER_IDLE_MODE with incorrect argument count (expected: 0, is: 1). Consider using --dumb-dcs Parsing: nt36672e_fhd_plus_90hz_video (nt36672e 90Hz fhd plus video mode panel with DSC) Generating: nt36672e_fhd_plus_90hz_video (nt36672e 90Hz fhd plus video mode panel with DSC) WARNING: DCS command SOFT_RESET with incorrect argument count (expected: 0, is: 1). Consider using --dumb-dcs WARNING: DCS command SOFT_RESET with incorrect argument count (expected: 0, is: 1). Consider using --dumb-dcs WARNING: DCS command EXIT_SLEEP_MODE with incorrect argument count (expected: 0, is: 1). Consider using --dumb-dcs WARNING: DCS command ENTER_PARTIAL_MODE with incorrect argument count (expected: 0, is: 1). Consider using --dumb-dcs WARNING: DCS command ENTER_NORMAL_MODE with incorrect argument count (expected: 0, is: 1). Consider using --dumb-dcs WARNING: DCS command EXIT_INVERT_MODE with incorrect argument count (expected: 0, is: 1). Consider using --dumb-dcs WARNING: DCS command ENTER_INVERT_MODE with incorrect argument count (expected: 0, is: 1). Consider using --dumb-dcs WARNING: DCS command SET_DISPLAY_ON with incorrect argument count (expected: 0, is: 1). Consider using --dumb-dcs WARNING: DCS command SET_COLUMN_ADDRESS with incorrect argument count (expected: 4, is: 1). Consider using --dumb-dcs WARNING: DCS command SET_PAGE_ADDRESS with incorrect argument count (expected: 4, is: 1). Consider using --dumb-dcs WARNING: DCS command SET_TEAR_OFF with incorrect argument count (expected: 0, is: 1). Consider using --dumb-dcs WARNING: DCS command SET_TEAR_ON with invalid arguments b'\x1f': 31 is not a valid TearMode Consider using --dumb-dcs WARNING: DCS command ENTER_INVERT_MODE with incorrect argument count (expected: 0, is: 1). Consider using --dumb-dcs WARNING: DCS command SOFT_RESET with incorrect argument count (expected: 0, is: 1). Consider using --dumb-dcs WARNING: DCS command EXIT_INVERT_MODE with incorrect argument count (expected: 0, is: 1). Consider using --dumb-dcs WARNING: DCS command ENTER_INVERT_MODE with incorrect argument count (expected: 0, is: 1). Consider using --dumb-dcs WARNING: DCS command NOP with incorrect argument count (expected: 0, is: 1). Consider using --dumb-dcs WARNING: DCS command EXIT_SLEEP_MODE with incorrect argument count (expected: 0, is: 1). Consider using --dumb-dcs WARNING: DCS command EXIT_INVERT_MODE with incorrect argument count (expected: 0, is: 1). Consider using --dumb-dcs WARNING: DCS command SET_DISPLAY_OFF with incorrect argument count (expected: 0, is: 1). Consider using --dumb-dcs WARNING: DCS command SET_DISPLAY_ON with incorrect argument count (expected: 0, is: 1). Consider using --dumb-dcs WARNING: DCS command SET_COLUMN_ADDRESS with incorrect argument count (expected: 4, is: 1). Consider using --dumb-dcs WARNING: DCS command SET_SCROLL_AREA with incorrect argument count (expected: 6, is: 1). Consider using --dumb-dcs WARNING: DCS command SET_TEAR_OFF with incorrect argument count (expected: 0, is: 1). Consider using --dumb-dcs WARNING: DCS command SET_TEAR_ON with invalid arguments b'2': 50 is not a valid TearMode Consider using --dumb-dcs WARNING: DCS command SET_SCROLL_START with incorrect argument count (expected: 2, is: 1). Consider using --dumb-dcs WARNING: DCS command EXIT_IDLE_MODE with incorrect argument count (expected: 0, is: 1). Consider using --dumb-dcs WARNING: DCS command ENTER_IDLE_MODE with incorrect argument count (expected: 0, is: 1). Consider using --dumb-dcs WARNING: DCS command NOP with incorrect argument count (expected: 0, is: 1). Consider using --dumb-dcs WARNING: DCS command SOFT_RESET with incorrect argument count (expected: 0, is: 1). Consider using --dumb-dcs WARNING: DCS command SET_COLUMN_ADDRESS with incorrect argument count (expected: 4, is: 1). Consider using --dumb-dcs WARNING: DCS command SET_TEAR_ON with invalid arguments b'\x82': 130 is not a valid TearMode Consider using --dumb-dcs WARNING: DCS command SET_SCROLL_AREA with incorrect argument count (expected: 6, is: 1). Consider using --dumb-dcs Parsing: nt36672e_fhd_plus_60_video (nt36672e 60 Hz fhd plus video mode panel without DSC) ERROR: Failed to get property: qcom,mdss-dsi-off-command-state Traceback (most recent call last): File "./lmdpdg.py", line 77, in panel = Panel.parse(fdt, offset) File "/root/source/linux-mdss-dsi-panel-driver-generator/panel.py", line 317, in parse return name and Panel(name.as_str(), fdt, node) File "/root/source/linux-mdss-dsi-panel-driver-generator/panel.py", line 269, in init 'off': CommandSequence(fdt, mode_node, 'off') File "/root/source/linux-mdss-dsi-panel-driver-generator/panel.py", line 139, in init self.state = CommandSequence.State(fdt.getprop(node, f'qcom,mdss-dsi-{cmd}-command-state').as_str()) File "/root/source/linux-mdss-dsi-panel-driver-generator/fdt2.py", line 32, in getprop return super().getprop(nodeoffset, prop_name, quiet) File "/usr/local/lib/python3.8/dist-packages/libfdt.py", line 451, in getprop pdata = check_err_null(fdt_getprop(self._fdt, nodeoffset, prop_name), File "/usr/local/lib/python3.8/dist-packages/libfdt.py", line 156, in check_err_null raise FdtException(val) libfdt.FdtException: pylibfdt error -1: FDT_ERR_NOTFOUND Parsing: nt36672e_fhd_plus_cphy_144hz_video (nt36672e 144Hz fhd plus video mode cphy panel with DSC) Generating: nt36672e_fhd_plus_cphy_144hz_video (nt36672e 144Hz fhd plus video mode cphy panel with DSC) WARNING: DCS command SOFT_RESET with incorrect argument count (expected: 0, is: 1). Consider using --dumb-dcs WARNING: DCS command SOFT_RESET with incorrect argument count (expected: 0, is: 1). Consider using --dumb-dcs WARNING: DCS command EXIT_SLEEP_MODE with incorrect argument count (expected: 0, is: 1). Consider using --dumb-dcs WARNING: DCS command ENTER_PARTIAL_MODE with incorrect argument count (expected: 0, is: 1). Consider using --dumb-dcs WARNING: DCS command ENTER_NORMAL_MODE with incorrect argument count (expected: 0, is: 1). Consider using --dumb-dcs WARNING: DCS command EXIT_INVERT_MODE with incorrect argument count (expected: 0, is: 1). Consider using --dumb-dcs WARNING: DCS command ENTER_INVERT_MODE with incorrect argument count (expected: 0, is: 1). Consider using --dumb-dcs WARNING: DCS command SET_DISPLAY_ON with incorrect argument count (expected: 0, is: 1). Consider using --dumb-dcs WARNING: DCS command SET_COLUMN_ADDRESS with incorrect argument count (expected: 4, is: 1). Consider using --dumb-dcs WARNING: DCS command SET_PAGE_ADDRESS with incorrect argument count (expected: 4, is: 1). Consider using --dumb-dcs WARNING: DCS command SET_TEAR_OFF with incorrect argument count (expected: 0, is: 1). Consider using --dumb-dcs WARNING: DCS command SET_TEAR_ON with invalid arguments b'\x1f': 31 is not a valid TearMode Consider using --dumb-dcs WARNING: DCS command ENTER_INVERT_MODE with incorrect argument count (expected: 0, is: 1). Consider using --dumb-dcs WARNING: DCS command SOFT_RESET with incorrect argument count (expected: 0, is: 1). Consider using --dumb-dcs WARNING: DCS command EXIT_INVERT_MODE with incorrect argument count (expected: 0, is: 1). Consider using --dumb-dcs WARNING: DCS command ENTER_INVERT_MODE with incorrect argument count (expected: 0, is: 1). Consider using --dumb-dcs WARNING: DCS command NOP with incorrect argument count (expected: 0, is: 1). Consider using --dumb-dcs WARNING: DCS command EXIT_SLEEP_MODE with incorrect argument count (expected: 0, is: 1). Consider using --dumb-dcs WARNING: DCS command EXIT_INVERT_MODE with incorrect argument count (expected: 0, is: 1). Consider using --dumb-dcs WARNING: DCS command SET_DISPLAY_OFF with incorrect argument count (expected: 0, is: 1). Consider using --dumb-dcs WARNING: DCS command SET_DISPLAY_ON with incorrect argument count (expected: 0, is: 1). Consider using --dumb-dcs WARNING: DCS command SET_COLUMN_ADDRESS with incorrect argument count (expected: 4, is: 1). Consider using --dumb-dcs WARNING: DCS command SET_PAGE_ADDRESS with incorrect argument count (expected: 4, is: 1). Consider using --dumb-dcs WARNING: DCS command SET_SCROLL_AREA with incorrect argument count (expected: 6, is: 1). Consider using --dumb-dcs WARNING: DCS command SET_TEAR_OFF with incorrect argument count (expected: 0, is: 1). Consider using --dumb-dcs WARNING: DCS command SET_TEAR_ON with invalid arguments b',': 44 is not a valid TearMode Consider using --dumb-dcs WARNING: DCS command SET_SCROLL_START with incorrect argument count (expected: 2, is: 1). Consider using --dumb-dcs WARNING: DCS command EXIT_IDLE_MODE with incorrect argument count (expected: 0, is: 1). Consider using --dumb-dcs WARNING: DCS command ENTER_IDLE_MODE with incorrect argument count (expected: 0, is: 1). Consider using --dumb-dcs WARNING: DCS command NOP with incorrect argument count (expected: 0, is: 1). Consider using --dumb-dcs WARNING: DCS command SOFT_RESET with incorrect argument count (expected: 0, is: 1). Consider using --dumb-dcs WARNING: DCS command SET_COLUMN_ADDRESS with incorrect argument count (expected: 4, is: 1). Consider using --dumb-dcs WARNING: DCS command SET_TEAR_ON with invalid arguments b'\x82': 130 is not a valid TearMode Consider using --dumb-dcs Parsing: r66451_fhd_plus_60hz_cphy_cmd (r66451 amoled cmd mode dsi visionox panel with DSC) Generating: r66451_fhd_plus_60hz_cphy_cmd (r66451 amoled cmd mode dsi visionox panel with DSC) Parsing: r66451_fhd_plus_90hz_cphy_cmd (r66451 amoled cmd mode dsi visionox panel with DSC) Generating: r66451_fhd_plus_90hz_cphy_cmd (r66451 amoled cmd mode dsi visionox panel with DSC) Parsing: r66451_fhd_plus_120hz_cphy_cmd (r66451 amoled cmd mode dsi visionox panel with DSC) WARNING: Multiple display timings are not supported yet, using first! Generating: r66451_fhd_plus_120hz_cphy_cmd (r66451 amoled cmd mode dsi visionox panel with DSC) Parsing: r66451_fhd_plus_cphy_120hz_vid (r66451 amoled video mode dsi visionox panel with DSC) Generating: r66451_fhd_plus_cphy_120hz_vid (r66451 amoled video mode dsi visionox panel with DSC) Parsing: r66451_fhd_plus_144hz_cphy_cmd (r66451 amoled cmd mode dsi visionox panel with DSC) WARNING: Multiple display timings are not supported yet, using first! Generating: r66451_fhd_plus_144hz_cphy_cmd (r66451 amoled cmd mode dsi visionox panel with DSC) Parsing: r66451_fhd_plus_cphy_144hz_vid (r66451 amoled video mode dsi visionox panel with DSC) Generating: r66451_fhd_plus_cphy_144hz_vid (r66451 amoled video mode dsi visionox panel with DSC) Parsing: prim_sim_video (Primary Simulator video mode dsi panel) WARNING: DCS backlight without maximum brightness, ignoring... Generating: prim_sim_video (Primary Simulator video mode dsi panel) Parsing: sim_video (Simulator video mode dsi panel) WARNING: DCS backlight without maximum brightness, ignoring... Generating: sim_video (Simulator video mode dsi panel) Parsing: k9d_36_02_0a_dsc_cmd (xiaomi 36 02 0a cmd mode dsc dsi panel) WARNING: Multiple display timings are not supported yet, using first! Traceback (most recent call last): File "./lmdpdg.py", line 77, in panel = Panel.parse(fdt, offset) File "/root/source/linux-mdss-dsi-panel-driver-generator/panel.py", line 317, in parse return name and Panel(name.as_str(), fdt, node) File "/root/source/linux-mdss-dsi-panel-driver-generator/panel.py", line 279, in init raise ValueError(f'Unsupported bpp: {self.bpp} (TODO)') ValueError: Unsupported bpp: 30 (TODO) Parsing: k9d_42_0d_0b_dsc_cmd (xiaomi 42 0d 0b cmd mode dsc dsi panel) WARNING: Multiple display timings are not supported yet, using first! Traceback (most recent call last): File "./lmdpdg.py", line 77, in panel = Panel.parse(fdt, offset) File "/root/source/linux-mdss-dsi-panel-driver-generator/panel.py", line 317, in parse return name and Panel(name.as_str(), fdt, node) File "/root/source/linux-mdss-dsi-panel-driver-generator/panel.py", line 279, in init raise ValueError(f'Unsupported bpp: {self.bpp} (TODO)') ValueError: Unsupported bpp: 30 (TODO) Parsing: k9b_42_02_0a_dsc_cmd (xiaomi 42 02 0a cmd mode dsc dsi panel) WARNING: Multiple display timings are not supported yet, using first! Traceback (most recent call last): File "./lmdpdg.py", line 77, in panel = Panel.parse(fdt, offset) File "/root/source/linux-mdss-dsi-panel-driver-generator/panel.py", line 317, in parse return name and Panel(name.as_str(), fdt, node) File "/root/source/linux-mdss-dsi-panel-driver-generator/panel.py", line 279, in init raise ValueError(f'Unsupported bpp: {self.bpp} (TODO)') ValueError: Unsupported bpp: 30 (TODO) Parsing: l9_42_02_0a_dsc_cmd (xiaomi 42 02 0a cmd mode dsc dsi panel) WARNING: Multiple display timings are not supported yet, using first! Traceback (most recent call last): File "./lmdpdg.py", line 77, in panel = Panel.parse(fdt, offset) File "/root/source/linux-mdss-dsi-panel-driver-generator/panel.py", line 317, in parse return name and Panel(name.as_str(), fdt, node) File "/root/source/linux-mdss-dsi-panel-driver-generator/panel.py", line 279, in init raise ValueError(f'Unsupported bpp: {self.bpp} (TODO)') ValueError: Unsupported bpp: 30 (TODO) Parsing: l9b_42_02_0a_dsc_cmd (xiaomi 42 02 0a cmd mode dsc dsi panel) WARNING: Multiple display timings are not supported yet, using first! Traceback (most recent call last): File "./lmdpdg.py", line 77, in panel = Panel.parse(fdt, offset) File "/root/source/linux-mdss-dsi-panel-driver-generator/panel.py", line 317, in parse return name and Panel(name.as_str(), fdt, node) File "/root/source/linux-mdss-dsi-panel-driver-generator/panel.py", line 279, in init raise ValueError(f'Unsupported bpp: {self.bpp} (TODO)') ValueError: Unsupported bpp: 30 (TODO)

stephan-gh commented 1 year ago

@99degree Is the panel you need successfully generated? There are errors only for some of the panels.

99degree commented 1 year ago

most likely not, and is hard to say anything related to this project, instead, its likely 10bpp instead RGB888.

according to the /dev/cmdline, the panel is k9d_36_02_0a, and the driver script complain about bpp=30

Parsing: k9d_36_02_0a_dsc_cmd (xiaomi 36 02 0a cmd mode dsc dsi panel) WARNING: Multiple display timings are not supported yet, using first! Traceback (most recent call last): File "./lmdpdg.py", line 77, in panel = Panel.parse(fdt, offset) File "/root/source/linux-mdss-dsi-panel-driver-generator/panel.py", line 317, in parse return name and Panel(name.as_str(), fdt, node) File "/root/source/linux-mdss-dsi-panel-driver-generator/panel.py", line 279, in init raise ValueError(f'Unsupported bpp: {self.bpp} (TODO)') ValueError: Unsupported bpp: 30 (TODO)

/dev/cmdline is as below:

ramoops_memreserve=4M log_buf_len=256K rcupdate.rcu_expedited=1 rcu_nocbs=0-7 kpti=off console=ttyMSM0,115200n8 androidboot.hardware=qcom androidboot.console=ttyMSM0 androidboot.memcg=1 lpm_levels.sleep_disabled=1 video=vfb:640x400,bpp=32,memsize=3072000 msm_rtb.filter=0x237 service_locator.enable=1 androidboot.usbcontroller=a600000.dwc3 swiotlb=0 loop.max_part=7 cgroup.memory=nokmem,nosocket pcie_ports=compat loop.max_part=7 iptable_raw.raw_before_defrag=1 ip6table_raw.raw_before_defrag=1 buildvariant=user androidboot.verifiedbootstate=orange androidboot.keymaster=1 androidboot.bootdevice=1d84000.ufshc androidboot.fstab_suffix=default androidboot.boot_devices=soc/1d84000.ufshc androidboot.serialno=*** bootinfo.pureason=0x40001 bootinfo.pdreason=0x2 androidboot.hwversion=10.19.0 androidboot.cpuid=0xa7671d67 androidboot.hwc=GL androidboot.hwlevel=MP androidboot.camera.config=n hwid.hwid_value=1638400 hwid.project=10 hwid.build_adc=51366 hwid.project_adc=29 androidboot.hardware.sku=lisa androidboot.product.hardware.sku=lisa androidboot.secureboot=1 androidboot.baseband=msm msm_drm.dsi_display0=qcom,mdss_dsi_k9d_36_02_0a_dsc_cmd:* androidboot.oled_wp=807e7e msm_drm.oled_wp=807e7e androidboot.ufsid=0x1AD androidboot.slot_suffix=_b rootwait ro init=/init androidboot.dtbo_idx=16 androidboot.dtb_idx=7 androidboot.ramdump=disable androidboot.force_normal_boot=1 block2mtd.block2mtd=/dev/block/sda17,2097152 mtdoops.mtddev=0 mtdoops.record_size=2097152 mtdoops.dump_oops=0 printk.always_kmsg_dump=1

stephan-gh commented 1 year ago

Ugh, this will probably require some research if Linux supports this configuration at all. Anyway it seems like this PR is working correctly for the latest (not sure about greatest) SoCs. Thanks @z3ntu for the changes and everyone else for testing. :)