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.

SK-AM62P-LP: how to enbale dss0 dual output synchronously with dpi and lvds?

Part Number: SK-AM62P-LP

Tool/software:

Hi Ti !

           my sdk version is 11.01.05.03 .  When I use dpi and lvds separately, I can play videos via these two interfaces ,  However, if I enable both interfacesIf I both interfaces synchronously ,

some error  will occur. 

[   93.313985] panel_simple: loading out-of-tree module taints kernel.
[   93.323512] panel-simple bus@f0000:max9275: supply power not found, using dummy regulator
[   93.331967] panel-simple bus@f0000:max9275: Ignore invalid data-mapping property
[   93.340897] panel-simple bus@f0000:max9277: supply power not found, using dummy regulator
root@am62pxx-evm:/test/new_sdk_file# [   93.353752] tidss 30200000.dss: tidss_dispc_modeset_init: Panel bus@f0000:max9275 has incompatible connector type for vp1 (7 != 17)
[   93.368689] tidss 30200000.dss: failed to init DRM/KMS (-22)
[   93.375067] tidss 30200000.dss: probe with driver tidss failed with error -22

My modifications are as follows

DTS

&max9275_gmsl {
	status = "okay";
	port {
		max9275_in: endpoint {
			remote-endpoint = <&dss0_dpi1_out>;
		};
	};
};

&max9277_gmsl {
	status = "okay";

		ports {
			port@0 {
				lcd_in0: endpoint {
					remote-endpoint = <&oldi0_dss0_out>;
			};
		};
	};
};

&dss0 {
	bootph-all;
	status = "okay";
	pinctrl-names = "default";
	pinctrl-0 = <&main_dpi_pins_default>;
};

&oldi0_dss0 {
	status = "okay";
};

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

	port@0 {
		reg = <0>;

		oldi0_dss0_in: endpoint {
			remote-endpoint = <&dss0_dpi0_out0>;
		};
	};

	port@1 {
		reg = <1>;

		oldi0_dss0_out: endpoint {
			remote-endpoint = <&lcd_in0>;
		};
	};
};
&dss0_ports {
	#address-cells = <1>;
	#size-cells = <0>;
		/* VP1: Output to OLDI */
	port@0 {
		#address-cells = <1>;
		#size-cells = <0>;
		reg = <0>;
		dss0_dpi0_out0: endpoint@0 {
			reg = <0>;
			remote-endpoint = <&oldi0_dss0_in>;
		};
	};
	/* DSS0-VP2: DPI/HDMI Output */
	port@1 {
		reg = <1>;
		dss0_dpi1_out: endpoint {
			remote-endpoint = <&max9275_in>;
		};
	};
};

panel-simple.c

	static struct display_timing gmsl_max9277_mode = {
	.pixelclock = {26160000,26160000,26160000},
	.hactive = {256,256,256},
	.hfront_porch = {403,403,403},
	.hback_porch = {45,45,45},
	.hsync_len = {96,96,96},
	.vactive = {64,64,64},
	.vfront_porch = {415,415,415},
	.vback_porch = {3,3,3},
	.vsync_len = {63,63,63},
};

