# Display Demo

## Overview

The VO (Video Output) module reads video and graphics data from memory and sends them to the selected display device. The chip supports multiple display and write-back paths, video layers, and graphics layers. The VO demos are intended to verify these interfaces and features.

## Functional Description

### VO Functions

This sample demonstrates the following VO capabilities:

- multi-output support for HDMI, LCD, and similar display devices
- layered composition of video and graphics
- OSD (On-Screen Display) text and graphics overlay
- configurable output resolution
- configurable refresh rate

### Supported Output Devices

- HDMI, including common high-resolution outputs such as 1080p
- LCD panels supported by the board configuration
- MIPI output where applicable

### Video Layers and Graphic Layers

- video layers for video streams
- graphic layers for OSD and UI-style content
- mixed-layer display modes

## Source Location

The display-related demos available in the current SDK are:

- `src/rtsmart/examples/mpp/sample_vo_video`
- `src/rtsmart/examples/mpp/sample_vo_osd`
- `src/rtsmart/examples/mpp/sample_vo_mix_order`

## Usage

### Build Method

From the `K230 RTOS SDK` root, run `make menuconfig`. It is recommended to complete at least these two sets of configuration before rebuilding the firmware:

1. Enable the target display driver, configure pins, and select the target panel driver under `MPP Configuration -> Display Configuration`.
1. Enable the display-related samples under `RT-Smart UserSpace Examples Configuration`.

If you are adding a new panel driver, first follow [how_to_add_display.md](../../advanced_development_guide/how_to_add_display.md) to finish the menuconfig setup and panel integration, then return to this page to run the sample.

### Run Example

```bash
./sample_vo_video.elf <connector_type> [options]
```

### Parameter Description

| Parameter | Description | Range |
| --- | --- | --- |
| `connector_type` | connector type | use the output of `list_connector` on the target board |

### Expected Result

After the program starts, it will:

1. initialize the VO module
1. configure the output device
1. create the required video and graphics layers
1. enable OSD display
1. start video output

Representative output:

```text
Display Demo
=============

Initializing VO module...
VO initialized successfully

Configuring output device...
Connector type: 101 (HDMI)
Output resolution: 1920x1080 @ 60Hz

Creating video layers...
Layer 0: Created
Layer 1: Created

Setting up OSD...
OSD configured successfully

Starting video output...
Video output started!
Press Ctrl+C to stop.
```

```{admonition} Tip
Use `list_connector` to view the connector types and enum values actually supported by the current firmware. When adding a new panel, make sure it has been enabled in `menuconfig` and built into the image before validating it with the sample. For detailed VO interfaces, refer to the [Display API documentation](../../api_reference/mpp/display.md).
```
