> ## Documentation Index
> Fetch the complete documentation index at: https://dragonwingdocs.qualcomm.com/llms.txt
> Use this file to discover all available pages before exploring further.

# CQ2390

## Debug the DSI display

The DSI0 panel connects through the EVK's CTP display daughtercard and maps to `DSI-1`. Its direct panel path determines the DSI clock and driver names used in steps 4 and 5.

Before running the software checks, verify the connections and default display-switch positions in [CQ2390 DSI display setup](https://dragonwingdocs.qualcomm.com/Technologies/Display/enable-display-cq2390-iq2390.md#connect-and-verify-the-dsi-display). Power off the EVK before reseating the panel cable or changing switches.

**Table: Display hardware checks**

| **Check** | **Expected default state** | **If the check fails** |
| - | - | - |
| DSI routing | SW3-5 defaults to OFF for the display daughtercard's B2B path. | Restore the default position if it was changed, and check that the daughtercard and panel cable are fully seated. |
| Backlight routing | SW6-1 defaults to OFF for the display PWM path. | If the position was changed, restore the default before checking Weston. |

> [!NOTE]
>
> Connect to the target through SSH and run target commands from the root shell. For instructions, see [Sign in using SSH](https://dragonwingdocs.qualcomm.com/Key-Documents/Flash-Guide/how-to-sign-in-with-ssh).

### 1. Identify the connector

Run the following command:

> ```text theme={null}
> modetest -M msm -c
> ```

This lists the DSI connector, its DRM ID, and its connection state.

### 2. Check connector status and modes

Run the following command:

> ```text theme={null}
> cat /sys/class/drm/card0-DSI-1/status
> ```

This reports whether the panel is connected. The expected result is `connected`.

**Reference output**

```text theme={null}
connected
```

Run the following command:

> ```text theme={null}
> cat /sys/class/drm/card0-DSI-1/modes
> ```

This lists the modes reported by the panel.

**Reference output**

```text theme={null}
1080x1920
```

A connected panel must report one or more modes. If `card0` is absent, use the DRM card reported by `modetest`. A `connected` state alone does not verify the physical panel connection or backlight power. Check the FPC cable and EVK routing even when DRM reports the fixed DSI panel as connected.

### 3. Check the active DRM state

If `debugfs` is not mounted, run the following command:

> ```text theme={null}
> mount -t debugfs none /sys/kernel/debug
> ```

This makes DRM state and interface debug data available. Run the following command:

> ```text theme={null}
> modetest -M msm -c -p
> ```

This shows the DSI encoder, CRTC, mode, and plane. Run the following command:

> ```text theme={null}
> cat /sys/kernel/debug/dri/0/state
> ```

This shows the kernel DRM connector, encoder, CRTC, and plane state.

**Reference output**

```text theme={null}
connector[32]: DSI-1
        crtc=crtc-0
```

For `DSI-1`, verify `status: connected`, a nonzero CRTC, `active=yes`, and a plane assigned to that CRTC. Use the IDs reported by `modetest`, because they can vary by build.

> [!NOTE]
>
> **Restore Weston after testing a display mode.**
>
> To test a different mode, follow [Run DRM modetest](https://dragonwingdocs.qualcomm.com/Technologies/Display/run-drm-modetest.md), then [Relaunch Weston](https://dragonwingdocs.qualcomm.com/Technologies/Display/troubleshoot-relaunch-weston.md) before returning to Weston tests.

### 4. Check interface signals

Run the following command:

> ```text theme={null}
> cat /sys/kernel/debug/clk/disp_cc_mdss_pclk*/clk_rate
> ```

This prints the available DSI pixel-clock rates in Hz. Run the following command:

> ```text theme={null}
> ls /sys/kernel/debug/dri/0/debug/
> ```

This lists the available DPU debug groups. Compare the rate with the active CRTC pixel clock in kHz. If no clock files are present, continue with the DRM and kernel checks.

### 5. Check current-boot kernel messages and live display events

Run the following command:

> ```text theme={null}
> journalctl -k -b --no-pager -o short-monotonic | grep -Ei 'msm_dsi|dsi_phy|panel|dpu|drm'
> ```

This shows panel, DSI, and DRM messages from the current boot only. If it returns no lines, capture live data while reproducing the issue.

**Reference output**

```text theme={null}
[   12.326611] msm_dpu ae01000.display-controller: bound ae94000.dsi
[   12.512759] [drm] Initialized msm 1.13.0 for ae01000.display-controller
```

To capture display events while reproducing the issue, run the following command:

> ```text theme={null}
> journalctl -f
> ```

This follows new Weston and kernel messages. Run it without `-k` so the output includes compositor connector changes and output enablement. Reproduce the issue, then press `Ctrl+C`.

Look for connector-state changes, EDID or mode detection, output enablement, and driver errors. Compare the relevant messages with the connector status and active DRM state.

A successful boot binds the DSI controller and DPU. `timeout`, `failed`, or `error` messages point to the panel, DSI PHY, power, or clock path. If DRM is active with no matching error, check the panel cable and backlight routing, then compare the Weston output with the DRM state.

### 6. Interpret the result

| **Result** | **Likely area** | **Next action** |
| - | - | - |
| `disconnected` | Panel, cable, or DSI routing | Check the FPC cable, display daughtercard, and SW3-5 setting before continuing. |
| Mode present but no CRTC, `active=yes`, or plane | DRM or compositor | Check the active DRM state and Weston. |
| `timeout`, `failed`, or `error` in the kernel log | Panel, DSI PHY, power, or clocks | Check the named resource before restarting Weston. |
| CRTC active with no kernel error but a dark or blank panel | Panel connection, backlight, or Weston | Check the FPC cable and SW6-1 setting, then check the Wayland output layout. |

> [!NOTE]
>
> **Verify the Weston service before checking the output layout.**
>
> Run the following command:
>
> ```text theme={null}
> systemctl is-active weston
> ```
>
> The expected result is `active`. If the service is not active, [Relaunch Weston](https://dragonwingdocs.qualcomm.com/Technologies/Display/troubleshoot-relaunch-weston.md) before continuing.

### 7. Check Weston and the output layout

Run the following command:

> ```text theme={null}
> journalctl -b -u weston -n 40 --no-pager
> ```

This shows the latest Weston messages from the current boot. Run the following command if Weston is active but the display is blank:

> ```text theme={null}
> find /run/user/<weston-uid> -maxdepth 1 -type s -name 'wayland-*' -printf '%f\n'
> ```

This lists the available Wayland socket names. Run the following command after replacing the placeholders:

> ```text theme={null}
> runuser -u weston -- env XDG_RUNTIME_DIR=/run/user/<weston-uid> WAYLAND_DISPLAY=<socket-name> wayland-info
> ```

> [!NOTE]
>
> **Compare the Weston output with DRM state.**
>
> This prints Weston output information. Find the selected display output and compare it with the DRM connector and CRTC state. If Weston is inactive, [Relaunch Weston](https://dragonwingdocs.qualcomm.com/Technologies/Display/troubleshoot-relaunch-weston.md) before continuing.