static struct panel_desc gmsl_max9277 = {
	.timings = &gmsl_max9277_mode,
	.num_timings = 1,
	.bpc = 8,
	.size = {
		.width = 800,
		.height = 545,
	},
	.bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
	// .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_SAMPLE_NEGEDGE,
	.bus_flags = DRM_BUS_FLAG_DE_HIGH,
	.connector_type = DRM_MODE_CONNECTOR_LVDS,
};
static struct display_timing gmsl_max9275_mode = {
	.pixelclock = {26160000,26160000,26160000},
	.hactive = {256,256,256},
	.hfront_porch = {403,403,403},
	.hback_porch = {45,45,45},
	.hsync_len = {96,96,96},
	.vactive = {64,64,64},
	.vfront_porch = {415,415,415},
	.vback_porch = {3,3,3},
	.vsync_len = {63,63,63},
};
static struct panel_desc gmsl_max9275 = {
	.timings = &gmsl_max9275_mode,
	.num_timings = 1,
	.bpc = 8,
	.size = {
		.width = 800,
		.height = 545,
	},
	.bus_format = MEDIA_BUS_FMT_RGB888_1X24,
	// .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_SAMPLE_NEGEDGE,
	.bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_SAMPLE_POSEDGE,
	.connector_type = DRM_MODE_CONNECTOR_DPI,
};
	
	
	{
		.compatible = "maxim,max9275",
		.data = &gmsl_max9277,
	},
		{
		.compatible = "maxim,max9277",
		.data = &gmsl_max9275,
	},

  • How can I correctly modify my dts to ensure that dss0 outputs both dpi and lvds synchronously

  • To confirm:
    1. When you say synchronously, do you want the same data on DPI and OLDI, or did you mean simultaneously, with independent data on DPI and OLDI?
    2. Above errors are with TI EVM or with a custom board?

  • 1. I want to transmit data(whatever independant or not) through DSS0 to output on both DPI and OLDI. 

    2. Above errors is on our custom board. However I think my hardware is OK because I can transmit data via DSS0 on DPI or on OLDI separately. When I tried to combine these two separate dts together, it did not work.

  • In your shared dts, at line 61, is '@0' in 'endpoint@0' intentional?
    What happens when you replace 'endpoint@0' by 'endpoint'?

  • when I replace 'endpoint@0' by 'endpoint' , There will be a warning when compiling the dts 

     DTC     arch/arm64/boot/dts/ti/k3-am62p5-sk.dtb
    arch/arm64/boot/dts/ti/k3-am62p5-sk.dts:902.28-905.5: Warning (graph_endpoint): /bus@f0000/dss@30200000/ports/port@0/endpoint: graph node unit address error, expected "0"
      DTC     arch/arm64/boot/dts/ti/k3-am67a-beagley-ai.dtb
      DTC     arch/arm64/boot/dts/ti/k3-j722s-evm.dtb
    and then when I insmod panle-simple.ko. The same error will  occur

    [   70.501884] panel_simple: loading out-of-tree module taints kernel.
    [   70.511129] panel-simple bus@f0000:max9275: supply power not found, using dummy regulator
    [   70.519586] panel-simple bus@f0000:max9275: Ignore invalid data-mapping property
    [   70.527711] panel-simple bus@f0000:max9277: supply power not found, using dummy regulator
    root@am62pxx-evm:/firmware/ko_file/new_sdk# [   70.541065] tidss 30200000.dss: tidss_dispc_modeset_init: Panel bus@f0000:max9275 has incompatible connector type for vp1 (7 != 17)
    [   70.554643] tidss 30200000.dss: failed to init DRM/KMS (-22)
    [   70.561238] tidss 30200000.dss: probe with driver tidss failed with error -22
    

  • 1. What happens when you use the same dts on TI evm? You may need to change dss0 related nodes in k3-am62p-sk.dts.
    2. Is the power supply related still there when you setup works on individually configuring dpi and oldi? Are the power related errors there on TI EVM as well?

  • 1、when I use the same dts on TI evm,after insmod panel-simple.ko same error will  occur.

    2、when I setup works on individually configuring dpi and oldi, Power-related errors do exist, however they do not affect the functions,Because        max9275 and 9277 modules are independently powered

  • Hi Divyansh,

    According to error logs "max9275 has incompatible connector type for vp1 (7 != 17)", I think this error is caused by incorrect dts rather than unconfigured power supply. Can you kindly share some details about modifying dss0 related nodes in k3-am62p-sk.dts?

    BR,

    Dongcan

  • As a working example on our EVM, we have this overlay: https://git.ti.com/cgit/ti-linux-kernel/ti-linux-kernel/tree/arch/arm64/boot/dts/ti/k3-am62p5-sk-microtips-mf101hie-panel.dtso?h=ti-linux-6.12.y which when applied over default dts, enables HDMI and dual-link OLDI simultaneously.

    We also have https://github.com/TexasInstruments/Beyond-SDK/blob/main/am62p/psdk/simultaneous_display_examples/k3-am62p5-sk-rocktech-rk101-panel-independent-mode.dtso which enables SL-OLDI0 on DSS0 along with HDMI and SL-OLDI1 on DSS1.

    It may be useful to use these and then change back one compatible at a time to see if you are able to get it working.
    Also since error shows only on max9275, does max9277 work fine?

  • Hi Divyansh,

    1. Now I can enable DPI and OLDI via DSS0 simultaneously. However, when I run cmd "gst-play-1.0 xxx.mp4" , I found the data could be transmitted through OLDI interface but there is not signal output on DPI interface. I want to double-check whether above circumstances is the default settings. In other words, if I want to let the DPI interface work while the OLDI interface not work, what should I do via "gst-launch-1.0"?

     modetest -M tidss
    Encoders:
    id      crtc    type    possible crtcs  possible clones
    40      0       none    0x00000001      0x00000001
    50      0       DPI     0x00000002      0x00000002
    
    Connectors:
    id      encoder status          name            size (mm)       modes   encoders
    41      0       connected       LVDS-1          800x545         1       40
      modes:
            index name refresh (Hz) hdisp hss hse htot vdisp vss vse vtot
      #0 256x64 60.00 256 659 755 800 64 479 542 545 26160 flags: ; type: preferred, driver
      props:
            1 EDID:
                    flags: immutable blob
                    blobs:
    
                    value:
            2 DPMS:
                    flags: enum
                    enums: On=0 Standby=1 Suspend=2 Off=3
                    value: 0
            5 link-status:
                    flags: enum
                    enums: Good=0 Bad=1
                    value: 0
            6 non-desktop:
                    flags: immutable range
                    values: 0 1
                    value: 0
            4 TILE:
                    flags: immutable blob
                    blobs:
    
                    value:
    51      0       connected       DPI-1           800x545         1       50
      modes:
            index name refresh (Hz) hdisp hss hse htot vdisp vss vse vtot
      #0 256x64 60.00 256 659 755 800 64 479 542 545 26160 flags: ; type: preferred, driver
      props:
            1 EDID:
                    flags: immutable blob
                    blobs:
    
                    value:
            2 DPMS:
                    flags: enum
                    enums: On=0 Standby=1 Suspend=2 Off=3
                    value: 0
            5 link-status:
                    flags: enum
                    enums: Good=0 Bad=1
                    value: 0
            6 non-desktop:
                    flags: immutable range
                    values: 0 1
                    value: 0
            4 TILE:
                    flags: immutable blob
                    blobs:
    
                    value:
    
    CRTCs:
    id      fb      pos     size
    39      0       (0,0)   (0x0)
      #0  nan 0 0 0 0 0 0 0 0 0 flags: ; type:
      props:
            24 VRR_ENABLED:
                    flags: range
                    values: 0 1
                    value: 0
            27 CTM:
                    flags: blob
                    blobs:
    
                    value:
            28 GAMMA_LUT:
                    flags: blob
                    blobs:
    
                    value:
            29 GAMMA_LUT_SIZE:
                    flags: immutable range
                    values: 0 4294967295
                    value: 256
    49      0       (0,0)   (0x0)
      #0  nan 0 0 0 0 0 0 0 0 0 flags: ; type:
      props:
            24 VRR_ENABLED:
                    flags: range
                    values: 0 1
                    value: 0
            27 CTM:
                    flags: blob
                    blobs:
    
                    value:
            28 GAMMA_LUT:
                    flags: blob
                    blobs:
    
                    value:
            29 GAMMA_LUT_SIZE:
                    flags: immutable range
                    values: 0 4294967295
                    value: 256
    
    Planes:
    id      crtc    fb      CRTC x,y        x,y     gamma size      possible crtcs
    32      0       0       0,0             0,0     0               0x00000003
      formats: AR12 AB12 RA12 RG16 BG16 AR15 AB15 AR24 AB24 RA24 BA24 RG24 BG24 AR30 AB30 XR12 XB12 RX12 XR15 XB15 XR24 XB24 RX24 BX24 XR30 XB30 YUYV UYVY NV12
      props:
            8 type:
                    flags: immutable enum
                    enums: Overlay=0 Primary=1 Cursor=2
                    value: 1
            30 IN_FORMATS:
                    flags: immutable blob
                    blobs:
    
                    value:
                            01000000000000001d00000018000000
                            01000000900000004152313241423132
                            52413132524731364247313641523135
                            41423135415232344142323452413234
                            42413234524732344247323441523330
                            41423330585231325842313252583132
                            58523135584231355852323458423234
                            52583234425832345852333058423330
                            59555956555956594e56313200000000
                            ffffff1f000000000000000000000000
                            0000000000000000
                    in_formats blob decoded:
                             AR12:  LINEAR(0x0)
                             AB12:  LINEAR(0x0)
                             RA12:  LINEAR(0x0)
                             RG16:  LINEAR(0x0)
                             BG16:  LINEAR(0x0)
                             AR15:  LINEAR(0x0)
                             AB15:  LINEAR(0x0)
                             AR24:  LINEAR(0x0)
                             AB24:  LINEAR(0x0)
                             RA24:  LINEAR(0x0)
                             BA24:  LINEAR(0x0)
                             RG24:  LINEAR(0x0)
                             BG24:  LINEAR(0x0)
                             AR30:  LINEAR(0x0)
                             AB30:  LINEAR(0x0)
                             XR12:  LINEAR(0x0)
                             XB12:  LINEAR(0x0)
                             RX12:  LINEAR(0x0)
                             XR15:  LINEAR(0x0)
                             XB15:  LINEAR(0x0)
                             XR24:  LINEAR(0x0)
                             XB24:  LINEAR(0x0)
                             RX24:  LINEAR(0x0)
                             BX24:  LINEAR(0x0)
                             XR30:  LINEAR(0x0)
                             XB30:  LINEAR(0x0)
                             YUYV:  LINEAR(0x0)
                             UYVY:  LINEAR(0x0)
                             NV12:  LINEAR(0x0)
            34 zpos:
                    flags: range
                    values: 0 1
                    value: 0
            35 COLOR_ENCODING:
                    flags: enum
                    enums: ITU-R BT.601 YCbCr=0 ITU-R BT.709 YCbCr=1
                    value: 0
            36 COLOR_RANGE:
                    flags: enum
                    enums: YCbCr limited range=0 YCbCr full range=1
                    value: 1
            37 alpha:
                    flags: range
                    values: 0 65535
                    value: 65535
            38 pixel blend mode:
                    flags: enum
                    enums: Pre-multiplied=0 Coverage=1
                    value: 0
    42      0       0       0,0             0,0     0               0x00000003
      formats: AR12 AB12 RA12 RG16 BG16 AR15 AB15 AR24 AB24 RA24 BA24 RG24 BG24 AR30 AB30 XR12 XB12 RX12 XR15 XB15 XR24 XB24 RX24 BX24 XR30 XB30 YUYV UYVY NV12
      props:
            8 type:
                    flags: immutable enum
                    enums: Overlay=0 Primary=1 Cursor=2
                    value: 1
            30 IN_FORMATS:
                    flags: immutable blob
                    blobs:
    
                    value:
                            01000000000000001d00000018000000
                            01000000900000004152313241423132
                            52413132524731364247313641523135
                            41423135415232344142323452413234
                            42413234524732344247323441523330
                            41423330585231325842313252583132
                            58523135584231355852323458423234
                            52583234425832345852333058423330
                            59555956555956594e56313200000000
                            ffffff1f000000000000000000000000
                            0000000000000000
                    in_formats blob decoded:
                             AR12:  LINEAR(0x0)
                             AB12:  LINEAR(0x0)
                             RA12:  LINEAR(0x0)
                             RG16:  LINEAR(0x0)
                             BG16:  LINEAR(0x0)
                             AR15:  LINEAR(0x0)
                             AB15:  LINEAR(0x0)
                             AR24:  LINEAR(0x0)
                             AB24:  LINEAR(0x0)
                             RA24:  LINEAR(0x0)
                             BA24:  LINEAR(0x0)
                             RG24:  LINEAR(0x0)
                             BG24:  LINEAR(0x0)
                             AR30:  LINEAR(0x0)
                             AB30:  LINEAR(0x0)
                             XR12:  LINEAR(0x0)
                             XB12:  LINEAR(0x0)
                             RX12:  LINEAR(0x0)
                             XR15:  LINEAR(0x0)
                             XB15:  LINEAR(0x0)
                             XR24:  LINEAR(0x0)
                             XB24:  LINEAR(0x0)
                             RX24:  LINEAR(0x0)
                             BX24:  LINEAR(0x0)
                             XR30:  LINEAR(0x0)
                             XB30:  LINEAR(0x0)
                             YUYV:  LINEAR(0x0)
                             UYVY:  LINEAR(0x0)
                             NV12:  LINEAR(0x0)
            44 zpos:
                    flags: range
                    values: 0 1
                    value: 1
            45 COLOR_ENCODING:
                    flags: enum
                    enums: ITU-R BT.601 YCbCr=0 ITU-R BT.709 YCbCr=1
                    value: 0
            46 COLOR_RANGE:
                    flags: enum
                    enums: YCbCr limited range=0 YCbCr full range=1
                    value: 1
            47 alpha:
                    flags: range
                    values: 0 65535
                    value: 65535
            48 pixel blend mode:
                    flags: enum
                    enums: Pre-multiplied=0 Coverage=1
                    value: 0
    
    Frame buffers:
    id      size    pitch
    

     kmsprint --device=/dev/dri/by-path/platform-30200000.dss-card
    Connector 0 (41) LVDS-1 (connected)
      Encoder 0 (40) NONE
    Connector 1 (51) DPI-1 (connected)
      Encoder 1 (50) DPI
    

    2.  Furthermore, if I want to transmit the video data on DPI and OLDI via DSS0 simultaneously, do I need to modify "gst-launch-1.0"?

    BR,

    Dongcan

  • Typically this behaviour depends on the window manager being used (gstreamer may be using wayland internally).

    With the same example on TI EVM you'll see that that OLDI and DPI/HDMI would operate in extended mode, meaning that on a weston screen you can drag dialog boxes from panel panel to another.
    Similarly, when you use DRM framework (run 'kmsxxtest --device=/dev/dri/by-path/platform-30200000.dss-card'), you'll see that the pattern that would be displayed with only one screen connected gets stretched over 2 screens.

    The window manager that controls even one port of a DSS gets control over the whole DSS (and hence the other Video port too). Thus this highly depends on how the userspace framework controls multiple displays.

     , please share any additional comments with respect to gstreamer if any.

  • Hi, would recommend checking community forums for gstreamer related support.

  • Hi,
    For the same DRM card (or the same DSS) there should be a single process handling both the VPs for the same card/DSS.

    In case you need 2 different processes to be controlling both video ports separately, you may use the hack as follows:

    https://e2e.ti.com/cfs-file/__key/communityserver-discussions-components-files/791/0001_2D00_HACK_2D00_drm_2D00_drm_5F00_ioctl_2D00_Remove_2D00_requiment_2D00_for_2D00_permission_2D00_f.patch

    Eventually 2 separate processes are expected to work:

    kmsxxtest --device=/dev/dri/by-path/platform-30200000.dss-card -c 'lvds' & kmsxxtest --device=/dev/dri/by-path/platform-30200000.dss-card -c 'hdmi'

    Note: This is only a hack and we cannot provide support on this. Please use at your own risk.