DRM KMS dual pipeline DTS LCD-HDMI..

82 views
Skip to first unread message

Andrea Venturi

unread,
Dec 20, 2017, 7:01:14 AM12/20/17
to linux-sunxi
hello,

i've just checked sunxi-next git kernel tree and i didn't found any DTS for sun7i A20 tablets with LCD+HDMI support.. does anyone knows if there are samples on other trees?

bye

andrea

Andrea Venturi

unread,
Dec 21, 2017, 2:46:50 AM12/21/17
to linux-sunxi
just restricting a bit the scope.

the HDMI DRM setup alone work for me too!

but i fail to make a proper DTS for a panel setup alone on my A20 table. BTW there are few sunXi DRM/panel setup [*]  and i'm borrowing the pretty simple sun5i-a13-q8-tablet.dts:

/ {
        model = "Q8 A13 Tablet";
        compatible = "allwinner,q8-a13", "allwinner,sun5i-a13";

        panel: panel {
                compatible = "urt,umsh-8596md-t", "simple-panel";
                #address-cells = <1>;
                #size-cells = <0>;

                port@0 {
                        reg = <0>;
                        /* TODO: lcd panel uses axp gpio0 as enable pin */
                        backlight = <&backlight>;
                        #address-cells = <1>;
                        #size-cells = <0>;

                        panel_input: endpoint@0 {
                                reg = <0>;
                                remote-endpoint = <&tcon0_out_lcd>;
                        };
                };
        };
};

&be0 {  
        status = "okay";
};

&tcon0 {
        pinctrl-names = "default";
        pinctrl-0 = <&lcd_rgb666_pins>;
        status = "okay";
};

&tcon0_out {
        tcon0_out_lcd: endpoint@0 {
                reg = <0>;
                remote-endpoint = <&panel_input>;
        };
};

Of course with the due change for my A20 pins and so on.. the DRM kernel spit out these msg:

