Debug MIPI

Prerequisites

Before debugging the MIPI controller, prepare for the following:
  • Enable modetest in menuconfig
  • Verify the connection status. You can find such information in the startup logs as follows.
    Figure 1. Start-up Logs

Debug MIPI Function

To debug the display function, run the following command to verify the display functions and connection status.

modetest -M starfive
Output Examples:
  • Output 1:
    Figure 2. Debug Output 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 2:
    Figure 3. Debug Output 2
    Legend Label Description
    ① id The CRTC 0x00000001 mentioned in MIPI_debug.html#MIPI_debug__ph_zp4_f3c_rjc, which means the CRTC is available for use.
    ② id The CRTC 0x00000002 mentioned inMIPI_debug.html#MIPI_debug__ph_zp4_f3c_rjc, which means the CRTC is available for use.
    Note: If the displayed CRTC is 0x00000003, both of the CRTCs are available for use.
  • Output 3:
    Figure 4. Debug Output 3
    Legend Description
    ① The CRTC and its connected plane

Test LCD Display Output

To test an LCD display output, run the following command:
modetest -M starfive -D 0 -a -s <Connector ID>@<CRTC ID>: <Resolution> -P <Plane ID>@<CRTC ID>: <Resolution>@<Format> -Ftiles 
For example:
modetest -M starfive -D 0 -a -s 118@35:800x480 -P 74@35:800x480@RG16 -Ftiles