This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM5728: Dual display configuration

Part Number: AM5728

Hi all,

I have connected two parallel (DPI) LCDs to the AM5728 processor running a customized Linux RT SDK, but I am only seeing one fbdev node: /dev/fb0 - this framebuffer is being utilised by both displays.

My question is, how do I modify the device tree (or driver?) to initialise an additional fbdev node (/dev/fb1) for the second display? 

PS: I have been investigating omapdrm and I guess that when omap_modeset_init enumerates over "connected" dss devices, it only finds one "registered" dss device... but then, it's obviously initialising a second DRM connector for the second LCD under that dss device and also ultimately renders the content of fb0.

I'm confused.

	lcd1: display@0 {
		compatible = "panel-dpi";
		label = "disp1";
		
		backlight = <&lcd_bl1>;
		//enable-gpios = <&gpio2 5 GPIO_ACTIVE_HIGH>;

		/* Not yet sure how to convert the units from the data sheet to "in pixels" requested by the display-timing.txt docs */
		panel-timing {
			clock-frequency = <12000000>;
			hactive = <480>;
			vactive = <128>;
			hfront-porch = <4 5 65>;
			hback-porch = <36 40 255>;
			hsync-len = <30>; 
			vback-porch = <3 8 31>;
			vfront-porch = <2 8 93>;
			vsync-len = <13>;
			hsync-active = <0>;
			vsync-active = <0>;
			de-active = <1>;
			pixelclk-active = <1>;
		};

		port {
			lcd0_in: endpoint {
				remote-endpoint = <&dpi0__out>;
			};
		};
	};

	lcd2: display@2 {
		compatible = "panel-dpi";
		label = "disp2";
		
		backlight = <&lcd_bl2>;
		//enable-gpios = <&gpio2 5 GPIO_ACTIVE_HIGH>;

		/* Not yet sure how to convert the units from the data sheet to "in pixels" requested by the display-timing.txt docs */
		panel-timing {
			clock-frequency = <12000000>;
			hactive = <480>;
			vactive = <128>;
			hfront-porch = <4 5 65>;
			hback-porch = <36 40 255>;
			hsync-len = <30>; 
			vback-porch = <3 8 31>;
			vfront-porch = <2 8 93>;
			vsync-len = <13>;
			hsync-active = <0>;
			vsync-active = <0>;
			de-active = <1>;
			pixelclk-active = <1>;
		};


		port {
			lcd2_in: endpoint {
				remote-endpoint = <&dpi2__out>;
			};
		};
	};


&dss {
	ports {
		#address-cells = <1>;
		#size-cells = <0>;

		port@0 {
			reg = <0>;

			dpi0__out: endpoint {
				remote-endpoint = <&lcd0_in>;
				data-lines = <24>;
			};
		};

		port@2 {
			reg = <0>;

			dpi2__out: endpoint {
				remote-endpoint = <&lcd2_in>;
				data-lines = <24>;
			};
		};
	};
};

  • Hello,

    The fbdev does not support dual display configuration and that is the reason you only observe one fbdev node: /dev/fb0. If you are trying to test your second connector, I recommend running the kmstest test:

    root@am57xx-evm:~# kmstest --help                                                                                                                                                                           
    Usage: kmstest [OPTION]...                                                                                                                                                                                  
                                                                                                                                                                                                                
    Show a test pattern on a display or plane                                                                                                                                                                   
                                                                                                                                                                                                                
    Options:                                                                                                                                                                                                    
          --device=DEVICE       DEVICE is the path to DRM card to open                                                                                                                                          
      -c, --connector=CONN      CONN is <connector>                                                                                                                                                             
      -r, --crtc=CRTC           CRTC is [<crtc>:]<w>x<h>[@<Hz>]                                                                                                                                                 
                                or                                                                                                                                                                              
                                [<crtc>:]<pclk>,<hact>/<hfp>/<hsw>/<hbp>/<hsp>,<vact>/<vfp>/<vsw>/<vbp>/<vsp>[,i]                                                                                               
      -p, --plane=PLANE         PLANE is [<plane>:][<x>,<y>-]<w>x<h>                                                                                                                                            
      -f, --fb=FB               FB is [<w>x<h>][-][<4cc>]                                                                                                                                                       
      -v, --view=VIEW           VIEW is <x>,<y>-<w>x<h>                                                                                                                                                         
          --dmt                 Search for the given mode from DMT tables                                                                                                                                       
          --cea                 Search for the given mode from CEA tables                                                                                                                                       
          --cvt=CVT             Create videomode with CVT. CVT is 'v1', 'v2' or 'v2o'                                                                                                                           
          --flip[=max]          Do page flipping for each output with an optional maximum flips count                                                                                                           
          --sync                Synchronize page flipping                                                                                                                                                       
                                                                                                                                                                                                                
    <connector>, <crtc> and <plane> can be given by index (<idx>) or id (@<id>).                                                                                                                                
    <connector> can also be given by name.                                                                                                                                                                      
                                                                                                                                                                                                                
    Options can be given multiple times to set up multiple displays or planes.                                                                                                                                  
    Options may apply to previous options, e.g. a plane will be set on a crtc set in                                                                                                                            
    an earlier option.                                                                                                                                                                                          
    If you omit parameters, kmstest tries to guess what you mean                                                                                                                                                
                                                                                                                                                                                                                
    Examples:                                                                                                                                                                                                   
                                                                                                                                                                                                                
    Set eDP-1 mode to 1920x1080@60, show XR24 framebuffer on the crtc, and a 400x400 XB24 plane:                                                                                                                
        kmstest -c eDP-1 -r 1920x1080@60 -f XR24 -p 400x400 -f XB24                                                                                                                                             
                                                                                                                                                                                                                
    XR24 framebuffer on first connected connector in the default mode:                                                                                                                                          
        kmstest -f XR24                                                                                                                                                                                         
                                                                                                                                                                                                                
    XR24 framebuffer on a 400x400 plane on the first connected connector in the default mode:                                                                                                                   
        kmstest -p 400x400 -f XR24                                                                                                                                                                              
                                                                                                                                                                                                                
    Test pattern on the second connector with default mode:                                                                                                                                                     
        kmstest -c 1                                                                                                                                                                                            
                                                                                                                                                                                                                
    Environmental variables:                                                                                                                                                                                    
        KMSXX_DISABLE_UNIVERSAL_PLANES    Don't enable universal planes even if available                                                                                                                       
        KMSXX_DISABLE_ATOMIC              Don't enable atomic modesetting even if available                                                                                                                     
                                                                                                                                                                                                                
    root@am57xx-evm:~# kmstest                                                                                                                                                                                  
    Connector 0/@55: DPI-1                                                                                                                                                                                      
      Crtc 0/@56 (plane 0/@35): 800x480 33.000 800/210/30/16 480/22/13/10 60 (59.52) 0xa 0x48                                                                                                                   
        Fb 62 800x480-XR24                                                                                                                                                                                      
    press enter to exit 

    Regards,
    Krunal 

  • Hi Krunal,

    That's what I thought, thank you for clarifying.

    Yes, I used KMSCube and a custom app to test the DRM connector - and it works as expected. 

    So I guess I've got to modify the driver to create an additional fbdev interface over a new DRM framebuffer associated with the correct CRTC/connector.