HDMIT Configuration

Configure Kernel Menu for HDMI

  1. Under the root directory of freelight-u-sdk, run the following command to enter the kernel menu configuration GUI.
    make linux-menuconfig
  2. Enter the Device Drivers menu.

  3. Enter the Graphics support menu.

  4. In the Graphics support menu, select the DRM Support option.
    Figure 1. DRM Support for VeriSilicon
  5. In the Graphics support menu, select the HDMI2.0 option.

  6. Save your change and exit the kernel configuration dialog.

Configure Kenel Menu for Test Program

  1. Under the root directory of freelight-u-sdk, run the following command to enter the kernel menu configuration GUI.
    make linux-menuconfig
  2. Enter the Target packages menu.

  3. Enter the Libraries > Graphics > libdrm menu.

  4. In the libdrm menu, select the Install test programs option.

    You can see the modetest tool in the kernel for testing.

  5. Save your change and exit the kernel configuration dialog.

Board-level Configuration

The following code example configures the HDMI driver at the board level, including enabling the HDMI controller, configuring pinmux, and connecting it to the display controller.
&hdmi {
	status = "okay";                   
	pinctrl-names = "default";         
	pinctrl-0 = <&inno_hdmi_pins>;     

	hdmi_in: port {                    
		#address-cells = <1>;
		#size-cells = <0>;

		hdmi_in_lcdc: endpoint@0 {     
			reg = <0>;
			remote-endpoint = <&dc_out_dpi1>;  
		};
	};
};
  • &hdmi: References the HDMI controller node defined in the SoC’s device tree HDMI Device Tree Source Code.
  • status: Enables the HDMI on the board.
  • pinctrl-names: Names the pin assigned to HDMI.
  • pinctrol-0: Assigns a hardware pin to HDMI.
  • hdmi_in: port: Defines a video input port for the HDMI controller.
  • hfmi_in_lcdc: endpoint@0: Represents a data connection point in the video pipeline.
    • remote-endpoint: Connects the HDMI controller to the display controller

Debug Display

To debug the display function:
  1. Prerequisite: Configure Kenel Menu for Test Program.

  2. Run the following command to verify the display function and connection status.
    modetest -M starfive
    For example,
    modetest -M starfive -D 0 -a -s <Connector ID>@<CRTC ID>: <Resolution> -P <Plane ID>@<CRTC ID>: <Resolution>@<Format> -Ftiles 

Output example 1:

Legend Label Description
① possible crtcs Available Cathode Ray Tube Controller (CRTC) devices
② status Whether the display connector is connected or not
③ name The name (type) of the display connector
④ encoders The connected encoders
⑤ modes The supported display modes
⑥ value The Extended Display Identification Data (EDID) of the screen

Output Example 2

Legend Label Description
① id The CRTC 0x00000001 mentioned in possible crtcs, which means the CRTC is available for use.
② id The CRTC 0x00000002 mentioned in possible crtcs, which means the CRTC is available for use.
Note: If the displayed CRTC is 0x00000003, both CRTCs are available for use.

Output Example 3

Legend Description
① The CRTC and its connected plane