...
[    0.698731] [drm:sun4i_drv_probe] Adding component /soc@1c00000/lcd-controller@1c0d000
[    0.698767] [drm:sun4i_drv_probe] Adding component /soc@1c00000/lcd-controller@1c0d000
[    0.698799] [drm:sun4i_drv_probe] Adding component /soc@1c00000/lcd-controller@1c0d000
[    0.698831] [drm:sun4i_drv_probe] Adding component /soc@1c00000/lcd-controller@1c0c000
[    0.698858] [drm:sun4i_drv_probe] Endpoint is our panel... skipping
[    0.698877] [drm:sun4i_drv_probe] Adding component /soc@1c00000/lcd-controller@1c0d000
[    0.698909] [drm:sun4i_drv_probe] Adding component /soc@1c00000/lcd-controller@1c0d000
[    0.698941] [drm:sun4i_drv_probe] Adding component /soc@1c00000/lcd-controller@1c0d000
[    0.699440] initcall sun4i_drv_platform_driver_init+0x0/0x28 returned 0 after 1212 usecs
[    0.699452] calling  sun4i_tcon_platform_driver_init+0x0/0x28 @ 1
[    0.700309] [drm:compare_of] Comparing of node /soc@1c00000/lcd-controller@1c0d000 with /soc@1c00000/display-backend@1e60000
[    0.700648] initcall sun4i_tcon_platform_driver_init+0x0/0x28 returned 0 after 1152 usecs
[    0.700659] calling  sun4i_tv_platform_driver_init+0x0/0x28 @ 1
[    0.700803] initcall sun4i_tv_platform_driver_init+0x0/0x28 returned 0 after 126 usecs
[    0.700812] calling  sun6i_drc_platform_driver_init+0x0/0x28 @ 1
[    0.701010] initcall sun6i_drc_platform_driver_init+0x0/0x28 returned 0 after 180 usecs
[    0.701021] calling  sun4i_backend_platform_driver_init+0x0/0x28 @ 1
[    0.701269] [drm:compare_of] Comparing of node /soc@1c00000/lcd-controller@1c0d000 with /soc@1c00000/display-backend@1e60000
[    0.701280] [drm:compare_of] Comparing of node /soc@1c00000/display-backend@1e40000 with /soc@1c00000/display-backend@1e60000
[    0.701358] [drm:compare_of] Comparing of node /soc@1c00000/lcd-controller@1c0d000 with /soc@1c00000/display-backend@1e60000
[    0.701369] [drm:compare_of] Comparing of node /soc@1c00000/display-backend@1e40000 with /soc@1c00000/display-backend@1e60000
[    0.701380] [drm:compare_of] Comparing of node /soc@1c00000/display-backend@1e60000 with /soc@1c00000/display-backend@1e60000
[    0.701390] [drm:compare_of] Comparing of node /soc@1c00000/lcd-controller@1c0d000 with /soc@1c00000/display-backend@1e40000
[    0.701401] [drm:compare_of] Comparing of node /soc@1c00000/display-backend@1e40000 with /soc@1c00000/display-backend@1e40000
[    0.701411] [drm:compare_of] Comparing of node /soc@1c00000/lcd-controller@1c0d000 with /soc@1c00000/display-backend@1e60000
[    0.701422] [drm:compare_of] Comparing of node /soc@1c00000/display-backend@1e40000 with /soc@1c00000/display-backend@1e60000
[    0.701432] [drm:compare_of] Comparing of node /soc@1c00000/display-backend@1e60000 with /soc@1c00000/display-backend@1e60000
[    0.701443] [drm:compare_of] Comparing of node /soc@1c00000/lcd-controller@1c0d000 with /soc@1c00000/display-backend@1e40000
[    0.701453] [drm:compare_of] Comparing of node /soc@1c00000/display-backend@1e40000 with /soc@1c00000/display-backend@1e40000
[    0.701463] [drm:compare_of] Comparing of node /soc@1c00000/lcd-controller@1c0d000 with /soc@1c00000/lcd-controller@1c0c000
[    0.701473] [drm:compare_of] Comparing of node /soc@1c00000/display-backend@1e40000 with /soc@1c00000/lcd-controller@1c0c000
[    0.701483] [drm:compare_of] Comparing of node /soc@1c00000/display-backend@1e60000 with /soc@1c00000/lcd-controller@1c0c000
[    0.701586] initcall sun4i_backend_platform_driver_init+0x0/0x28 returned 0 after 539 usecs
[    0.701596] calling  sun4i_hdmi_driver_init+0x0/0x28 @ 1
[    0.701802] initcall sun4i_hdmi_driver_init+0x0/0x28 returned 0 after 188 usecs
[    0.701812] calling  sun8i_mixer_platform_driver_init+0x0/0x28 @ 1
[    0.701951] initcall sun8i_mixer_platform_driver_init+0x0/0x28 returned 0 after 122 usecs
[    0.701960] calling  dumb_vga_driver_init+0x0/0x28 @ 1
[    0.702119] initcall dumb_vga_driver_init+0x0/0x28 returned 0 after 142 usecs
[    0.702131] calling  topology_sysfs_init+0x0/0x50 @ 1
[    0.702195] initcall topology_sysfs_init+0x0/0x50 returned 0 after 51 usecs
...

then no DRI card!

Doesn anyone have a working panel/tcon/DRM DTS excerpt proven working, to lend me? :-)

bye

andrea


[*] here the return from a grep about panel:

$ grep panel arch/arm/boot/dts/sun*dts
arch/arm/boot/dts/sun5i-a13-q8-tablet.dts:      panel: panel {
arch/arm/boot/dts/sun5i-a13-q8-tablet.dts:              compatible = "urt,umsh-8596md-t", "simple-panel";
arch/arm/boot/dts/sun5i-a13-q8-tablet.dts:                      /* TODO: lcd panel uses axp gpio0 as enable pin */
arch/arm/boot/dts/sun5i-a13-q8-tablet.dts:                      panel_input: endpoint@0 {
arch/arm/boot/dts/sun5i-a13-q8-tablet.dts:              remote-endpoint = <&panel_input>;
arch/arm/boot/dts/sun5i-a13-utoo-p66.dts:               /* The lcd panel i2c interface is hooked up via gpios */
arch/arm/boot/dts/sun6i-a31-colombus.dts:               /* The lcd panel i2c interface is hooked up via gpios */
arch/arm/boot/dts/sun8i-a33-sinlinx-sina33.dts: panel {
arch/arm/boot/dts/sun8i-a33-sinlinx-sina33.dts:                 panel_input: endpoint@0 {
arch/arm/boot/dts/sun8i-a33-sinlinx-sina33.dts:                         remote-endpoint = <&tcon0_out_panel>;
arch/arm/boot/dts/sun8i-a33-sinlinx-sina33.dts: tcon0_out_panel: endpoint@0 {
arch/arm/boot/dts/sun8i-a33-sinlinx-sina33.dts:         remote-endpoint = <&panel_input>;

Andrea Venturi

unread,
Dec 22, 2017, 7:00:27 AM12/22/17
to linux-sunxi

Hello, during my quest on a working LCD panel DRM setup, i think i spotted a typo here:
the remote-endpoint should be, for symmetry, "tcon0_in_be1" instead of currently "tcon1_in_be0"

is this right? should i send a patch for this minor fix?

with regard to DTS test for panel, i've tried this patch too but it doesn't "trigger" the DRI card! " ARM: dts: sun8i: enable LCD panel of Lichee Pi Zero"

 arch/arm/boot/dts/sun8i-v3s-licheepi-zero.dts | 36 +++++++++++++++++++++++++++ 
 1 file changed, 36 insertions(+) 

diff --git a/arch/arm/boot/dts/sun8i-v3s-licheepi-zero.dts b/arch/arm/boot/dts/sun8i-v3s-licheepi-zero.dts 
index 387fc2aa546d..7ae72bf63cd0 100644 
--- a/arch/arm/boot/dts/sun8i-v3s-licheepi-zero.dts 
+++ b/arch/arm/boot/dts/sun8i-v3s-licheepi-zero.dts 
@@ -75,6 +75,28 @@ 
                         gpios = <&pio 6 2 GPIO_ACTIVE_LOW>; /* PG2 */ 
                 }; 
         }; 
+        panel: panel { 
+                compatible = "qiaodian,qd43003c0-40", "simple-panel"; 
+                enable-gpios = <&pio 1 4 GPIO_ACTIVE_HIGH>; /* Should be backlight */ 
+                #address-cells = <1>; 
+                #size-cells = <0>; 
+                port@0 { 
+                        reg = <0>; 
+                        #address-cells = <1>; 
+                        #size-cells = <0>; 
+                        panel_input: endpoint@0 { 
+                                reg = <0>; 
+                                remote-endpoint = <&tcon0_out_lcd>; 
+                        }; 
+                }; 
+        }; 
+}; 
+&de { 
+        status = "okay"; 
 }; 
  
 &mmc0 { 
@@ -86,6 +108,20 @@ 
         status = "okay"; 
 }; 
  
+&tcon0 { 
+        pinctrl-names = "default"; 
+        pinctrl-0 = <&lcd_rgb666_pins>; 
+        status = "okay"; 
+}; 
+&tcon0_out { 
+        tcon0_out_lcd: endpoint@0 { 
+                reg = <0>; 
+                remote-endpoint = <&panel_input>; 
+        }; 
+}; 
 &uart0 { 
         pinctrl-0 = <&uart0_pins_a>; 
         pinctrl-names = "default"; 
-- 
2.12.0 

the dmesg log says:

...
[    0.698093] calling  of_platform_serial_driver_init+0x0/0x28 @ 1
[    0.698600] initcall of_platform_serial_driver_init+0x0/0x28 returned 0 after 482 usecs
[    0.698611] calling  drm_kms_helper_init+0x0/0x20 @ 1
[    0.698622] initcall drm_kms_helper_init+0x0/0x20 returned 0 after 0 usecs
[    0.698631] calling  drm_core_init+0x0/0x108 @ 1
[    0.698702] [drm:drm_core_init] Initialized
[    0.698714] initcall drm_core_init+0x0/0x108 returned 0 after 70 usecs
[    0.698724] calling  sun4i_drv_platform_driver_init+0x0/0x28 @ 1
[    0.699035] [drm:sun4i_drv_probe] Adding component /soc@1c00000/display-backend@1e60000
[    0.699089] [drm:sun4i_drv_probe] Adding component /soc@1c00000/display-backend@1e40000
[    0.699133] [drm:sun4i_drv_probe] Adding component /soc@1c00000/display-backend@1e60000
[    0.699174] [drm:sun4i_drv_probe] Adding component /soc@1c00000/display-backend@1e40000
[    0.699216] [drm:sun4i_drv_probe] Adding component /soc@1c00000/lcd-controller@1c0c000
[    0.699262] [drm:sun4i_drv_probe] Endpoint is our panel... skipping
[    0.699282] [drm:sun4i_drv_probe] Adding component /soc@1c00000/lcd-controller@1c0d000
[    0.699318] [drm:sun4i_drv_probe] Adding component /soc@1c00000/lcd-controller@1c0c000
[    0.699358] [drm:sun4i_drv_probe] Endpoint is our panel... skipping
[    0.699376] [drm:sun4i_drv_probe] Adding component /soc@1c00000/lcd-controller@1c0d000
[    0.699410] [drm:sun4i_drv_probe] Adding component /soc@1c00000/lcd-controller@1c0c000
[    0.699448] [drm:sun4i_drv_probe] Endpoint is our panel... skipping
[    0.699467] [drm:sun4i_drv_probe] Adding component /soc@1c00000/lcd-controller@1c0d000
[    0.699501] [drm:sun4i_drv_probe] Adding component /soc@1c00000/lcd-controller@1c0c000
[    0.699539] [drm:sun4i_drv_probe] Endpoint is our panel... skipping
[    0.699558] [drm:sun4i_drv_probe] Adding component /soc@1c00000/lcd-controller@1c0d000
[    0.700055] initcall sun4i_drv_platform_driver_init+0x0/0x28 returned 0 after 1280 usecs
[    0.700066] calling  sun4i_tcon_platform_driver_init+0x0/0x28 @ 1
[    0.700877] [drm:compare_of] Comparing of node /soc@1c00000/lcd-controller@1c0d000 with /soc@1c00000/display-backend@1e60000
[    0.701221] initcall sun4i_tcon_platform_driver_init+0x0/0x28 returned 0 after 1114 usecs
[    0.701234] calling  sun4i_tv_platform_driver_init+0x0/0x28 @ 1
[    0.701373] initcall sun4i_tv_platform_driver_init+0x0/0x28 returned 0 after 124 usecs
[    0.701383] calling  sun6i_drc_platform_driver_init+0x0/0x28 @ 1
[    0.701575] initcall sun6i_drc_platform_driver_init+0x0/0x28 returned 0 after 177 usecs
[    0.701585] calling  sun4i_backend_platform_driver_init+0x0/0x28 @ 1
[    0.701829] [drm:compare_of] Comparing of node /soc@1c00000/lcd-controller@1c0d000 with /soc@1c00000/display-backend@1e60000
[    0.701841] [drm:compare_of] Comparing of node /soc@1c00000/display-backend@1e40000 with /soc@1c00000/display-backend@1e60000
[    0.701918] [drm:compare_of] Comparing of node /soc@1c00000/lcd-controller@1c0d000 with /soc@1c00000/display-backend@1e60000
[    0.701929] [drm:compare_of] Comparing of node /soc@1c00000/display-backend@1e40000 with /soc@1c00000/display-backend@1e60000
[    0.701940] [drm:compare_of] Comparing of node /soc@1c00000/display-backend@1e60000 with /soc@1c00000/display-backend@1e60000
[    0.701950] [drm:compare_of] Comparing of node /soc@1c00000/lcd-controller@1c0d000 with /soc@1c00000/display-backend@1e40000
[    0.701960] [drm:compare_of] Comparing of node /soc@1c00000/display-backend@1e40000 with /soc@1c00000/display-backend@1e40000
[    0.701970] [drm:compare_of] Comparing of node /soc@1c00000/lcd-controller@1c0d000 with /soc@1c00000/display-backend@1e60000
[    0.701980] [drm:compare_of] Comparing of node /soc@1c00000/display-backend@1e40000 with /soc@1c00000/display-backend@1e60000
[    0.701991] [drm:compare_of] Comparing of node /soc@1c00000/display-backend@1e60000 with /soc@1c00000/display-backend@1e60000
[    0.702001] [drm:compare_of] Comparing of node /soc@1c00000/lcd-controller@1c0d000 with /soc@1c00000/display-backend@1e40000
[    0.702011] [drm:compare_of] Comparing of node /soc@1c00000/display-backend@1e40000 with /soc@1c00000/display-backend@1e40000
[    0.702021] [drm:compare_of] Comparing of node /soc@1c00000/lcd-controller@1c0d000 with /soc@1c00000/lcd-controller@1c0c000
[    0.702031] [drm:compare_of] Comparing of node /soc@1c00000/display-backend@1e40000 with /soc@1c00000/lcd-controller@1c0c000
[    0.702041] [drm:compare_of] Comparing of node /soc@1c00000/display-backend@1e60000 with /soc@1c00000/lcd-controller@1c0c000
[    0.702143] initcall sun4i_backend_platform_driver_init+0x0/0x28 returned 0 after 532 usecs
[    0.702153] calling  sun4i_hdmi_driver_init+0x0/0x28 @ 1
[    0.702355] initcall sun4i_hdmi_driver_init+0x0/0x28 returned 0 after 184 usecs
[    0.702365] calling  sun8i_mixer_platform_driver_init+0x0/0x28 @ 1
[    0.702505] initcall sun8i_mixer_platform_driver_init+0x0/0x28 returned 0 after 122 usecs
[    0.702514] calling  dumb_vga_driver_init+0x0/0x28 @ 1
[    0.702670] initcall dumb_vga_driver_init+0x0/0x28 returned 0 after 140 usecs
[    0.702682] calling  topology_sysfs_init+0x0/0x50 @ 1
...

i fail to find a "kwnon working" DTS DRM cfg for or panel.. anyone?

how can i improve the debugging of DRM init steps? what am i missing?


Il giorno mercoledì 20 dicembre 2017 13:01:14 UTC+1, Andrea Venturi ha scritto:

Andrea Venturi

unread,
Dec 23, 2017, 3:32:36 PM12/23/17
to linux-sunxi
I found my issue about panel not working in DRM mode!

i didn't realize one need to enable two more kernel options:  "SIMPLE PANEL" (and BACKLIGHT ..).

after that, i've got the LCD panel working in DRM mode; moreover, adding the HDMI cfg on DTS, i've got also the dual head setup with both panel and HDMI.

thanx to all the people involved for such an achievement!

in this latest setup, i found a different behaviour when rendering to screen in these two different scenarios:

* using /dev/fb0 i just got my Qt app rendering the 800x480 window mirrored, full screen on the LCD and in a quarter top left in the FullHD HDMI monitor.

* testing kmstest i've got two test cards with the same number of color bars on both screens (LCD and HDMI), each one with native resolution and where the diagonals are crossing the bars in different points, so they are NOT the same image but two differents.

i'm wondering if one can configure DTS to get two different /dev/fbX in "emulated framebuffer" or has to modify app to use the full DRM/KMS capability for the dual-head setup.




Il giorno mercoledì 20 dicembre 2017 13:01:14 UTC+1, Andrea Venturi ha scritto:
Reply all
Reply to author
Forward
0 new messages